-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow bird wings to glide #70443
Allow bird wings to glide #70443
Conversation
This sounds extremely cool. I will note this should probably have some sort of interaction with the light/hollow bones mutations. Maybe a prerequisite to gliding, and otherwise you just get fall damage reduction? Less distance traveled per level dropped? |
Hollow bones will definitely be a prerequisite. |
There's currently a telekinetic power called Slowfall that would be the most obvious beneficiary of these changes. The thing I can think of are that it would be nice to have the ability to either glide or retain the old behavior of falling straight down (depending on how the psion wants to control their descent). Flight (horizontally) is already handled through the LEVITATION flag, and there are various ways to make sure powers cause lower or no damage on falls already. |
Cool cool. I'll check out Levitation and make sure gliding feels distinct enough from it. As for falling straight down, you can choose to do that just like before when you examine the ledge. I'll leave functionality for 0 damage falls in so the mods can continue to work as before even if the base game mutations work differently. |
Levitation behaves a bit strangely at the moment. You may want to look at #70207 for some pitfalls to avoid - for example, I don't think we want gliding through the air to become super slow if you try to do it with broken legs or while crouching. My immediate thought for additional use cases were hang gliders and wingsuits, but after a modicum of research I have discovered that hang gliders are huge and that you can't actually land in a wingsuit (they have parachutes), so I don't think they're real candidates. |
Summary
Features "Allow bird wings to glide"
Purpose of change
We have bird mutants. The bird mutants have wings. We have Z levels. The wings should, logically, have some interesting interaction with this feature.
There are a number of factors standing in the way of self-powered flight for a mutant survivor, the main one being that keeping a human body in the air would require something like a seven meter wingspan, to say nothing of other physiological changes involved, and at the very least would completely cost you the use of your arms. Playing a survivor with no arms would at present lock you out of most of the content in the game, so it doesn't seem worth implementing. On top of that it would be pretty difficult (for me) to code realistic flight as opposed to just walking around in the sky.
Bird wings already allowed players to negate all fall damage, but they were doing so by falling down in a straight line. This is not how wings work. This PR addresses both issues by instead making wings into a tool for gliding, which will allow unburdened survivors with free hands to glide forward a short distance as they fall.
Describe the solution
THE BIRD WINGS MUTATION
GLIDING
FALL DAMAGE
THE INSECT WINGS MUTATION
Describe alternatives you've considered
I have plans for bat wings which are beyond the scope of this PR. That being the case, they'll be left as-is for now.
I'm wondering if we can apply this code to implement parachutes. My thinking is that a parachute would require a very high altitude to work, maybe our maximum z level and one or two below that, and you'd move forward a lot less and get blown around by the wind quite a bit more.
Testing
Ongoing
Additional context
Here's a brief demo of it being run on a custom mutant type. Pretend this dude is a bird:
https://www.youtube.com/watch?v=3_5ygmuel9A
I'm interested in hearing from modders about anything you might want out of the core gliding framework. I'd like it to be something that could easily be carried over to MoM or Magiclysm so you can have levitation and flight spells, and I'll try to make sure that functionality is available to you in the most open-ended way I can manage.