I set up a spawn_manager script that spawns obstacles every few seconds using a formula that uses randf_range among other things to randomize the interval, then I basically do the same thing for the position.x after instantiating the cactus node in a different function that selects what to spawn and spawn it in -20 pixels off-screen on the Y axis
← Return to game
Comments
Log in with itch.io to leave a comment.
score 900. this is best game
Nice game, I also work in Godot. How did you radomise the cacti's position?
I set up a spawn_manager script that spawns obstacles every few seconds using a formula that uses randf_range among other things to randomize the interval, then I basically do the same thing for the position.x after instantiating the cactus node in a different function that selects what to spawn and spawn it in -20 pixels off-screen on the Y axis
(the formula is kinda whack but I felt the rand values were very predictable otherwise, it seemed to just go back and forth)
Thanks bro!