Skip to content

add a helper function to create TilemapChunkTileData from Y-down tile data#24391

Open
hxYuki wants to merge 1 commit into
bevyengine:mainfrom
hxYuki:tile-helper
Open

add a helper function to create TilemapChunkTileData from Y-down tile data#24391
hxYuki wants to merge 1 commit into
bevyengine:mainfrom
hxYuki:tile-helper

Conversation

@hxYuki
Copy link
Copy Markdown
Contributor

@hxYuki hxYuki commented May 22, 2026

Objective

  • Add a helper function to import tiles in Y-down format.

Solution

  • Add TilemapChunkTileData::from_y_down_tiles
  • Add comment on TilemapChunkTileData to explain how the data is interpreted.

@kfc35 kfc35 added C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 23, 2026
Copy link
Copy Markdown
Contributor

@kfc35 kfc35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The math looks good although I think i stumbled myself upon the variable names for a little(“upper_start” is actually “earlier” in the data and corresponds to what will be the “higher indices” part of the resulting vec). I don’t have any suggestions in this realm, beyond maybe renaming or maybe adding a comment about the names.

I think to aid with comprehension and to ensure correctness, I would like a couple tests to be written (perhaps two tests with an even chunk_size.y and an odd chunk_size.y).

@kfc35 kfc35 added the D-Straightforward Simple bug fixes and API improvements, docs, test and examples label May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants