Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Endless Mode for cube game

Hello everyone 😊. I have finished Brackeys tutorial regarding the cube game and have made some advancements to it. I was wondering tho how could I possibly go about creating an endless object spawning scene? I have watched a few tutorials on this issue but I can't seem to wrap my head around it. Any help would be appreciated. Thanks a lot in advance

Best Answer

  • bluesharkblueshark Member
    Accepted Answer

    You mean like an endless runner? You could try creating a prefab group of objects, for instance a group of obstacles saved as a prefab, and then through code store all the prefabs into a list and then spawn the prefab behind the last one by a certain distance. It would be just like spawning tiles after each other just a little further away so the player wouldn't see this happening (this is where fog would help too). Also just for the sake of optimization you could also delete the prefab tiles behind the player so you don't have a million objects in your scene.

    I hope this is what you meant. :)

Answers

Sign In or Register to comment.