Sidescroller staircases (Similar to Castlevania)

1 favourites
  • 5 posts
From the Asset Store
59 unique spaceships created in pixel art style within 48 x 48 pixels. Great for creating side scroller shooter games.
  • Before I start, I have seen the tutorials on the site for staircases and neither really do what I am looking for.

    I'd like to have staircases that go from the platform level up to a jumpthru platform that gross across them. But I want to be able to walk past the stairs if the I don't hold up, or walk over the staid unless I hold down.

    If I do hold up or down while approaching the stairs I'd like it to be a smooth walking transition. So the players feet never leave the ground so a falling animation won't play. I have the base of the stairs working decently, but I can't seem to get the top of the stairs to work smoothly.

    The best example of this I can think of is Castlevania (although my game is not similar to it this is still how I want my stairs to work). Here's a video that sort of shows them if you are not familiar.

    Any help is greatly appreciated, thank you!


    There is a good explanation a few posts down. Basically, simple stairs are special case "tunnels" with two entrances. Normal movement mechanics would be turned off while inside the tunnel.

    Another post father down mentioned an interesting idea that caught my attention too: you can use an invisible floating "raft" platform to handle the up and down motion.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another idea would be to enable/disable the solid behavior for the stairs, and fall thru the floors. After a bit of head banging it works: ... airs2.capx

    The player is counting as falling even with slower speeds, but maybe the slopes are too steep. A solution to that is to only change the animation if the player is falling for a few frames.

  • Thanks, I will check out your cap as soon as I can. I experimented with disabling solids but I couldn't get it to work reliably.

  • Thanks R0J0hound , great work as always! This works way better than my implementation in one of my old projects. My method was based on pinning the player character to a sprite at either end of the staircase and moving the sprite towards the position of the other sprite, then unpinning the character and moving sprite back to it's initial position. That might work for an adventure game where it's ok for player character to be inactive during ascending/descending the staircase, but this method is clearly superior.

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