Do you use jump (or other) buffers?

Discussion in 'Game Design, Development And Publishing' started by Walky, Jun 23, 2019.

  1. Walky

    Walky Member

    Joined:
    Oct 13, 2018
    Posts:
    85
    Do you include one of the following "jump buffers" (or whatever you call them) in your games?:
    - "ledge" buffer (a few frames to jump after falling off a ledge).
    - "bounce" buffer (you jump again immediately after reaching the floor if you pressed the jump button when falling).

    For my current WIP game I'm using a 6-frame ledge buffer (60 fps), anything else feels slightly off (of course, YMMV since it depends on the playable character's speed, hitbox, etc). Haven't implemented a bounce buffer yet but I'm tempted to do so (probably limited to just a few frames).

    Are you using other kind of buffers too? (not necessarily related to jumping).
     
  2. Khao

    Khao Member

    Joined:
    Jun 22, 2016
    Posts:
    146
    I use buffers for just about everything. I use 10 frames (60fps) for most of them.

    All my actions have a condition that looks somewhat like this:

    Code:
    if ((button_check_pressed || active_buffer > 0) && (state == "something"))
    {
        //perform action
    }
    else if (button_check_pressed)
    {
        active_buffer = 10
    }
    
    Sooooo if you press the button, but the player is not currently in the right state, the "active_buffer" is set to 10 and then decreased by 1 each step. So then, if the player enters the right state within 10 frames, the action will be performed automatically.

    I have "active_buffer" variables for all my actions. Jumping, attacking, using special moves, shooting. If it has its own input, it gets a buffer. If the player is using a special move and inputs an attack, the character will attack if it goes back to its idle state within 10 frames. It also applies for things like hit-stop (when the character briefly freezes in place when successfully striking something with an attack). If I didn't have this buffer system, all inputs would basically be skipped during that hit-stop phase, which would just feel unresponsive.

    Also worth mentioning that my game sometimes has dramatic slow-motion for certain kinds of stuff. Slow-motion extends the buffer. So the value at which the "active_buffer" is decreased each step is multiplied by the current speed of the game (and also by delta time, but that's another story altogether!)

    Decided to do that because it's possible that the player presses something within the 10 frames that their action is going to end, but then the game goes into slow-motion right after, meaning their action would get skipped anyway.

    Oh and also, I'm most likely gonna make it so the buffer can be actually defined by the each player and saved to a profile (along their controls and stuff like that). So if a player doesn't like buffers they can turn it off entirely, or adjust the timing to their liking.
     
    Last edited: Jun 23, 2019
    Phil Strahl and Walky like this.
  3. sitebender

    sitebender Member

    Joined:
    Sep 13, 2016
    Posts:
    777
    I prefer not to... but then my artists make me. I'm fine with pressing a button on solid ground to jump, but apparently other people have issues with it, they push it too soon. Chances are the games are better for it. Some poorly programmed games will keep jumping when you hold the jump button and touch a solid. I say poorly programmed, but I remember reading that's how the pogo for Duck Tales was invented and later refined.
     
    Walky likes this.
  4. Khao

    Khao Member

    Joined:
    Jun 22, 2016
    Posts:
    146
    Now that's annoying. If I press the button once, I should jump once. I've played some games that keep you jumping when holding the button, and they have an aggressive buffer system. It just leads to making extra jumps when you don't want. Sometimes it just feels good to hold the button throughout your jump if you don't have anything else to press at the moment.

    Buffers are good, but they can definitely be overdone.
     
  5. BattleRifle BR55

    BattleRifle BR55 Member

    Joined:
    Jun 24, 2016
    Posts:
    954
    I'm always experimenting with the range of a slight buffer, but my game is an FPS with some advanced movement, so you can't always judge where exactly the edge of a platform is, especially in the heat of battle. The thing I like about such buffers is that it doesn't make the edges of platforms feel like places to avoid because of the potential to accidentally fall off, leading to more movement into such zones rather than avoiding them unless necessary.
     
  6. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,460
    I specifically input buffer holding the jump button, so you can press it early and still jump, but need to release it to be able to jump again. (And I also ALWAYS use variable jumping, where releasing the button in mid-air will reduce your vertical speed if you're still moving upwards). Not having these things just makes your game feel stiff, the kind of subtle thing a player will get annoyed at but not really be able to place. I've started using coyote frames (allowing jumping for a bit even if the player runs off an edge) recently, but I'm not really a huge believer in them (I prefer having more forgiving hitboxes than the sprites suggest, and also designing my levels so that you never need to make the longest possible jump).
     
    Phil Strahl likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice