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

Loading infinite maps in json will cause chunks to not be spaced correctly (1.1.2) #1878

Closed
GaryCXJk opened this issue Feb 9, 2018 · 3 comments
Labels
bug Broken behavior.

Comments

@GaryCXJk
Copy link

GaryCXJk commented Feb 9, 2018

How this issue can be reproduced

Create a map that's at least two chunks wide, then save the map. Now close said map, then re-open the map again.

What behavior you expected instead

Before reloading

What actually happened

After reloading

I assume this issue is caused by a slightly wrong calculation. It seems that chunks are spaced one chunk. The json file itself is fine, the chunks are properly defined and spaced, and when loaded in, for example, a game, the chunks do get placed correctly. It's just that reloading the maps causes the chunks to be spaced incorrectly.

@bjorn bjorn added the bug Broken behavior. label Feb 9, 2018
@bjorn
Copy link
Member

bjorn commented Feb 12, 2018

Arg, I really need to do more testing. I've pushed a fix to be included in Tiled 1.1.3, but in the meantime I would recommend using TMX format and only using JSON for export.

Thanks for reporting this issue!

@bjorn
Copy link
Member

bjorn commented Feb 12, 2018

Ah, also, this bug only affected the CSV format (which I think it why I didn't run into it while testing). So another possible workaround is to switch to base64 encoding of tile layer data (in the map properties).

@GaryCXJk
Copy link
Author

Well, it did give me a reason to implement the decoding of base64 encoded maps.

@bjorn bjorn closed this as completed in d875251 Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior.
Projects
None yet
Development

No branches or pull requests

2 participants