Randomly Generated Levels Help?

thilanwijthilanwij Member Posts: 20
edited February 2012 in Working with GS (Mac)
I want to make something like Tiny Wings or Temple run where you just keep going and the game will randomly generate the level each time you play it. Like in Temple run, you just run and run and it makes the level random for you as you go. Is it possible to do that in GameSalad? I searched for something like this but no luck to helping me get what I was hoping for. Thanks in advance!

Comments

  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    edited February 2012
    yes, it is possible. I just created a distance game that creates my objects at random. Basically you will have all your sprites imported into GS and maid into actors, which will make up your game. Basically what I did was created a "spawn random actor" actor and what I said was that when the current actor (on screen), once it's x and y reach a certain point on the screen to randomly generate a new actor, at random. Sometimes you can use a timer to spawn actors at random but the issue I found about going that route is the timer will always spawn an actor after the set amount of time. So if you have actors in which are different sizes, you would probably run into the issue of actors getting spawned on top of one another. By doing it the way I did as stated above, you can then have actors of all sizes. One big thing I would like to point out that I come across in which a lot of people don't do. Make sure that in one way or another, once the actor has left the stage, make sure to destroy it or recycle it. For example, I am a spaceship and shooting lasers. Well all the lasers which fly off screen still do exist. In this case, over time, the bullets will keep building up, and end up slowing your game down to the point it will crash. I see this happen a lot. Just wanted to throw that in there.
  • thilanwijthilanwij Member Posts: 20
    @killerpenguins

    Thanks for the reply! I'm still trying to understand the concept of what you said, would u be able to type it in like a "rule" format on here?
    Like:
    If actor reaches certain x AND certain y point
    then spawn random actor

    (or something like that? i'd understand the concept easier that way or even a screen shot of what you're talking about)

    Hope you get what i mean, thanks again!
Sign In or Register to comment.