Menu

#88 Add support for jumping

closed-fixed
nobody
None
5
2015-04-10
2013-12-03
No

Hi Andrey,

having played chocolate-strife for several hours, I felt like adding support for jumping to prboom-plus. It's bound to the same key as fly-up, but only works if the fly cheat is disabled. The actual value for mo->momz is taken from chocolate-strife. Jumping should probably be forbidden when recording demos and in certain compatibility modes, but I am not sure about that.

  • Fabian
1 Attachments

Discussion

  • Fabian Greffrath

    I have just checked in chocolate-hexen and it seems that Hexen uses a slightly different algorithm for jumping, introducing jumptics to force a short delay between jumps and setting momz to 9 * FRACUNIT instead of adding 8 * FRACUNIT.

     
  • Andrey Budko

    Andrey Budko - 2013-12-09

    Algorithm for jumping takes two lines of code, heh. I think it could be tweaked. For example you can't jump to plasma gun (in multiplayer) on map01 if you are standing closely to sector with it

     
  • Fabian Greffrath

    It just adds vertical momentum, the ballistic curve is calculated by the engine. You need to walk/run towards the plasma gun in map01 and then press jump in order to get it. That's how it works in Hexen/Strife as well, just try it out.

     
  • Fabian Greffrath

    Now I see your point, Andrey! In Hexen the player has some in-air control: In P_MovePlayer [p_user.c:204f] there is an "else"-branch to the "if (onground)" check that is missing in Doom and thus prboom-plus. It allows the user to gain some thrust while he is not on the ground, i.e. jumping or falling. Strife has similar code, but forbids side steps while in air.

    I think it would be possible to implement both jumping styles in prboom-plus and give the user a choice between them. In-air control should however get disabled during demo recording and playback!

     
  • Andrey Budko

    Andrey Budko - 2013-12-13

    In-air control should however get disabled during demo recording and playback!

    Why only this? Jump are not possible in Doom, so they should be disabled in any case.

     

    Last edit: Andrey Budko 2013-12-13
  • Fabian Greffrath

    Heh, the same is true for mouse look, crosshair and many of the other advanced features of prboom-plus.

    So, won't you accept a patch to enable jumping at all?

     
  • Andrey Budko

    Andrey Budko - 2013-12-13

    Mouse look, crosshair and many of the other advanced features are "visual" features and have no side effects. How you will play demo with jumps with previous version of prboom? Demos recording/playback is the reason why prboom/+ exists.

    I think I can add it with checking some new config variable which has no entry in GUI and with checking for demorecording of course.

     
  • Fabian Greffrath

    This draft introduces the movement_jumpstyle variable. If set to 1, the player jumps as in Hexen; if set to 2, the player jumps as in Strife. Most people will want the jumping as in Hexen (and in ZDoom), so I left the Strife option undocumented.

     

    Last edit: Fabian Greffrath 2013-12-13
  • Andrey Budko

    Andrey Budko - 2013-12-13

    now i can jump to plasma gun from closest position with both styles. it is ok, right?

     
  • Fabian Greffrath

    Yes, both styles allow for minimal in-air control and differ only in details.

     
  • Andrey Budko

    Andrey Budko - 2013-12-14

    Applied, thanks!

     
  • Andrey Budko

    Andrey Budko - 2013-12-14
    • status: open --> closed-fixed
     
  • Fabian Greffrath

    Great, thanks!

     

Log in to post a comment.

MongoDB Logo MongoDB