-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 Tileset Atlas #4166
base: master
Are you sure you want to change the base?
Conversation
This sounds like a partial implementation of the Tile Atlas concept discussed in #2863? Image rects were added as a first step towards this. You may want to see the discussion there about why this should probably be a separate tileset type rather than just extending image rects to "Based on Tileset Image" tilesets. |
Looking through it, yea. Even though I think you are overcomplicating it a bit there with the off-grid tiles like the 16x19 example there as that one also fits in 16x32 so the grid display can always just remain in the regular baseline grid set on the tileset, so dont think new view is even needed. New tileset type, I guess the benefit would be to just inherently save all the image recs instead of saving just the custom ones? which means image recs would be able to also get removed (which would be ideal for merging tiles, which is the feature im trying to replicate here from godot and I think godot mostly works like that anyway, and I think you are also talking about ending on something like that eventually). |
Ok got some progress done, I for now added boolean "atlas" on the tileset and adjusted how everything is rendered when set to atlas (grid is no longer used at all and every image rect is drawn directly, and indexAt also uses image rects for resolving tiles they are clicking on). Also added ability to delete tiles, add and merge is something I want to look at next after resolving some rendering quirks this still has |
0e7a8cd
to
ccf6221
Compare
I think as far as functionality goes i think i have most of stuff working properly now Issues:
|
Ok got merging and everything else done, for now in Rearrange Tiles mode:
|
9a0e2c7
to
750233b
Compare
f89c64e
to
5a8ab44
Compare
Ok I think this is now properly ready for review, I was doing some testing since yesterday and I think i fixed everything I found and im happy with the implementation. I did not adjusted documentation or stuff like python bindings etc, I think that can be done as finishing touches after this is reviewed and if the implementation even makes sense (I tried my best but I was not familiar with Tiled codebase at all until I started working on this PR). |
5a8ab44
to
f0ded07
Compare
51d5023
to
eba4409
Compare
Added support for corner resizing as well, with left click drag on existing tile near corners EDIT: Also added support for proper snapping with spacing and margin |
77a6852
to
be1a23b
Compare
Signed-off-by: Tomas Slusny <[email protected]>
e2eabcb
to
30b79b4
Compare
Signed-off-by: Tomas Slusny <[email protected]>
c4f78f5
to
c4d00a1
Compare
Signed-off-by: Tomas Slusny <[email protected]>
c4d00a1
to
85752ea
Compare
Signed-off-by: Tomas Slusny <[email protected]>
39e4f8e
to
ad5a64f
Compare
Signed-off-by: Tomas Slusny <[email protected]>
ad5a64f
to
7638cf4
Compare
Signed-off-by: Tomas Slusny <[email protected]>
Signed-off-by: Tomas Slusny <[email protected]>
c2674d8
to
600b5bc
Compare
Image collections work in same way so make sure the behaviour is consistent and functional Signed-off-by: Tomas Slusny <[email protected]>
Useful for y-sorting, multi tile objects, base tile images changing, etc.
For controls, go to rearrange tiles mode:
Closes #1008