Trying to think of ways to have a never ending scrolling game.

M

mnbmnbmnb

Guest
Something along the lines of Spy Hunter
Where the track is never ending with random segments of track changing the level.

I'm a little inexperienced with GM. I just can't fathom how to do this in GM and would just like to be pointed in the right direction. I guess the end result I would like is the level to be never ending until you die while the road is made up of random pieces of road that fit together that you could travel in between seamlessly.
 

BLang

Member
This is generally done a bit counter intuitively - instead of moving your player, you wanna move everything else in the direction opposite to where the player is going. This makes it look like the player is moving, when it's actually everything else that is moving around him.

To get procedurally generated roads in front of the player, make a couple of road objects and a controller object. Then, make the controller object spawn the road objects just outside of the screen when the player "moves" far enough.

This is a really simple solution. Tinker with it a bit. You'll figure out and learn much better ways of procedural generation eventually!
 
M

mnbmnbmnb

Guest
Thanks that clears things up for me a bit. I had that idea but I couldn't concentrate on how to make it work, now it seems more clear to me.
 

Genetix

Member
It can almost be built like a sequence, where random pieces are generated and then move down the screen, like BLang said - the player would not actually be moving, but would look like it since everything else would be.

You can still change the speed, slow down, stop, and do other things like creating parallax effects. Once the items are outside of view they can be destroyed - or kept track of (various methods) if needed to be recalled. (If the game is non-linear).

I went through this when building a Skiing game that has modes with infinite levels https://play.google.com/store/apps/details?id=com.gx.ski
 
Top