nunziox Posted May 5, 2014 Share Posted May 5, 2014 I made my game in js using phaser.My game is wrapped into android app using the WebView, therefore all resources are stored in local. My question is:In term of performance the best solution is use bmp images (without compression) or jpeg images? Link to comment Share on other sites More sharing options...
rich Posted May 5, 2014 Share Posted May 5, 2014 In terms of performance BMP vs JPG won't make any difference at all. In terms of the amount of disk space used, BMP will be monstrous. clark 1 Link to comment Share on other sites More sharing options...
Ezelia Posted May 6, 2014 Share Posted May 6, 2014 you'll maybe gain a fraction of millisecond when drawing a BMP for the first time, as it don't need decompression .. that fraction of millisecond, is the one you loose when reading the BMP since it need more disk IO Massemassimo 1 Link to comment Share on other sites More sharing options...
lewster32 Posted May 6, 2014 Share Posted May 6, 2014 If you want the graphics to look sharp and not use up a ton of space, consider using PNG for your image resources. Almost all graphics programs can save as PNG and you can crunch them down even further by running them through http://tinypng.com/ Link to comment Share on other sites More sharing options...
uyerdna Posted May 6, 2014 Share Posted May 6, 2014 As far as I know, BMP is never a file format of choice to be used in games (at least not even one time in my years of coding games)One reason being BMP is like, well as Rich put it above, monstrous in terms of file size.With JPG, you can compress it down to Quality 5-6 and can still get away with a pretty decent resultIf your game is pixel-art style, you can try even lower quality to save more bytes Link to comment Share on other sites More sharing options...
nunziox Posted May 7, 2014 Author Share Posted May 7, 2014 Wow.!!! tinypng is very interesting !!! thanks to all for the responses! Link to comment Share on other sites More sharing options...
lewster32 Posted May 7, 2014 Share Posted May 7, 2014 If your game is pixel-art style, you can try even lower quality to save more bytes I strongly recommend you do not use JPEG for anything other than images with photographic origins (i.e. pictures of people, landscapes etc) and definitely do not use it for pixel art, as even at higher qualities it will introduce unwanted artifacts and noise around the edges of shapes and other high contrast areas. In nearly all cases PNG will be the best choice for assets, as it also allows for transparency - something JPEG does not support, and BMP has inconsistent support for. With the added step of running your assets through tinypng you will get a great combination of perfectly sharp and accurate assets with a small file size. jpdev 1 Link to comment Share on other sites More sharing options...
Recommended Posts