Spawning like doodle jump

joelloydjoelloyd Member, PRO Posts: 119

How is a game like doodle jump working?

I understand that the scene size is double height and when you fall the view goes to the lower half and displayed the score and game over etc. but how is the aftor spawning working? How do you make the actors spawn and drop down at the pace of the actor. I also noticed the camera on the game doesn't allow the character to go above half way before it follows but allows it to go to the bottom of the screen almost as if the camera mode box is on the lower half of the display of that makes sense. Can anyone help with this, thanks

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Have you seen this thread, it has a 'template' file associated with it.

    http://forums.gamesalad.com/discussion/18053/free-doodle-jump-template-toastkitten

  • joelloydjoelloyd Member, PRO Posts: 119

    Thanks Jamie!

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    You're welcome, hope it helps.

  • joelloydjoelloyd Member, PRO Posts: 119

    @jamie_c This template is a really good start,how would you go abouts the spawning though. Not the recycling way because i want different things to happen like doodle jump, thanks.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    I've never looked at the template to be honest, I just rememberd seeing it there.

  • joelloydjoelloyd Member, PRO Posts: 119

    Ahh ok, thanks. I'll jus have to trial an error. The spawning in mega jump and doodle jump looks random but I bet it's not as random as it looks.

    One last question @jamie_c seems as your my saving grace these days. When you spawn an actor, is there a way to not spawn another overlapping. Without the obvious type in all the spawn co ordinates because I don't want that.

    Cheers

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    There are a couple ways you can do that. One way is to store all possible spawning locations in a table and choose them at random, removing them afterward so they don't every repeat or overlap. I think there are a couple threads about this in the forum. A simpler way, if it works for your project, is to check for a collision when the actor first spawns. If it collides with an actor you don't want it to, destroy it and spawn it at another location (this typically happens so quickly the player never notices).

  • joelloydjoelloyd Member, PRO Posts: 119

    @jamie_c your my hero. Second option was what I was looking for!

    Thanks a million

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @joelloyd, great. Glad I could help. :)

Sign In or Register to comment.