Endless repeating 2d map as in civilization.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MaxEl777

Does anyone know how to create an endlessly repeating 2D TileMap like in civilization in Godot? Similar to the way the map edges are a portal for the camera.
The TileMap is generated at runtime.

:bust_in_silhouette: Reply From: rustyStriker

What you are looking for is a whole topic named Procedural generation, there are many ways to implement it.

You can search online for the algorithms themselves, and maybe some godot implementation.

Example in godot by kids can code - endless 2d terrain

Example in unity - Endless city

Sorry, I wasn’t specific enough. I don’t want to generate new terrain again and again but I want the lower end of the map to be connected to the upper end and the left side to the right side. So that you scroll over the same map again and again, as if the ends of the map were connected to a portal. It’s like being on a globe.

MaxEl777 | 2020-04-23 12:44

well in that case(if you have 1 player) move the tiles instead of player, or just extend the tile map an from a certain point => boom => teleport

rustyStriker | 2020-04-23 14:00

In my game there is no player, you just control the camera. If I would teleport them, the transition from the top to the bottom and from the left to the right end, or the other way around, would not be smooth.

MaxEl777 | 2020-04-23 16:32