-
Notifications
You must be signed in to change notification settings - Fork 874
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
Large Tilemaps cut off Horizontally #4039
Comments
Hmmm.. I've now done a quick test on a linux mint boot disc with the loading the project, downloaded from this github issue, and it opens fine. Still shows the same problem. What version of GD5? |
I managed to open it, for some reason I had more than 10 gdevelop open and maybe that's why I couldn't load. Now with the tests in hand, yes, the same problem happens with your project. |
HUmm ~8000 pixels isn't within reason. |
Unless something has changed, tilemap objects aren't rendering a 2048px image (or shouldn't be). It is rendering dozens of smaller tiles. It was also implemented partially to help avoid the image limit. Also, this appears to be horizontal only, I can go thousands of pixels wide without issue, so I don't think it'd be related to the PixiJS/Electron image limit. Edit: Yeah, specifically PixiTilemap was updated in 2019 to avoid any PixiJS rendering limits: pixijs/tilemap#70, and since this was implemented in late 2020 into GDevelop, i'd think this wouldn't be related to the render limit. |
I've done more testing, it seems like this occurs if the rendered map size exceeds about 4million pixels total (even though the rendered map should actually be made up of smaller units) Looking at the issue I linked above, I'm wondering if somehow the maximum textures is set to 1 for this implementation, and the buffer is set too large? @blurymind Does this ring any bells? |
Actually the limit seems to be 2^14 = 16,384 tiles. I tried with 64x64 tiles and the limit is the same as for 16x16 tiles. The good news is that big tiles can be used without reaching the limit too fast. This is very probably a limitation from PIXI or its tile map extension. |
This doesn't seem to match up with what I'm finding. There are numerous threads from Pixi V5 with 500k tiles or more using pixi-tilemap: The tiles were limited to 16384 when it was in 16 bit indices. But looking at the implementation of 32 bit in 2020 should have resolved this, and looking at the extension it looks like we have 32 bit mode enabled? |
From what I can see, it looks like the compositing function may not be working correctly? https://github.com/pixijs/tilemap/blob/master/src/CompositeTilemap.ts
|
Describe the bug
When a tilemap is past a certain size, the map image will cut off horizontally both in the IDE and in previews. The map dimensions still render correctly in the IDE. This was reported by Discord member (78), and I was able to reproduce it.
To Reproduce
Steps to reproduce the behavior:
Attached is a project with both a horizontal and vertical map experiencing this issue.
TileMapCutoff.zip
Some examples:
Veritcal map in Tiled:
Vertical map in Editor (and preview):
Horizontal Map in Tiled:
Horizontal map in Editor (and preview):
Workaround:
You can split any map into ~4000x4000 smaller maps and create multiple tilemap objects, and it'll work fine. Based on how tilemaps work, this really shouldn't be required (Or should, I guess, be automated by the engine to split a larger map into smaller consumable maps).
Other details
The text was updated successfully, but these errors were encountered: