Gravity Mario Example

  • <img src="http://www.scirra.com/arcade/images/4181/game-medium.png" border="0">

    I created an example game using Mario as a base. It shows how to set up different gravities, platform behavior, and even really simple enemy AI.

    You can play it here: Gravity Mario

    You can download the capx file and learn from it here: datafilehost.com/download-694a819f.html

    I hope this example is helpful, and I would love to hear any feed back or critiques! Enjoy <img src="smileys/smiley16.gif" border="0" align="middle">

  • GTGJon

    Thanks a lot for this!

  • Tedg

    You're welcome! ^_^

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm trying to emulate the side scrolling Mario games as best I can and the difficulty that I'm encountering is how to mimic the jump control. In the real Mario games, the long you hold down the button, the higher he jumps. I see you didn't bother to incorporate that into your game. I wonder if there are examples of someone doing that.

  • Just set a variable that increases each tick the jump button is held down, and if it gets to a certain value, make the jump go higher?

  • to simulate this kind of jump, when the player release the jump button I set the vectorY property of the platformer behavior to "vectorY / 2". It's perfectible because it's not very smooth but it's a good start

  • mimiste , That is a bad way of doing stuff ... I would recommend excal's way of doing it ...

  • why ? That's two different kind of jump. Excal's method is, if I understand, something like "you load the jump by pressing the button, and when you release it, you jump"

    Mine is "you press the button and jump instantly, when you release, you stop mid air and begin to fall"

    Both are good depending the kind of jump you want to give to your game

  • My way of doing stuff ... I guess ...

    Jump Stuff ... Er ... No name

  • In mine if you run he jumps higher, and that is how it was in Super Mario Bros. 3. I have it that he jumps quite low when not moving to a certain speed, and once he has accelerated to this speed his jump is increased.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)