endless run
djdee
Member Posts: 180
hi guys, am trying to make an endless 2d runner game...
i have searched the forum but dint find any results that i could understand..
am stuck with basic need of making an endless scene...the character is moving from left to right....
any help would b gladly appreciated....
i have searched the forum but dint find any results that i could understand..
am stuck with basic need of making an endless scene...the character is moving from left to right....
any help would b gladly appreciated....
Comments
The level isn't really endless either. The trick is that once the scenery has gone off the left side of the screen you move it back to the right side, usually at a different height, to give the impression of an endless randomly generated level.
Hopefully that'll steer you in the right direction
thanks, that really help me understand.... i have few more doubts but would try to work on them myself. thanks... cheers
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
thank u....
I've made a couple endless side scrollers and my recommendation is to use a very large set scene size with static objects and moving player instead of static player with moving objects. Two reasons:
1. Performance becomes worse as more objects move on scene.
2. Its much easier to control static actors than it is moving actors.
Technically speaking, a set scene size is not endless; however, I doubt your intention is to make a truly endless scroller
Gamesalad is capable of very large scene sizes... 1 million +
I've run a stress test with a mock-up platform generator and a 900,000 px wide scene. The generator was traveling at 100 pixels per second creating 50 px wide actors at various heights one after another. It made it all the to the end without a single glitch. Math time and actual time were within a hundredth of a second after the 2.5 hours sprint.
Just my two cents... and remember to destroy your actors once they're out of sight.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
thank u for the suggestion, but am gonna go with moving the actors way. i will still try the big screen idea. wanna see which works best...
thank you...
also,
@djdee
I've since made a demo project. Check it out here:
http://ezinterweb.com/gamesalad/platform-spawner
I dont know if this will still be active but I was looking at that file and am trying to replicate it with slightly different variables but when I tried to I cannot find the 'self.spawned' attribute it is there when I open your document but when I started mine it just wasn't there
Since posting that file I've done a more detailed tutorial, if you want to check it out its here:
That self.spawned attribute is a custom attribute. I added that manually to the actor, if you are starting a new file from scratch you would need to add it to your actor as well.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
A better way to make endless runner is to create a scene say 12000px long or even much less and then move the camera and player, and have a rule when you get to 10000px you set everything back to 2000 or so. That way you get a true endless runner and all of your ground and platforms ETC can be set to non-movable and way less spawning.
It can be complicated so beware.