- Home /
random map generator for endless runner
Hello, im creating an endless runner game with a cube1x1 moving on a platform with width od 5. Now im trying to make a random terrain generator that will put blocks on the platform, like 1x1 2x1 3x1 .. and make platform move to the side, like first i have platform 5x60 on position x=0 and then next one to be on x=2 and so on. Platforms should change lengths aswell. I tried to make all the prefabs and use pooling, but it just seams to be too much work. I would appreciate if someone can give me an idea of what to use. Thanks!
Answer by xxfelixlangerxx · Feb 29, 2020 at 05:36 PM
So i've done something like this in the past for brackeyes beginner series. what i did is i had prefabs of obastcles wich i then instanced through code run by a levelBuilder. The prefabs had a script wich destroyed them onbecomeinvisible and then called the builder to spawn a new one. hope you understodd
Your answer
![](https://koobas.hobune.stream/wayback/20220612224148im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why does Perlin noise produce horizontal lines? 0 Answers
Random number at a specific position 1 Answer