Progress thread for original version (2006)
Moderator: benryves
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).
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).
Sorry for being a bit sloppy with describing things, my sense for constructing decent sentences isn't the best around
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.
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.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
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.
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.
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
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
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
"You know you're a game programmer when..."I get all wiggly typing this up... Gotta get my model exporter done
Aye. If I wanted restricted geometry, I'd be writing a conventional raycasterColumns 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.
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.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
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
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
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
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.
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.
- Delnar_Ersike
- Sir Posts-A-Lot
- Posts: 153
- Joined: Mon 22 Jan, 2007 3:05 am
- Location: UNATCO Headquarters