Recursive Space

Creators: Alexander Bruce
Engine: Unreal Tournament 2004
Modification: UT2K4 Level Component

Last Update: 14th July 2007
Current Status: Working. Minor fixes left.
Further Development: Improving interaction with trace weapons
Download: Not yet available

Description: Bringing an old mechanic to a new dimension...

Demonstration / Purpose Problems Encountered Setting up the Recursive World Removing the Hall of Mirrors Detailed Backgrounds Working with Trace Weapons Further Development

Page 3 - Implementation - Setting up the recursive world


Before reading about setting up the recursive world, I'd recommend reading AngelMapper's tutorial on using WarpZones first, as I'd just be repeating a lot of the same information. It's a fantastic tutorial and it's what I used before taking the idea further. Now that that's out of the way, we can deal with some of the issues specific to the recursive world itself.

When building levels recursively, the order in which portals are displayed is very important. Given that previously people have stated not to put portals facing each other, they've not really had to deal with this issue before. However, now that we are going to be rendering portals through each other, if they display in the wrong order, it could break the system completely.

If we were to try and throw 6 portals into a regular cube, one way or another we'd end up cutting the portals up and having them split zones up incorrectly. Here are two examples of dividing a cube into portals and the results, which are undesirable.

Portals - Incorrect Order - Map View

6 Portals - Incorrect Order - Top Down Map View

Portals - Incorrect Order - Game View

6 Portals - Incorrect Order - Game View



Portals - Curved Zones - Map View

4 Portals - Curved Zones - Top Down Map View

Portals - Curved Zones - Game View

4 Portals - Curved Zones - Game View



Getting the right portals by trying to splice a cube is rather problematic, to where I've not found a suitable solution yet (suggestions are welcome). If portals are overlapping or touching each other, chances are either the order in which they render will be wrong (first pictures) or they'll divide the space incorrectly (second picture).

To reconcile this, we can change the way the cube itself is cut up, so that when we add portals, the zones are already well defined, and no overlapping occurs at all. To do this, we can take our cube and extrude all 6 faces. What this gives us is our original cube, where the actual action takes place, plus a additional zones (the extruded sections) attached to each side of the cube as follows:

Portals - Incorrect Order - Map View

6 Portals - Correct Zones - Top Down Map View

Portals - Incorrect Order - Game View

6 Portals - Correct Zones - Game View



As you can see in these images, the first portals that are rendered are the ones immediately connected to the play area, before additional zones are rendered. In this case, we can see the immediate North, West, East, Up (hard to tell) and Down zones rendered, with secondary rendering then carrying on to the North West, North East and North Down zones. This certainly isn't a bad result given that normally getting three or four zones to render can be difficult.

This was a best case screenshot, so it's not an indication as to how many portals will always be displayed throughout a normal game, but its still a result that wasn't even possible with other methods of division. Within a normal game, the player will at least be able to see the portals that are directly closest to where they are heading.

Back Home Next