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

Support Tilesets Type: Collection of Images #269

Open
TheRamenChef opened this issue May 31, 2019 · 5 comments
Open

Support Tilesets Type: Collection of Images #269

TheRamenChef opened this issue May 31, 2019 · 5 comments
Assignees
Labels
feature tmx our specification of the Tiled map format.

Comments

@TheRamenChef
Copy link
Collaborator

Now that tilesets can have a null image (such as if the tileset is sourced via a collection of images rather than one image), code should be prepared to handle it. This means that the spritesheet returned by getSpritesheet could potentially be null. I've (hopefully) fixed this in the main engine, but I think it will still happen in UtiLITI. Can a collaborator more versed with the tool fix it?

@steffen-wilke
Copy link
Contributor

@TheRamenChef Could you please point me towards the commits that changed this or maybe provide sample data to test this? I'm not 100% sure what I should look for.

@TheRamenChef
Copy link
Collaborator Author

One of the changes in #243 (specifically,
0f5c09b) was adding support for tilesets with individual images for each tile. I recently found NullPointerExceptions it was causing, and fixed them, but they could still happen with UtiLITI, and I'm not very familiar with the tool.

I've attached some demo tilesets to this comment. Both Tiled and the rest of the engine can open it just fine, but if there's actually an issue here, UtiLITI will spit out errors.

demo.zip

@steffen-wilke steffen-wilke changed the title Potential NullPointerExceptions in UtiLITI Tilesets with per-tile images cause NullPointerExceptions in utiLITI Jul 12, 2019
@steffen-wilke
Copy link
Contributor

Also reported in this forum discussion

per-tile-image-issue.zip

@steffen-wilke steffen-wilke added this to the v0.4.18-alpha milestone Jul 12, 2019
@steffen-wilke
Copy link
Contributor

I think this requires some bigger changes in the engine and the editor. Tilesets with multiple images were not a thing for the engine before these changes. For now I would say: Tilests with Collection of Images are still not really supported by the engine.
The engine's understanding of Spritesheets, Tilesets and Image resources doesn't really match the concept of tilesets that are "just a collection of images". In Tiled these images can vary both in size and dimension so these collections are not like the "normal" tilesets at all. They need to be treated differently and the resulting tiles are used differently as in: they just have a "starting-tile" and are rendered from that position instead of the map having the tile information on each actual tile on the grid.

Of course, there is the simple case where each individual image just matches the tile dimensions of the map and everything works like in a "normal" tileset.

I think we need to get back on the drawing board with this and think about a proper concept to support this functionality with each facade it brings. And of course, the editor and its resource management play a big role in this, too. I like the concepts of the engine to be consistent but right now the support for Tilesets based on a collection of images doesn't match other concepts of the engine, so we need to rethink stuff.

@steffen-wilke steffen-wilke added feature and removed bug labels Jul 25, 2019
@steffen-wilke steffen-wilke changed the title Tilesets with per-tile images cause NullPointerExceptions in utiLITI Support Tilesets Type: Collection of Images Jul 25, 2019
@steffen-wilke steffen-wilke added the MAJOR This label is intended to distinguish major features from all the others. label Jul 25, 2019
@steffen-wilke
Copy link
Contributor

Also reported in this forum post

@steffen-wilke steffen-wilke removed this from the v0.5.0-beta milestone Nov 26, 2020
@nightm4re94 nightm4re94 added tmx our specification of the Tiled map format. and removed tool: utiLITI MAJOR This label is intended to distinguish major features from all the others. labels Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature tmx our specification of the Tiled map format.
Projects
None yet
Development

No branches or pull requests

3 participants