Page 8 of 9

Posted: Wed 26 Jul, 2006 12:34 pm
by coelurus
Example of my prism obsession:

When a new map opens up, the editor will request the user to specify a starting prism. Let's make a square. Then, let the user select the walls and set properties like portals and stuff. Let's select the right-most one and make it a portal. If a user double-clicks on a portal, the editor will create a "floating" prism (imagine the selection-thingie on the Windows desktop) and the user can change the number of sides in the prism (up/down keys?) and the size of the prism (using the mouse?). Let's make it a hexagon and drag it out a bit larger than the square. A left-click and the prism is set. The user selects and changes walls again and on it goes. I think it'd be a lot faster using prisms rather than plotting out vertices and dragging lines, plus you'd get convexity, shallow angles and portals almost for free!

I didn't think about sprites, just sorting everything then might be the best choice... Still, I guess the number of polygons on-screen won't be overly large?

EDIT: Just figured, the centroid-problems occur with polygons too, a long polygon in front of a short may be considered further away. Sorting inside sectors would work then (first sort sectors using first-hit portal-centroids, then sort polygons and sprites for each sector).

Posted: Wed 26 Jul, 2006 3:13 pm
by benryves
I can see what you mean by using the level editor for prisms. As for that, at the moment I wouldn't mind if I had to hum particular frequencies to insert vertices. ;) Just so long as I can get the calc engine working.

I can't see how prisms would help with convexity, shallow angles and portals. :(

Posted: Wed 26 Jul, 2006 4:49 pm
by coelurus
Sorry for being a bit sloppy with describing things, my sense for constructing decent sentences isn't the best around :P

I should've looked up different types of angles... I probably meant "obtuse" angles, prisms with atleast 4 sides don't have any "acute" ones. Rooms that are skewed quadrilaterals (acute angles!) mess things up big time and one would need some kind of tricky spatial data structure to handle those.

Anyway, my idea was that each prism would be one sector and as the mapper puts prisms together like building blocks, portals are automatically created where the prisms touch. Due to the fact that _all_ sectors in the maps are convex, objects belonging to a sector can be sorted directly without any special treatment. Furthermore, the sectors themselves can be sorted as long as they don't intersect. I think :)

I figured a little "problem" with the prisms and that is with columns and oddly shaped rooms in general.

Posted: Wed 26 Jul, 2006 5:05 pm
by benryves
All sectors would have to be convex anyway, prisms or not. I now understand what you mean by prisms now, though - always regular prisms, right?

I don't quite see how these acute angles mess things up - maybe there's a way around it? Do you have a quick sketch or something (preferably in big chunky crayon so I can understand ;) ).

Not being able to define things like columns and sharp room corners almost destroys the point of having an engine with free-form walls.

Posted: Wed 26 Jul, 2006 9:01 pm
by coelurus
The acute-angle isn't important, it could potentially happen (I'm not quite sure yet, it seemed very possible earlier on in the day though :) ) but the error would be obscured by sectors that would be sorted properly. In any way, I'm pretty sure the problem won't be visible or perhaps not even possible, hehe.

Columns can't be skipped, I agree. Making "complex" structures in the middle of a room would be nice too, like the "computer rooms" in Doom. A level compiler would be great, and probably not very hard since everything is just supposed to be convex. Traversing around walls, a reflection angle (>180deg) would scream for a portal and when the traversal has been done including all isles in the map, connect vertices that screamed, preferrably with other vertices that screamed, but regular ones will do. For each new portal, control that the reflection angle was resolved.

I get all wiggly typing this up... Gotta get my model exporter done :P

Posted: Sat 29 Jul, 2006 6:46 pm
by anykey
Wow. I just started reading this thread, and I am in shock!
Ben, this is the most amazing 3D engine I've seen yet. Good work!

Posted: Tue 01 Aug, 2006 4:14 pm
by benryves
I get all wiggly typing this up... Gotta get my model exporter done :P
"You know you're a game programmer when..." :D
Columns can't be skipped, I agree. Making "complex" structures in the middle of a room would be nice too, like the "computer rooms" in Doom.
Aye. If I wanted restricted geometry, I'd be writing a conventional raycaster :)

As for the level compiler, I'm personally fine drawing vertices and dragging walls between them. I've added some code to it so it can automatically use these wall definitions to work out where the sectors are (if any), and the code automatically rejects convex sectors. Once I get sector floor/ceiling heights in, I can write the 3D preview window and so use that as a test for how the sorting is going to have to work.

Posted: Wed 18 Oct, 2006 3:47 am
by necro
o.o omg, ben...ok, well...this looks so very cool...how is it progressing?

Posted: Wed 18 Oct, 2006 10:28 am
by benryves
It's not progressing at the moment, I'm afraid, as I'm completely bogged down with work. :(

Developing a "better Brass" is taking priority over this project too, given that Brass is more useful to people than a project that might or might not come to fruition.

It's not dead, don't worry. I'm fully open to suggestions on occlusion ;)

Posted: Fri 27 Oct, 2006 1:12 am
by necro
which is cooler, a better asm compiler suit or a 3D grayscale ubber awesome display of the power of the z80 calcs? I think the latter...but if you aren't going to develop further...even if at least for a while...a bit of what you have done to play with?

Posted: Fri 27 Oct, 2006 9:57 am
by benryves
I agree that it's cooler, but given that Brass/Latenite can be done, and Nostromo might not, and that I have a very limited amount of time, I'd rather use to work on something that I know is worthwhile.

There's not a lot to play around with, unless you enjoy walking around a four-walls-one-window-one-door level where the walls are sorted incorrectly. ;)

Posted: Fri 27 Oct, 2006 11:59 am
by kv83
I think BRASS is cooler... but that's just me :P

Posted: Fri 27 Oct, 2006 8:28 pm
by tr1p1ea
BRASS is definately more useful, but hopefully once that has come a fair way you can devote some time to this project ... because it is very cool, as stated.

You might even be able to include it with a future BRASS release as an example.

Posted: Mon 22 Jan, 2007 3:19 am
by Delnar_Ersike
BTW, a lot of people believe 3D games won't be worth the time and effort in making, but I want them to be wrong! Please tell me this project isn't really dead... :cry:

Posted: Mon 22 Jan, 2007 11:35 am
by benryves
This project is not dead (and I'm not just saying that, I fully intend on working some more on it - I did in fact do some 3D Z80 work over the weekend). ;)

I'm just really stuck when it comes to occlusion, though.