A feature of the endless game is the automatic generation of the map. We have decided that you will be interested to see how this can be implemented. Let’s show the example of the game “Run, boar, run” and the Unity tool.
This game has only a beginning, the end – unattainable :-). How does this happen? All the objects we see or will soon see on the screen are generated automatically and continuously, along with the movement of the main character on the map. There are many layers in the “boar” game, which, apparently, are not noticeable at first glance. Some background elements are simply substituted on the right (mountains, hills, water) when they go beyond the screen on the left. Some are randomly generated on the right (large trees, platforms, obstacles) before they appear.
Thus, setting certain rules and ranges, the level is randomly generated for as long and variably as desired. But needless to say, let’s see how it happens: