-
Notifications
You must be signed in to change notification settings - Fork 123
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
Corpse physics (faux-ragdoll) #30
Comments
This is not very easy to implement, if we want to keep the pixel art aesthetics. We would have to animate the ragdoll effects by hand, making it predetermined and, in essence, not ragdoll physics... |
Rag-doll is already a thing in DG, which seems to have found a pixel-friendly solution. It may well still be a complicated thing to do, but at least there’s promising prior art out there. |
Haven't seen how duck game does it but I'll check it out. Making skeletal animations with pixel art introduces all kinds of problems with the graphics, as can be seen, to some extent, when we rotate weapons (sub-pixels, aliasing etc) |
From what I can see, they just apply physics to the corpse sprites, without rag-doll physics (ie. no flailing limbs, etc.). This is not difficult to implement. Just add linear and angular momentum to the corpse. I can make a PR for this |
Aha, so I was just using the rag-doll term a bit too broadly. Renamed to the rather grim “Corpse physics” 😬💀 |
As was discussed on discord, Duck Game actually utilizes skeletal pixel animations. They seem, to me, to rely, firstly, on rotations in 90 deg steps, which mitigates the problems mentioned above, as well as procedural redraws of sprites, to mitigate the need for "rotated pixels" and other problems connected with rotational translation of low resolution bitmaps. |
I asked @TheFlyingFoool from DGR how this works in Duck Game.
|
We now have a "ragdoll" in the sense player is a dynamic body in rapier, but no joints on body or limbs, just a sprite change and single body. Experimenting if we want to move this forward into a real ragdoll, and what that means for us will be the next steps. Rapier has support for bodies with joints, can use their constructs for the physics side of this. The meat of the work is implementing a proof of concept for what we might want joints to be, and seeing what our options are in terms of splitting sprites. Duck Game has lower resolution / simpler assets than we do, so will have to see how things look with what we have. Best way to figure out if it works or not or path forward is probably to just prototype it. |
I'm happy to take this work when we decide it's our next priority, but if anyone wants to dig into this I'm also very happy to support with figuring out the rapier bits, point towards their API / where stuff may need to be hooked up in our code and discuss things we can try in more detail. |
Upon death, a character should turn into a limp rag doll. So instead of playing a full death animation, player death results in death-face combined with a ragdoll-drop in whichever direction the player character got pushed by a killing force.
This also has implications on our art assets. We’ll want our character assets divided up into a few different body parts that can flail around with the rag doll system.
Some deaths however have special outcomes (new issue coming). E.g. getting killed by curse has its own special animation & effects.
On manually activated rag doll: While this is a fun thing to play around with for advanced players, it doesn’t bring a whole lot to the core game experience. It’s also much harder to avoid all sorts of bugs/exploits if the rag doll state can be manually activated.
The text was updated successfully, but these errors were encountered: