So I have been researching how best to implement World Wrap for a couple days now. I am trying to come up with a list of options with the various pros and cons of each. The math regarding the wrap line is fairly straightforward. How to wrap the world visually is what I am trying to figure out.
First, here are some of the requirements for world wrap implementation:
- East and West edges of the tile map need to connect with each other seamlessly:
- Tiles on either side of the wrap line must be interactive from either side. IE not just an image of the other side of the world.
- AI and movement algorithms need to be able to account for the wrap and traverse it.
- An Array with the Vector information for the entire map is stored and should remain intact if at all possible. At least it should be easily updated if required for wrapping.
The options that I have come up with so far:
a. Can the same level be streamed 3 times in 3 different world locations? And do they each retain original vector coordinates if streamed or do they all run off of world space location? If the level can be streamed multiple times and the vectors local to each streamed level, then I could use 3 Levels, all duplicated renders of the map laid out side by side. You start in the middle level and some point after crossing the wrap line in either direction you are teleported back to the middle level. Any action taken on any of the duplicated maps is replicated to the others. Generally only 1-2 of the level would be rendered at a time.
b. Similar to a. except that the level is continually streamed in ahead of your position. It would be key that the vector information regarding the map be local to the level and not to the world.
c. ? (I am sure there are more level streaming options as I only have a basic understanding of what you can do with it in UE4)
Great Wall of Portal
a. Basically a portal spanning from pole to pole and as high as the player’s camera view that would allow both player movement and map interaction from either side of the portal. This is my favorite option, though I am not sure how to do it without camera trickery that might not preserve the ability to interact with tiles through the portal.
? That is all I can think of that has a chance of working. If you know of a method or have better ways to do the above methods, please let me know, thanks!