Posting to help anyone who may run into the same problem described HERE, where the exported spritesheets ended up with different dimensions once uploaded to the server, causing distorted or broken visuals in the final build.
In my case, the issue was that the CDN was returning images that were smaller than a certain size limit (1600×1600, if I remember correctly). My game used spritesheets that were larger (2048×2048), and the CDN was automatically resizing them, which visually broke the project.
You can check whether this is the cause of your problem by doing the following:
- From the exported game folder, open your spritesheets in an image editor and check their pixel dimensions.
- With the game running on the server, open the browser’s developer tools (F12), go to the Network tab, reload the page, and select the spritesheet that corresponds to the one you checked in the previous step. If the dimensions don’t match, this is likely the issue.
If that’s the case, go to the CDN settings in your site’s dashboard and adjust the image-resizing options. If such options aren’t available, disable the CDN entirely.
I hope this helps.