Skip to content
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

feat: Expose atlas limits for TiledComponent #2701

Merged
merged 3 commits into from
Sep 1, 2023

Conversation

ufrshubham
Copy link
Collaborator

@ufrshubham ufrshubham commented Sep 1, 2023

Description

This PR add the ability for users to override the max size of TiledAtlas used by TiledComponent for packing all the images of all the tilesets used by a tilemap. The overrides can be used if one is sure that their target platform can handle huge textures.

It also adds an assert for cases when the RectangleBinPacker runs out of space. This is done to help users find the problem quickly.

Checklist

  • I have followed the [Contributor Guide] when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • [-] I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #2619

Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

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

Lgtm! Maybe a short note about it in the docs? :)

@ufrshubham
Copy link
Collaborator Author

Lgtm! Maybe a short note about it in the docs? :)

Sure, but I am a bit divided on where to put it. There are 2 places in the docs that talk about TiledComponent

@spydon
Copy link
Member

spydon commented Sep 1, 2023

Lgtm! Maybe a short note about it in the docs? :)

Sure, but I am a bit divided on where to put it. There are 2 places in the docs that talk about TiledComponent

* [Flame->Components->TiledComponent](https://docs.flame-engine.org/latest/flame/components.html#tiledcomponent)

* [Bridge Packages->flame_tiled](https://docs.flame-engine.org/latest/bridge_packages/flame_tiled/flame_tiled.html)

We should probably move all the components/tiledcomponent docs to the flame_tiled page, I think that is just left from before when there wasn't any bridge package section.

@ufrshubham
Copy link
Collaborator Author

We should probably move all the components/tiledcomponent docs to the flame_tiled page, I think that is just left from before when there wasn't any bridge package section.

Done. Moved out the TiledComponent section to flame_tiled and added a section about TileAtlas.

@spydon spydon merged commit 99a1016 into main Sep 1, 2023
8 checks passed
@spydon spydon deleted the devkage/rect-bin-packer-overrides branch September 1, 2023 17:51
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.

Strange overlapping issue with tilesets using flame_tiled
2 participants