Endless runner but always the same
freneticz
SwedenMember, PRO Posts: 774
I need suggestion on how to make this in a good way
I need suggestion on how to make this in a good way
Comments
Wouldn't you just spawn certain obstacles and pick ups etc. with timers.
So every 10 seconds you spawn "x"
After 30 seconds you spawn "y"
After 60 seconds you spawn "z"
Every 5 seconds you spawn "a" (increase the spawn time so that it's every 5, then 4.5, 4, 3.5 etc. to make it harder)
... and so on.
Just have things that spawn at certain times and speed up timers after x amount of time so that it becomes harder and harder.
A large set of timers spawning everything in your endless runner, that's always the same each time you play.
The other way, and this is just a thought would be to create a table with a full list of all of your spawns and what time they should each happen. Then check the first row regularly to see if the time has passed, and if it has spawn the obstacle, power up, or coin etc. and then delete the first row.
You would need to copy the table before you start the game so that everytime they replay it's reading from a full table.
This would require a lot of thought on timings and you'd have to consider what happens when they reach the end of the table. Recopy the table again but play it faster?
i will try with timer and loop in some way
Homepage: freneticgamez.eu/
https://play.google.com/store/apps/developer?id=FreneticGamez
Could always just have the actors recycle. When the obstacles move too far left, move them 1000 (or whatever distance) to the right. Very easy to create a looping scene that way - the main downside to this approach is that it's always the same, but in this case that sounds exactly what you want.
You could build a "static" runner like I do in this tutorial:
And warp the player back to the beginning when they reach the end of the static level. That is what I do in the Endless Runner Game Construction Kit I have on my website.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
This is kind of how i made it so far
Homepage: freneticgamez.eu/
https://play.google.com/store/apps/developer?id=FreneticGamez
If you're already going that route, I'd try adding an invisible actor at the end of your level so when the player touches that actor it's sent back to the start of the level. You'll probably need to play around with the placement of the 'warp' actor and the start and end of the level so there is no visual jump in the background and action but it's do able.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Also what i have done was the best i could Think of
Homepage: freneticgamez.eu/
https://play.google.com/store/apps/developer?id=FreneticGamez