-
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
Add support for running and smashing animations #65622
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 failing test about grab break probability in a rather specific scenario. Similar tests pass. Unlikely to be related. |
Rewryte
added a commit
to Rewryte/Cataclysm-DDA
that referenced
this pull request
May 13, 2023
Changing to c_black will prevent explosion sprites used as a fallback, assuming CleverRaven#65622 gets merged.
dseguin
pushed a commit
that referenced
this pull request
May 19, 2023
* added mechanic * astyle * fixed text and move calculation * scent movement changes * add last known position * astyle * separate function * enforce z-level * astyle * remove unused * redundant param * refine scent code * smell_threshold wander * add field processor * increase effect duration * function refresh duration * attack air mechanic * hit calls function * change declaration type * move reapply code to on_hit * npc support moved stumble_invis and attack_air functions from the monster class to the creature class * rename param * missing checks for attacking air * astyle * attack air for npc * clang-tidy * fix npc ignore invis * astyle * unused decs * clean up attack_air * animate attack_air * prevent fallback Changing to c_black will prevent explosion sprites used as a fallback, assuming #65622 gets merged. * check anim setting * missing include
This was referenced Jul 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
[C++]
Changes (can be) made in C++. Previously named `Code`
<Documentation>
Design documents, internal info, guides and help.
<Enhancement / Feature>
New features, or enhancements on existing
json-styled
JSON lint passed, label assigned by github actions
[Markdown]
Markdown issues and PRs
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Features "Add support for running and smashing animations"
Purpose of change
Certain actions could benefit from some extra animations for improved reactivity. Sprinting and smashing are some of those.
Describe the solution
Adds new sprite IDs which allow tilesets to assign sprites for a motion trail when a character is running, as well as for various smashing animations. Sprinting animations are available in 8 directions, while smashing animations come in ineffective smashing, effective smashing, and complete smashing (destruction).
Tileset makers have full control on how these are used. For example, you could reuse 3 sprites between the 8 sprinting directions, show cracks for effective smashing, and no sprite at all for ineffective smashing.
This modifies the function cata_tiles::draw_custom_explosion_frame, which normally falls back to 3 explosion sprites determined by nc_color if the target sprite is missing. It now supports nc_black which will result in no fallback image. This adds some flexibility for more custom animations in the future.
Describe alternatives you've considered
Testing
The video below shows these animations at work using ChibiUltica as the tileset. "fd_smoke" is used for both sprinting and smashing destruction, while "crack_glass_center_tall" is used for effective smashing.
test.mp4
Additional context
The new sprite IDs can be found in TILESET.md under Hardcoded IDs.