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

Same tile ids with different tile size in tile_config.json cause problems with rendering #48819

Closed
olanti-p opened this issue May 10, 2021 · 6 comments
Labels
SDL: Tiles / Sound Tiles visual interface and sounds.

Comments

@olanti-p
Copy link
Contributor

olanti-p commented May 10, 2021

Describe the bug

Same tile ids with different tile size in tile_config.json cause problems with rendering.
As an example, ChestHole16 tileset which defines trees first as 16x16 tiles, then again as 32x40 tiles.

Steps To Reproduce

  1. Switch to ChestHole16
  2. Enter a forest

image

Expected behavior

The game either produces debug message on load, or overwrites such tiles in consistent manner.

In case of ChestHole16, one of the options of how trees should look is:
image
This screenshot was done after I removed 16x16 t_tree_maple* definitions from gfx/ChestHole16Tileset/tile_config.json.

Versions and configuration

272a1d4 (Experimental build 18)

@Fris0uman
Copy link
Contributor

Having two sprites of different size for the same entity makes no sense right? So it's just a matter of choosing big or small trees and removing the other one. I've had this problem a lot with Chibi Ultica and a little bit initially with MSX but sorting the sprites properly fixed it.

@olanti-p
Copy link
Contributor Author

olanti-p commented May 10, 2021

I've had this problem a lot with Chibi Ultica and a little bit initially with MSX

As this is a recurring problem (and one that may be affecting other tilesets in this repo right now), some kind of automated solution could be useful (edited in some suggestions in "Expected behavior").

@Fris0uman
Copy link
Contributor

right so chosing the biggest prite by default and maybe reporting an error could be nice. No idea how feasable it is though.

@Maleclypse Maleclypse added the SDL: Tiles / Sound Tiles visual interface and sounds. label May 10, 2021
olanti-p added a commit to olanti-p/Cataclysm-BN that referenced this issue May 10, 2021
Workaround for tiles with same ids and
different sizes causing rendering issues
CleverRaven/Cataclysm-DDA#48819
@olanti-p
Copy link
Contributor Author

This may have same root cause as #45563, as sprites with same ID no longer get overwritten after #44917:
https://github.com/CleverRaven/Cataclysm-DDA/pull/44917/files#diff-c8561880131eb6314d85f58032f9063284bcfc226b75b3b5df585dcaa219605cL238-R257

@Fris0uman
Copy link
Contributor

#51080 Probably fixed this

@anothersimulacrum
Copy link
Member

Will close until a report there is an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDL: Tiles / Sound Tiles visual interface and sounds.
Projects
None yet
Development

No branches or pull requests

4 participants