Cataclysm-dda: Jumping/Gliding

Created on 8 Mar 2019  路  11Comments  路  Source: CleverRaven/Cataclysm-DDA

Is your feature request related to a problem? Please describe.
Roofs are now becoming a major feature in game, which begs the question: can I jump from rooftop to rooftop?

The answer currently is "no."
The answer, obviously, should be "yes but you'll probably fall and break your leg." Madness? This is CATACLYSM.

Describe the solution you'd like
Press a key followed by a directional arrow to make a directional jump. The distance is determined using formulae to follow. Long jumps may take more than a single turn to complete, in which case the player uses "pass turn" to keep moving similar to with a vehicle (and in which case there are some special controls to adjust glide trajectory, since those characters probably have wings)

Unfortunately there is no rational way to guess how far a person should be able to jump, as a square in cataclysm could be anywhere from 1m to 5m or something. So, I suggest just making it unlikely that "normal" players will go very far, but strong or fast ones might be able to bridge significant gaps.

My suggestions for how to calculate distance:

  • Squares jumped = 1 + ([strength+dexterity+RNG(0-10)]/25 squares, round down.
  • Sample results: With str/dex 8, minimum and average distance will be 1 square, but a 20% of the time a good roll will get you 2 squares. With each additional attribute point, you increase the chance of hitting the next square by 1/25 or 4%, so someone with str12/dex8 would have a roughly 1/3 chance of making a successful 2 square long jump from a standing start. By str18/dex12 the chance is something like 75%. Remember, this is from a standstill.

If you ran in the turn before jumping, your speed affects the distance.

  • Squares jumped = [2 + ([strength+dexterity+RNG(0-10)]/25)] * (speed/50) squares.
  • So, if you have the basic speed of 100, then if you ran last turn you can double your jump distance, so your average character will make it 2-3 squares most of the time with a 20% chance of going 4 squares. If slowed down, eg by weight, your jump distance drops. You always get a flat 1 square boost though, even if you're very slow.
  • Walking in the turn before jumping doesn't have a significant impact on jump distance in this model.

If you have any number of traits, especially parkour and wings, the distance would increase remarkably.

  • Parkour: Reduces chance of harm from falling, and increases distance by 25%, and lets you stop mid-jump (by pressing the jump key again) if you are going to overshoot (tumble).
  • Wings: Should depend on wing type. However, all wing mutations should at least double or triple your jump distance, and some of the largest ones (butterfly wings in particular) should potentially increase it huge amounts, x20 or more. Wings, like parkour, should allow you to stop mid-jump by pressing the jump key to land. Ideally they should also allow you to change direction using the movement keys.
  • Grappling hooks: Grappling hooks could potentially be used along with the same mechanic to form ziplines, which would work just like jumping except that you can travel however far the zipline is, by throwing the hook and having it connect to another roof/other elevated surface. Like parkour and wings, you should be able to press the Jump key anywhere along the zipline to let go and drop off.

Things that don't exist, but could affect this system:

  • Jumping legs: Not currently a thing afaik but grasshopper legs, frog legs, or rabbit legs could easily be a mutation. Plus, tentacles should probably limit jumping to "no frigging way bub"
  • Bionic legs and things: Why not?
  • Jetpacks: The sky is the limit bucko.

Describe alternatives you've considered
Not adding flight or jumping is not an option. Don't be silly.

(P3 - Medium) <Suggestion / Discussion> Mechanics Change Character / Player Z-levels

Most helpful comment

also, when 2 roofs are only 1 tile apart, could we re-purpose the "2x4 over pit" code to get a plank across the gap?

All 11 comments

grappling hook could play a new role here as well.

We could do vehicle roofs, so i can climb to the top of a house. ladders could be a thing. once z-levels gets implemented better, mountains could be a thing to glide off

Vehicle roofs seem like a difficult and awesome thing to add. Eventually vehicle z-levels will need to be possible.

Someone could start adding hills and mountains any time... although procedurally generating them would probably be better.

also, when 2 roofs are only 1 tile apart, could we re-purpose the "2x4 over pit" code to get a plank across the gap?

One more thing I already did in-game is jumping from one apt. tower roof to another on repurposed extended foldable bike. Can't say my survivor needed it much, it was more just about giving it a try. Looks like another cool thing to implement one day. Now vehicles behave weirdly in mid-air...

As for the wings, insect ones are described as very small and bat ones as useless. If this is to change they should also reduce falling damage. They currently don't. Also bird wings could probably more useful for gliding since they can support more weight.

Finally I can't well imagine my survivor in cargo pants, on rollerblades with two leg canteens, carrying a briefcase with 15kg junk inside, wearing unfolded solar backpack and weilding canning pot of clean water (24) jumping anywhere except down the roof. :) Well, at least you can throw some stuff from one roof to another to keep jumping useful

One more thing, instead of character speed running speed should be taken into account so that fleet-footed actually could help and running over wreckage doesn't. Being tiny with should help to keep you in the air, especially with wings, being huge not that much unless you have strength of a hulk

Didn't notice this since I've been away for awhile, but this may be worth looking into - https://github.com/CleverRaven/Cataclysm-DDA/pull/25582

25582 isn't any kind of starting point as it implemented "flight" as uniform motion in any direction plus unlimited hovering.

Some basic notes:
Unless gliding is involved, jumps would not have a duration greater than 1s. A horizontal leap with a duration over 1s would require a 2.5m vertical leap, which is well in excess of the world record. Even if that duration were exceeded, the lack of control would render the ability to "pass" a turn useless. Gliding or limited flight might justify some amount of midair control, but I'd consider that a fringe ability outside the scope of the core jumping feature.
The world record for an unladen long jump is ~9m. I believe it's reasonable to start there and work backwards, assessing various penalties along the way to come to some reasonable approximation of what a particular survivor is capable of.
I'd like to start by assuming that one square = 1m, if pertinent examples appear such as ability to jump across an alleyway or other obstacle, those can be considered as well.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Another interesting concept is https://en.wikipedia.org/wiki/Fierljeppen
Essentially pole vaulting over a gap, moving horizontally instead of vertically.
A quick look indicates that clearing a gap of 15m should be doable, which puts it well in range of crossing a two or even three lane road including sidewalks. This does require the distances to be skewed a bit since a dda road is 24 tiles wide including sidewalks, which if we assume tiles are 1m puts a dda road at a much greater width than a real road.

The ping reminds me that I should adjust this to use normal_rolls, athletics skill, and proficiencies

Was this page helpful?
0 / 5 - 0 ratings