Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

variable for accel/decel rates?

edited 2014 Dec 14 in General
I'm looking for a variable similar to player-move-speed, but I want to adjust the acceleration and deceleration rates of the character movement. I feel like I'm sliding around in these games more than agilely controlling the character. I don't see any variables that seem to control this.

Any ideas?


  • We don't have a variable for controlling the acceleration and deceleration.

    I just did a quick experiment to see what would happen if such a variable were introduced. Unfortunately, due to the simplicity of the Doom player movement physics model, adding this as a simple factor is not feasible. Setting aside the issues arising from backwards compatibility (maps assuming a certain movement is possible due to the friction characteristics) and changing the "vanilla feel" of player movement, the player movement code makes too many assumptions about how player momentum (magnitude of acceleration/deceleration) affects other things.

    The code has been implemented so that there is no difference between "internal" and "external" forces applied to the player. For instance, walking applies a force to the player mobj just like a barrel exploding next to the player would. Therefore, increasing walking acceleration necessitates also increasing friction, since it is applied uniformly to player movements regardless of where the force comes from. Increased friction drastically alters how the player moves on all surfaces, regardless of whether the player is trying to move or not.

    There are also other issues. For instance, the HUD weapon bobbing is dependent on momentum, so accelerating too fast would make it unnaturally jump to a maximum-bobbed position when starting to walk.

    In summary, changing the "sliding" aspect of the player movement will require implementing a significantly different basic physics model for player objects, where the player object is trying to reach a particular destination speed rather than being only subject to friction and thrust forces. In other words, modeling the movement less like a sliding cube and more like a humanoid with legs.
  • Interesting. Well, thanks for at least looking in to it.
Sign In or Register to comment.