-
Notifications
You must be signed in to change notification settings - Fork 24
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
Layers are sometimes not rendered #387
Comments
It's possible this only happens for tilemaps with external tilesets. If I remember back to when I first noticed this, it was when I switched from embedded to external tilesets. I'm re-trying my repro now with embedded tilesets and I'm not seeing it happen... so I'll mention it here if I see otherwise. |
@mattjennings thanks for the issue! This is definitely bizarre I think your instinct that external tilesets might be related is on the mark. If so, this recent PR might have fixed the issue #380 I'll double check locally. If the tileset ever loaded out of order relative to their first gid it might present like this because it would select the wrong tileset for a tile potentially. |
I can reproduce the issue locally pretty consistently by swapping the order of the tilesets in the tmx Dropping my local build of |
Ah! Perhaps I didn't have it properly symlinked when I tried a local build... that would be embarassing 😬. If so, my apologies but I'm glad to see that it could already be fixed! |
I've noticed that vite pretty aggressively caches npm dependencies, I've had to manually clear the cache to see changes. I couldn't get I literally just found this article https://dev.to/hontas/using-vite-with-linked-dependencies-37n7 which suggests |
Mm yes, I have many (many) hours fiddling around with vite's Although I think that article has it backwards, or their scenario was unique, because |
Unfortunately I seem to be seeing this still (albeit less frequently - unless it's placebo). I haven't investigated further yet, just wanted to note that here for the meantime. |
@mattjennings I'll look into it. Same reproduction repo that you posted originally in this issue? If you catch the not loading again, I'd be curious about the order of the resources loaded in your network tab. Maybe there is still and order of operations issue? |
I haven't tried it with the repro again yet, just have seen it in my own projects. Don't worry about looking into it until I can repro it again as I feel like it might be even more random than before, but I'll keep an eye on the resource load order when I see it next! |
Sometimes a layer (or layers) in the tilemap will not get rendered when scene is initialized. It's seemingly completely random. I've got a video of it happening below, but it only happened twice in 1.5 minutes of me refreshing the page & clicking play:
CleanShot.2022-07-06.at.16.58.28-converted.mp4
I first noticed this in a larger project with multiple scenes and it was happening a bit more frequently. It seemed to be more likely to happen if I left the tab open for a long time between refreshes (i.e page reloads while I was making changes in my code editor before flipping back to the browser), but I have not been able to track down any specific cause.
There are no errors or warnings in console and the layer's image shows as loaded in the network tab, so as far as I can tell the image resource is properly loaded.
Steps to Reproduce
I've made a repro project here: https://github.com/mattjennings/excalibur-tiled-layer-bug
npm install
&npm run dev
Expected Result
All layers should render
Actual Result
Sometimes layers are missing
Environment
I had noticed #381 and hoped it would possibly be related to what I was seeing, so I tried a local build from source shortly after iti was merged but sadly it still occurred.
Current Workaround
None
The text was updated successfully, but these errors were encountered: