What's the best way to generate a floor in Godot for a 3D endless runner

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

I’m working on a 3D endless runner and I’m designing the world you fly through. My question is what’s the best way to generate the 3D models in the game repeatedly?

At the moment I use a timer, and then get the scene and load it as add_childevery second or so. Then it gets removed once it leaves the players sight with free_queue. Is this a good way or not?

:bust_in_silhouette: Reply From: PixiePal

Are you asking to randomly generate a floor, or continuously generate the pattern of floor your on?

You could set this up using a WHILE statement instead of a timer which will keep generating until a delimiter is used. WHILE player is within a range(not sure if this is set or not), add more floor scenes. If not, remove/null the free_queue.

Have you tested how much strain/threads it would take? If your going for lower-end models it’s important to make sure a reasonable/good amount.