- Home /
How to create a circular map
Hi all, I wanted to create a 2D level where when you exit form the right of the screen you enter from the left, like in figure (just like in Towerfall Ascension). Screenshot (it seems that i can't upload images here, I've put a link to the image)
I have only this "arena" on the screen and I want the map to be "circular". This means that not only I can see the character splitted when going from right to left, but I want that there is also an instance of the character, so that if an enemy shots him it can be hit. My first approach was to duplicate the character while going out of the screen, but I think that maybe there is a more intelligent approach. Can anyone give me an opinion on how to do this?
i think best solution is what you suggested. You shoul no duplicate, but triplicate (one copy on each side) all the scene, ground, character, enemies, etc.
Answer by Bunny83 · Feb 16, 2020 at 03:54 AM
This question has been asked several times in the past. The last time it was just a few weeks ago.
As for how to handle interactions of the two representations there are also several ways. A common way is to have one of the objects being the master, the other one the slave. However if you want physics interactions on both sides it might get tricky. Another way would be to seperate your logical player from your physical and visual player. So the objects you see on the screen are just avatars of your player. Both objects will follow the logical player and just forward any interactions to the logical player object.
A great example is how the portals in the game Portal works. There's a great developers talk about problems in Portal. Relevant parts would be Duplicate Models and Shadow Clones. Of course this only covers some basic principles which also can't be translated one-to-one to Unity. However conceptionally it's a similar idea and similar issues. If you have the time I can recommend the whole talk, even the rest is not really relevant to your problem.
Your answer
Follow this Question
Related Questions
Enable an area after a condition is met 2 Answers
Help with Generating level 0 Answers
How to Draw a 2D Circle for my level border? 2 Answers
How can I store and load levels efficiently? 2 Answers
What is the best way to make Half - Life or DOOM style levels? 2 Answers