How does 5D space work?

Have a question, suggestion, or comment about Aleph One's features and functionality (Lua, MML, the engine itself, etc)? Post such topics here.

How does 5D space work?

Post Apr 23rd '19, 18:49

I'm trying to figure out how portal rendering makes 5D space possible. Where in the Aleph One source code are the parts that make 5D space happen? I want to know why the space inside each polygon is separate from other polygons.

Post Apr 23rd '19, 19:20

Basically, everywhere in the source. Any time you specify an object's location, it is x / y / z / polygon (then time would be the 5th dimension). This affects monster AI, sound, etc. Not just rendering.
User avatar


Post Apr 23rd '19, 23:05

and the "how does portal rendering help" answer is that any time you look across multiple polygons, you're looking through a portal on the edge of each polygon into the adjacent polygons, etc, so it doesn't matter if another polygon occupies the same 3D location, if the line from you to that 3D location doesn't pass through an edge of the poly you're in into another poly connected at an edge to another connected to that and so on, you won't end up seeing through to that unconnected polygon even though you "should" if all that mattered was 3D geometry. so you can have two different paths from one place to another place, through two different chains of connected polygons, ending up at two different polygons in the same place, but because neither of those end polygons is directly connected to the other, you don't see one of them from the other.
User avatar


Post Apr 24th '19, 00:49

Those are perhaps the best explanations I've heard :-)

I might add that when two polygons share a line, they must be on opposite sides of that line. Otherwise, although it will load and render, this happens when something hits that side:

Code: Select all
alephone: map.cpp:1429: short int find_adjacent_side(short int, short int): Assertion `line->counterclockwise_polygon_owner==polygon_index' failed.

And this is why we're able to have 5-D space, but not 3-D features like bridges. I imagine a portal engine written to allow for this could have both, but I think ours relies heavily on the fact that there can only be one polygon on the other side of a line- basically, it maps the polygons out in 2 dimensions and then adds height effects, which is why we call also call it a 2.5D engine.
User avatar


Post Apr 24th '19, 16:15

Thanks for all the information. I've got plans to make a map viewer when I understand the source code.

Return to Aleph One Discussion

Who is online

Users browsing this forum: No registered users