Mario styled jumping?

juzcookjuzcook Member Posts: 259
edited November -1 in Working with GS (Mac)
I've been playing around for the last couple days and I've been having trouble creating a jump similar to that in a Mario game. Currently I'm playing around with interpolation with jumping, but that's been giving me some other errors, yet it seems to be the closest to what I'm aiming for.

The problem I'm getting at the moment is that I want my actor to jump with a y value of 200, then fall down quickly (rather than float), so that player's can't scream across the map when they're falling. Another problem also occurs when I use this method, where if my actor has a value greater than 200, he falls DOWN rather than jump up. Any tips or downloads would be really helpful

Comments

  • millerbrother1millerbrother1 Member Posts: 108
    There is a great Jumping tutorial in Photics' unofficial textbook.

    Basically he uses an Accelerate upward for a split second.

    Set a Timer for something like 0.1 seconds and check Run to Completion
    Then add an Accelerate Behavior to the timer for 90 degrees relative to Scene. You can play with the acceleration but the demo is set to 4000. Of course, if Gravity is too strong the actor wont' jump very high OR if it's too low he'll likely fly off the screen.

    The point is you'll have to adjust the value to match your scene.

    Good luck!

    CJM
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    I mention this every few days when someone asks this question

    There is a jump demo on my wall
    Noone ever says anything though lol

    It is based off the idea of the actor always having acc going down.

    If you are building a platformer you will find out really quick scene gravity is a pain.
  • millerbrother1millerbrother1 Member Posts: 108
    Sweet, James. That's an interesting concept! i'll have to try that out.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    I actually stole the concept from fmg

    But using scene gravity just doesn't work unless you are going for little big planet.

    In short a moving platform or anything like that would be a nightmare.

    Us in the old days of platformers there weren't physics engines so it's more accurate without gravity
  • juzcookjuzcook Member Posts: 259
    Thanks guys, I've managed to get a pretty reasonable system down. Well good enough for myself to demo with for the time being anyway. I checked out your jump demo (the car one) and got the idea into my head. Now I still have the double jump problem, but I've removed the floating and (which popped up when I was testing it out) floating when walking off a cliff. When I come back to it at a later stage I'm hoping to get the style of jump where the actor reaches a maximum height, and holds it for a split of a second to get that smooth polished feel to it. So if anyone can give me a hand with that, give me a yell. Still, I think there's lots to be learned to get that "perfect" jump.

    I actually already purchased Photic's book too which has helped me several times already!
  • gazjmgazjm Member Posts: 578
    I'm going to give this a try, at the moment I have a rule which every 0.01 adds 10 to self.position y, then when jump is 0, every 0.01 deducts 10 from self.position y. Works quite well but not ideal. So maybe this way will be better!
Sign In or Register to comment.