Discussions

SmileBASIC Community

Phoenix B)epicphoenix4

02/17/2016 5:59 PM ·Spoilers

Open Closed

How 2 Platform.

How do I make platformer physics? All i need is how to jump.

Advertisement

Comment

This post has no comments.

  • Zee

    02/17/2016 9:30 PM ·Spoilers

    Well what I like to do is have a "gravity" variable to calculate upwards force. So when you hit "a" gravity is set to 5 or so. Then every frame you go up 5, but each frame that you're not on the ground, gravity goes down .2 or so down into the negatives. It requires ground detection, and idk the best way to do that.

    Yeahs0
    Played
  • Ah.

    Yeahs0
    Played
  • you must have velocity variables for the character and use those to move it by adding them to the coordinates every tick. Don´t forget to add friction to it or you´ll end up with sonic.. xD Make a Def called FRICTION FRIC=blabla DEF FRICTION IF PLAYERXVEL>FRIC THEN PLAYERXVEL=PLAYERXVEL-FRIC ELSE PLAYERXVEL=0 END END call FRICTION every tick then

    Yeahs0
  • cool cool.

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-BXM-ZM99-HWC-UJPR

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: