Page 1 of 1
Posted: Sat Jun 13, 2015 1:04 pm
Now, I'm almost sure that I once saw a stock Descent map that featured a teleporting cube in which a player could fly into said cube and appear in a totally different area. Was it an illusion, or was it genuine teleportation Because I really want to make some creative map designs that include teleports. I know D2XXL supports teleports, but I was wondering if the same sort of thing works in vanilla Descent 1/2.
Posted: Sat Jun 13, 2015 7:22 pm
The most common 'teleport' is simply intersecting rooms. Take a look at pentacircle: flying around gives you a whole bunch of different, but similarly stacked areas. Other's, such have duality, appear to have two identical but overlapped maps. Then there's the more recent antbend, which takes a while to even notice that there are intersecting rooms.
But this is not teleportation, it's simply that cubes can occupy the same space and not be connected - or even visible.
Teleportation is what could move you from one side of the map to the other side of the map: the simplest example is to have an infinitely long corridoor, where one end teleports you to the other. (Which would make a weird level in itself).
The reason this is possible is because Descent uses cubes as it's building block. In the level file, each cube contains information about:
- It's vertices
- It's textures
and more interestingly:
- What cubes it joins to via which edges. Quite literally you have a six-bit bitmask followed by up to six cube ID's.
(You can find the spec here: http://www.descent2.com/ddn/specs/rdl/
4D space is simple, you simply have cubes occupying the same space that don't join, and from one cube you won't see the other.
Teleporters could be done by manually changing the cube ID. If I have cube 10 on one side of the level, I could manually set it to join to cube 30 on the other side of the level using a hex editor. I will say though, the level file is a nightmare to go through. I once wrote an importer so that blender could open .rdl files, it was a nightmare. I'd probably be better now that I have a little more understanding of both the format and general computers.
Well, good luck....
Posted: Sat Jun 13, 2015 8:13 pm
My question is...Will the effect be seamless, like in Xonotic? Is it worth the hassle? Cuz I can make badass maps if I learn how to do this.
Posted: Sat Jun 13, 2015 9:01 pm
4D geometry can be glitchy. The rendering engine renders a certain number of cubes in all directions from the cube you're currently in, unless it comes across a non-transparent wall. So if you have overlapping geomtery with a really close entrance, you can sometimes see (and occasionally get stuck on) the 4D geometry. Duality fixes this with go-through-walls to shield the one part of the level from the other. Pentacircle doesn't have any protection and somehow works in all by a single area.
However, if teleports don't crash the engine (there is the real risk it will), then they will be seamless. From the engines perspective, it's no different to the connection between normal rooms.
Yes, there is a serious risk of it crashing, as things have 3D co-ordinates and these will have to jump. I'm not entirely sure of how the engine handles moving from one cube into the next. It's not just the 3D co-ordinates, other things seem to change too.
Posted: Sat Jun 13, 2015 10:12 pm
If the game doesn't crash in one instance, is it possible that it will crash in another using the same map with a teleporter? What I mean is, is it possible to make a map with a teleporter that consistently doesn't crash? Or is there always the chance that x number of players can crash it or something weird like that? Or is it always random whether or not it'll crash or not?
Posted: Sat Jun 13, 2015 10:29 pm
It will either be never, or work in single player, or always work.
Posted: Sat Jun 13, 2015 10:29 pm
There are two things I can think of.
1) D2 secret exits. These actually take you to another level, but they are not seamless in any sense of the term.
2) "4D" level geometry. It's not terribly reliable in the D2 source ports because it relies on the geometry for the "alternate dimensions" being culled. It can be relatively seamless though. It depends what you're trying to do.
I've never heard of that sort of level geometry causing crashes though; a transition through these "teleporter" segments isn't handled any differently from transitions through regular segments.
One thing to be aware of is that the second option is not actually teleporting as far as your location within the 3D world is concerned. Because of this, the portals still need to line up in 3D space - which is going to constrain how you can build structures if you have multiple "teleporters".
Posted: Sun Jun 14, 2015 4:15 am
There is no increased risk of crashing due to the "4D" level structure. Descent tracks every object via the segment (cube) it resides in. Segment transitions are a well defined process controlled by each segment's list of connected segments - 3D coordinates play a secondary role in this.
Posted: Sun Jun 14, 2015 1:54 pm
I'm not talking about normal 4dness. This is normal 4d-ness:
The shaded area contains two tunnels, but as a pilot you only ever see/fly through one of them.
This is teleportation:
Where physically disjoint sections can be flown from one into the other. To my knowledge this has never been done in Descent, but is theoretically possible by manually specifying the join between the cubes,
Posted: Mon Jun 15, 2015 9:39 am
You are right: You could manually make a segment the child segment of a geometrically disjoint segment. You will however get in trouble when trying to move your ship from one segment to another segment linked to it that way, while being geometrically disconnected. An unmodified renderer will also not be able to render the destination area properly, as transforming its vertices from world to view space will not place it in the player's view, and hence the projection will not render it properly to the screen. The renderer modification might however be pretty simple to achieve ... this could be an interesting offset to implementing warp zones in D2X-XL; However, it certainly requires more thought.
Geez, why did you start this discussion, homeyduh? Why did you post this idea, sdfgeoff? Why did I read this all!
My brain starts to race off into the distance, hunting down a solution to this task ... aaaarrrrrghhh!
The harder part will probably be to make objects transit from such a segment to a disjoint child segment. The program will have to compute the proper object position in the destination segment. Not too hard, actually. The renderer would need to add a translation and a rotation when crossing the boundaries between two such segments. It needs to stop walking through segments if it finds some it had walked through already.
The main question however will be: Who's gonna pay this?
Posted: Tue Jun 16, 2015 12:58 am
I expect (in the legacy engine) it would behave like a hole in the map. Nothing will be rendered between the two faces, and if you want to travel between the two, you'll have to cross space. Which may or may not be possible; guessing from my experiences with cube faces with invalid normals, I suspect the planes of the faces adjacent to the disjoint joined side would form a kind of bounding box. If they aren't parallel, you won't be able to make it to the other side, and if they're joined to other cubes themselves, I don't really know what would happen. That's the kind of scenario that might crash if the Descent engine looks for a neighboring segment you've crossed into and doesn't find one; if the code doesn't guard against such a situation, it could end up dereferencing invalid pointers.
There wouldn't be anything to be gained from trying to do that, though. The map would just look funny and go hall-of-mirrors on you in DOSBox.
Posted: Mon Jun 29, 2015 10:58 pm
This conversation has really piqued my interest in making normal 4D maps, or even maps with 4D traits. Will post one up in a week or 2.
Posted: Mon Jan 25, 2016 3:48 pm
Teleports would be pretty cool for a sci-fi shooter such as Descent. Since even Doom could do them the technology should be available
Posted: Tue Jan 26, 2016 7:58 am
Yeah but the D2X-XL teleports are more the Doom type anyway.
This sounds more like an involuntary type of teleport -- not technology, just a broken universe.