How do I create an SNES Mario World Slide?

0 favourites
  • 6 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hello! I have already created a slope object in my game and I was wondering if anyone knew a way that I could make something similar to this. Ideas?

  • Is your slope collision being done with a sprite object or the tilemap?

    If it's a sprite, is the collision poly sloped so that the sprite sits at angle 0? Or is it a box collision poly and you're rotating the sprite itself?

    Depending on how you're doing your slope, it will affect how to go about programming it.

  • Is your slope collision being done with a sprite object or the tilemap?

    If it's a sprite, is the collision poly sloped so that the sprite sits at angle 0? Or is it a box collision poly and you're rotating the sprite itself?

    Depending on how you're doing your slope, it will affect how to go about programming it.

    I'm using a tilemap, The slope tile has 3 polygon points forming a 45-degree angle. Thanks for your help!

  • The way I like to handle slopes using the tilemap, is to detect the specific tileID that my character is standing on. I check directly using XY coords converted to TileXY coords. Once you know the tile the character is standing on, you can program specific things to happen.

    If using the Platform Behaviour, you could then change values like:

    - acceleration/deceleration based on the playerDirection VS slopeDirection and slopeAngle

    - this can simulate fast decent downhill or slow climb uphill, kind of similar to ice physics

    - you can have different settings for if the player is trying to stand still VS trying to move

    - adding/subtracting with vectorXY (to "push" the player downhill)

    - the player may be trying to run uphill, but adding vectorValues will push them downhill at an amount related to the player's input

    - change GravityAngle

    - this can be tricky, as you've got to have collision boxes set up so they don't "catch" on each other

    - however if set up properly, this can reduce the need to fuss with vectorXY or accel/decel

    - or it could be as simple as you program a specific forcedControl when the player holds DOWN and the character is standing on the slope, like how the slide in Mega Man 3 works. It literally pushes you left or right, and stops when the slideTimer runs out AND Mega Man isn't in a single tile high passage, otherwise it keeps the slide going until he can stand up again.

    Not sure if any of this makes sense of not, if not then I can try to be more specific. Or if this brings up more questions, please feel free to ask.

  • Another option that just occurred to me MIGHT be to switch the character from Platform to Physics (have them both on the character and just toggle a boolean which switches between them) but you'll need to get the physics settings right, which will take experimenting.

    I have no idea if this would work or if it does, if it would be in the way you want, but it MAY be an option.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another option that just occurred to me MIGHT be to switch the character from Platform to Physics (have them both on the character and just toggle a boolean which switches between them) but you'll need to get the physics settings right, which will take experimenting.

    I have no idea if this would work or if it does, if it would be in the way you want, but it MAY be an option.

    Thanks for the help! I got it to work just the way I wanted it.

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