How to create endless height map? (procedure generating map)
-
How to create endless height map?
English:
At the moment I have a tilemap width of 10 and a height of 100 tiles, how to automatically add a new part of the map to the zero coordinate of the existing one and increase it in height while passing half of the existing part of the map?Russian:
На данный момент у меня существует тайлмап шириной в 10 и высотой в 100 тайлов, как реализовать автоматическое добавление новой части карты к нулевой координате существующей и увеличивать ее в высоту при прохождении половины существующей части карты?English:
Throughout the level, I would like to run on one card that will go in a similar manner.Russian:
На протяжении всего уровня я хотел бы бежать по одной карте которая будет идти подобным образом.English:
For the end of the level, you need to add the beginning of the next part (the coordinates of the end are zero coordinates).Russian:
За место окончания уровня нужно добавлять начало следующей части (координаты окончания - нулевые координаты).
At the moment the process of passing the level looks like this:
But I would like it to be infinite.
-
As a result, I mastered the load, but now the problem is that after switching to a new piece of the map, overlaps and collides stop working.
Result: http://recordit.co/yq8K5U3Ioj
I add tiles with the coordinates going into negative numbers in height, before that I delete the old piece of the map.
-
I solved the problem of line
FlxG.worldBounds.put();