Working on generation


My first in-progress devlog! Yay?

Ok, so since each loop's buildings are randomly generated, we need some sort of way to spawn the buildings on the platform. Before this update, there were just a bunch of game objects as the floor, i think there were about 80 to 100 game objects acting as the floor. The gap between these is likely why you can sometimes fall through the floor, even though you technically shouldn't anyway.

To fix this, we need a single game object as the floor. However, by changing this we also need to rework our level generation slightly, as before it worked by spawning a building on a random platform, and since there were many, there wasn't any big problem. Now that we're trying to work with one large platform, there is an overlap possible between buildings where they would spawn inside one another, like this:

Buildings spawning inside one another

To fix this, I am going with a lambda expression to retry getting the spawn position until the position chosen is far enough away from any other building that it won't cause any problems.

Get Fractured: A Time Odyssey

Leave a comment

Log in with itch.io to leave a comment.