Skip to content

Animation gap#625

Open
Hades948 wants to merge 3 commits into
StarArawn:mainfrom
Hades948:animation_gap
Open

Animation gap#625
Hades948 wants to merge 3 commits into
StarArawn:mainfrom
Hades948:animation_gap

Conversation

@Hades948
Copy link
Copy Markdown

Implements part of a fix to #432 by allowing a gap/stride to be specified when creating an AnimatedTile. This gap is used in the shader to determine the index of the tile to use. For example, some AnimatedTile { start: 5, end: 13, gap: 2 } would represent an animation using indices 5, 7, 9, 11, and 13. This allows for more flexibility in the types of tileset animations that we can support.

The added example demonstrates how one might use this feature to add animated tiles that are larger than just one tile. Another benefit is animated terrains where, for example, the water level might change as part of an animation but the tileset creator has (reasonably) chosen to group the terrain by animation stage rather than each tile back-to-back.

@Hades948 Hades948 marked this pull request as ready for review September 19, 2025 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant