Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Shawak |
So I want to create a planet-like map using a top-down perspective viewing a 2d tilemap which repeat’s itself after walking a specific amount of tiles into each direction. My question is, is that even somehow possible using the standard tilemap?
I face following problems:
- How to repeat a (for example 10,000x10,000) tilemap in 8 directions (west, nw, n, ne, e, se, s, sw)
- How do I avoid the position of a player to overflow/underflow when after moving to one position only (even if I get the repeating tilemap working somehow)
The game should work in multiplayer, therefore I can’t move the tilemap instead of the player to make it work. The best idea I came up with is to split the map into chunks, and save the player position relative to the chunk he currently is in. But I am not sure if I want to go that way, since I’m not 100% confident with the godot engine yet and I think it will be hard to implement. Also I want random events to happen on the map in real time and would have to check for chunk bounderies/neighbours all the time (e.g. all positions for each game object need to be stored relative to their chunk offset to make this approach work).
Edit: Another approach I though of is to modulo all positions by (for example) 32 * 10_000, but then I still need to draw the tilemap into all directictions when the player is about to reach the limit.
Thanks in advance!