Need Tips and help with Infinite cycling game!
Armagedon_Bunny
Member Posts: 3
I'm Very New To this program, I have had it for about a day now and have been messing around with all of the controls. I want to make a game LIKE (Not A Complete copy and no clone or anything) jetpack joyride (http://halfbrick.com/our-games/jetpack-joyride/#tab3) But I cant seem to get it to be infinite like the game.....What I mean is that you can go on for ever in jetpack joyride but not on this :P I have seen people talking about getting sprites Etc But I don't understand most of that Shiz Lol
I can code well I just cant use these programs, I am used to this one now and I sort of need to get this working
Thanks
Armagedon_bunny
I can code well I just cant use these programs, I am used to this one now and I sort of need to get this working
Thanks
Armagedon_bunny
Comments
There are many ways to acheive what you're looking to do. And to be honest there's infinitely better ways of doing this than how i'm going to help. Personally I use timers. Others will suggest you use tables or game timers (I use behavior timers and not game system timers). I know that i might be sounding a bit confusing right now, but that's just to show you that there are many ways to do the same thing in GameSalad.
So for the time being let me at least point you in a direction. Again, keeping in mind that there will be other, potentially better, ways of doing this.
Heres what it basically would look like. I'm simplifying here, but hopefully it will give you a basic idea of how to do this and get started.
1.) we need a bad guy object. We need to add a behavior in it to move across the screen from right to left (like most 2d runners). You could use accelerate or move or move to or interpolate, etc. get familiar with those behaviors.
2.) we then will need another actor to act as our game universe. Meaning an actor that contains the functionality code of the current level. This will make sense in a moment. We'll call this actor UNIVERSE for the time being. Place this object somewhere off screen on the level.
3.) now lets go into the universe actor and get started. Go to behaviors and drag the TIMER behavior into the code section. For an example lets set the timer to EVERY 2 seconds. Now we have to tell the code WHAT happens every 2 seconds. So lets drag the SPAWN behavior into the timer bracket.
4.) well what do we want to spawn? We want to spawn the bad guy object every 2 seconds. So from the drop down list in spawn, select the initial bad guy object we created. If you haven't named it, its probably called actor 1.
Now lets review what just happened.
You made a bad guy with a behavior to move to the left.
You then set up a universal level rule that every 2 seconds you want that bad guy object to appear. Neat! If you preview the game you will notice that every 2 seconds and object will be created and move to the left. You're now on your way to understanding how to make the runner game a possibility.
Now of course i'm leaving tons out! But this is a healthy start to understanding the initial principles.
I can guarantee you that the next things you'll need to focus on are the following...
1.) my bad guy is spawning BUT he's not spawning where i want him to. The answer is you need to learn how to tell it to spawn at the desired x and y values. Research how to do that or come back here for help.
2.) you're going to want to create an actor that destroys your bad guy objects once they go off screen. This will make your game perform better. Look into how to destroy actors.
3.) you're going to want to create your good guy chracter and learn how to make him jump and how to get hit by the bad guy actor, etc. Again look at platform examples or how to do gravity in GameSalad.
Hopefully this gets you started! Lots of great people on these forums. Best of luck to you!