-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Animate tiles marked as animated in tile_config.json #40342
Conversation
Co-authored-by: Alexey Mostovoy <1931904+AMurkin@users.noreply.github.com>
How is this going to interact with the compose script? |
Tile information is preserved by the compose script, and this should apply to this new animated flag (as it does to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
could you explain this feature in TILESET.md please. |
Summary
SUMMARY: Infrastructure "Tile animations can be defined in tile_config.json files"
Purpose of change
Animations can add information and atmosphere to the game. Tiny lights can blink, enemies can sway, icons can hover. This change allows tilesets to specify looping animations for individual tiles that will play during the player's turn.
Describe the solution
Tileset maintainers mark tile definitions with
"animated": true
and specify fg/bg sprite lists, with weight being overloaded to indicate the number of frames, at a standard rate of 60fps (example below). The game reads the jsonanimated
property intotile_type
and uses the current time to determine which sprite image to render.Describe alternatives you've considered
Some tiles use fg/bg to display different images based on the tile's in-world position, rather than based on the time. For monsters, the icon is based on some identifier. We could introduce some sort of two-dimensional weighed list to handle animations for such tiles, but this can be a future project.
Testing
Format the single-line tile_config file for Ultimate, find the
t_console
entry, and replace with:Ensure animations are enabled. Find a console and confirm that its screen flickers. Must be a loose wire.