Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Jumping on and off of ladders in a general platformer engine?

Discussion in 'Game Design' started by JoeStrout, Aug 11, 2019.

  1. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,056
    I'm making a general platformer character controller (for use with Mini Micro). I have running and jumping working great, and very configurable. Now I want to add ladders.

    upload_2019-8-10_18-18-30.png
    Climbing up/down ladders is obvious enough, but how should ladders interact with jumping?
    • If you're jumping sideways and encounter a ladder, should you automatically grab it? Grab it only if you push up/down (the climb controls)? Or fly right past it no matter what?
    • Once on a ladder, should you be able to jump off?
    My intuition is, grab a ladder in the air only if you push up or down, and let you jump off — either straight, if you're not pushing the left/right keys, or at an angle if you are. Normally I would have the left/right keys do nothing on a ladder, but I guess that's another issue —
    • Do you think you should be able to walk right off a ladder by pressing left/right?
    If there's substantial disagreement on any of these points, I'll try to make them configurable. But if not, then I'd rather keep it simple and standardized. All opinions welcome!
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,277
    My favorite platformer games were the Commander Keen 4 through 6 games and they all behave the way.

    That said they had poles rather than ladders which you can't stand on. You could shoot in a direction of your choosing.
     
    Last edited: Aug 14, 2019 at 9:43 PM
    Martin_H and JoeStrout like this.
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,506
    First, I think it's great that you're making a platformer for Mini Micro!

    There are fairly standard conventions for platformer controls. I think it's a good idea to stick with conventions, which just so happen to line up with your intutions:
    • Jumping sideways into a ladder: Grab if you push up/down; otherwise fly past.
    • No exiting a ladder by pressing left/right. Exit only by jumping or reaching top/bottom.
    • Point of divergence: In movement-oriented platformers, no shooting from ladders. In shooting-oriented platformers, shooting from ladders is allowed.
     
    Lurking-Ninja, Martin_H and JoeStrout like this.
  4. TenKHoursDev

    TenKHoursDev

    Joined:
    Nov 9, 2014
    Posts:
    1,040
    I would begin by testing for "intuitiveness" but I do think jumping off ladders by pressing left/right could be too prone to error depending on your game and its environment.

    If you're climbing and above something dangerous it would be bad if you accidentally hit the left/right key and fell off to your death. Perhaps add significant ground-free controls to your character? I mean if you do this you may want to correct your fall by pressing the opposite direction back to the nearby ladder (or another ladder).

    Freedom of movement is important in a game and we know Nintendo knows that to enormous success. Games like Arma are very restrictive in their movement, but that's because they're realistic mil-sims. I mean you can't even jump and if you fall off a ladder you break your legs.

    Another idea might be to let the player "powerslide" down the ladder. Ie. grab the sides and slide down the pole like firemen when getting into a fire engine from their loft. A firepole could be an interesting environmental object too, your character might spin around it as he descends boosting your game feel.
     
  5. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    2,605
    YES, YES, and YES!!!

    Ladders and stairs in 2d platformers were horrible for the longest time and acted as an encumbrance. NO ONE misses those days.

    The only suggestion I would make is if you press left or right to leave the ladder, add a time delay so that you have to hold down the button for something like 0.2 seconds. Then when the character moves off the ladder, pop them over to the position that they would have moved to with the momentum they would have had if they started moving the second the button was pressed.

    That way people won't bump off the ladder by mistake, and the player still gets relatively the same control.

    Also, only make them grab the ladder mid air if they press up, not down.

    Also, also, don't make it configurable. Make a design choice and stick to it.

    Give me a pm if you'd like some play testing.
     
    Lime_x likes this.
  6. TenKHoursDev

    TenKHoursDev

    Joined:
    Nov 9, 2014
    Posts:
    1,040
    @Not_Sure I was gonna mention the same thing about the time delay. Great minds think alike? :p
     
  7. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,056
    That's an interesting idea. But my current prototype has left/right ignored on their own; you have to press the jump key to actually exit the ladder (in the middle). Seems good to me: not likely to be hit accidentally, but easy and intuitive when it's what you're trying to do. Any objections?

    OK, why? I hesitated on this one but in the end supported both. If my objective is to jump onto that ladder and quickly climb down, I'd much rather do that by pressing down while in the air than by pressing up, waiting until I'm on the ladder, and then switching to down.

    Ah, well if I were making a game I would agree. But I'm not; I'm making a controller for use by other game developers (think of it as a game kit). So some design decisions are not mine to make.

    On the other hand, if there's a clear winner that at least 90% of designers will be happy with, I'll just leave it at that (developers can always override certain methods, or just copy & edit my code to get different behavior if they really need to).

    Thanks! I'll have a prototype available with Mini Micro version 0.6, which I really hope to post in about a week or so.
     
  8. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    619
    I think you should take cues from whatever your favorite games that includes such a mechanic does, as well as considering the type of feel you want. The most obvious example I can think of is Mario. He can jump over a vine, and will grab it as soon as you press up, then you stick on it until you jump off.