Enemy path image files are needlessly gigantic. Use svg instead of png.
Opened this issue · 1 comments
You are using 1500x1500 png files to generate the paths. THAT'S HUGE!!!
Not only is it a large image in terms of the number of pixels used in the image, but png24 is also a lossless image format so there is no compression being applied to the image making the file size of the image far heavier than if you used a jpg.
On a slow connection that takes forever for the path to download and you can't do anything until the path has finished downloading.
This is also terrible if you're using mobile data to play the game. By the time you get to the end of the game you have used up a massive chunk of your mobile data allowance without even realising it.
The much more sensible option would be to use svg files to generate the paths instead. The path images are very simple graphics so they would be pretty easy to turn into svg files.
An svg file can scale to any pixel size without losing image quality and it has a tiny file size making it the perfect file format for those background paths.
Svg doesn't work in IE8 & 9 but neither does flexbox so your game would be broken in IE8 & 9 anyway.
This is great — thanks for the heads up. I'll get it on this real soon.