I’m curious, when you see a game that has really, really long levels (arcade style straightaway racing games, for example), do they have a really gigantic model (or series of models) for the road, or is it better to dynamically create the road while the player is playing?
I made a little game with a never ending level , like a temple run , and what I do is first create all the objects I need , then I place the objects ahead of the user as i need them . Once the game objects are out of view I can use them again . When I need to use them again I can then place them ahead of the user ,
So say the road has 6 parts , The user starts on part one , once part one is out of view( the users pasing part 2) , I can use it again , so then when the user gets past road part 6, road part 1 basically becomes road part 7, road part 2 becomes road part 8 ,etc .
Here’s a really ugly build of it . Let me know if you have any questions as to how it works .
You would dynamically create pieces which reach to the horizont and create new ones as you go.
Many of those Temple Run like games even create random pieces behind the horizont to make the level unpredictable.
Making just one big very long model isn’t a good idea in my opinion, because if it’s not done right it could even cost a lot of performance. Beside that it’s boring to always have the same track in games like this.
I just released an endless road racing game, I made a prefab of the road section and spawned ahead of the player, off screen. I used object pooling so it didn’t affect the performance too much.
I think most of these kind of games have at least some elements of procedural content generation. Or at least procedural placement. Take Jetpack Joyride for example, each time the obstacles are in different locations, powerups are different, bonuses are different. Or like Robot Unicorn Attack, which is still one of my favorites… they use big sections of landscape like a couple of screens wide and just mix up the order of them. You could do it quite well with a system that support a classic tile map because then you are re-using tiles and not taking up tonnes of memory. Apart from Temple Run I’m not so keen on all the copycat games 3D runners. None of them are as good. I guess if you are doing 3D you could just do a 3d tilemap or at least one that’s viewed from above rather than the side, with 3D objects in it instead of sprites. It’s mostly about re-use of resources. But to keep things interesting those resources need to be placed in random locations (yet meaningful, and good for gameplay) each time.
There is definitely an appeal to a game that goes FAST … Sonic the Hedgehog was in a league of its own in this regard and hardly anyone copied the speed or even really tried to, which puzzles me because somehow people think that doing a fast-moving game like that was somehow inherent to the Sonic brand or characters, but moving fast does not have to mean blue hedgehogs. Fast is exciting, and especially when it means very quick skill reflexes which taps into the excitement and intensity of an arcade action game.
I think one of the other reasons these games are so popular is because there is no end goal and it really boils down to your own skill as to how far you get. If you fail it’s totally your own fault and the game never does nasty things to you, besides presenting different obstacles/challenges. That makes it really addictive because each time you play it’s different (longevity, fancy that) and each time you know you’re really playing against YOURSELF.
Also not having an end goal is part of an addiction cycle which says the goal is unobtainable and always out of reach, which makes you attracted to it and want it more, and yet the more you go after it the less attainable it is until you get into a maddening loop of gotta have it. It’s the same as someone addicted to potato chips … addicted because of the guilt involved in eating them and everyone thats says no you cant have them which fuels you to want them even more, and yet if you let yourself have tonnes of them with no guilt then the addiction can’t be sustained.
Just the same as the road. Spawn the traffic slightly off screen, check for distance away from the player and destroy the car once it’s gone past a certain distance offscreen