Hello, Im working on an infinite running game and I need to solve this in the best way posible.
Currently Im spawning objects individually at a determined position, for example:
I spawn the ground
Then I spawn a wall in the middle
Then I spawn an item after the wall
Then I spawn an enemy after the item
I can continue like this but its not practival, besides sometimes I will have two enemies or no wall.
I would like to have this setup of items like a template, then just spawn the hole template, this way I can have many template or setups and continue spawning them endlessly until the player dies.
Is there a good way to do this??
Thank you