WebP image format, it's good for games?

Questions, comments and discussion about the Game Editor development.

WebP image format, it's good for games?

Postby alexwbc » Sat Mar 22, 2014 8:16 pm

https://developers.google.com/speed/webp/?csw=1
and
https://en.wikipedia.org/wiki/WebP

So far I know, WebP it's the only bitmap image format which support alpha channel as well lossy compression ala jpeg fashion (except for this one: http://pngmini.com/lossypng.html which doesn't seems to be png standard anyway). So I was wondering how would impact the gaming performances if this format would be used to render the videogame arts (spriters and such) if used directly into binary runtime?
For example... a loseless sprite with alpha channel would take lot of more memory... but will it require less cpu power to run?
User avatar
alexwbc
 
Posts: 15
Joined: Fri Feb 07, 2014 5:28 pm
Score: 0 Give a positive score

Re: WebP image format, it's good for games?

Postby DarkParadox » Sat Mar 22, 2014 10:40 pm

It's true WebP can be useful for games, but maybe not in the way you're thinking. Generally, a game engine will convert an image into a pixel-perfect format at some point before rendering it. For example, GE will convert any image you load into a .GED to it's own image format right away, and they stay uncompressed (that's one reason why GE has large file sizes on export). If you were to take advantage of the fact that WebP has a small file size, that would mean you would have to keep the original file data in RAM, and have the computer make sense of the data every time you wanted to draw it (for most things, that would be every frame). Combined with any other image processing, don't think it would be feasible to keep the compressed file in RAM and still have an intensive game draw smoothly, especially for WebP which seems to have a lot of steps to get the final viewable image.

However, that doesn't mean WebP wouldn't be useful for games. In my experience, I've seen quite a few games (especially on a file-size limited device like the older Nintendo DS and the 3DS, notably the new Fire Emblem: Awakening) use a lossy file format for image storage. On the disc or flash storage of these games, it's useful to just keep the file size down prior to loading it into a lossless screen-drawing format. WebP could be useful in this instance, because unlike JPEG it natively supports transparency in a lossy format, giving games that need to compress images more opportunities to do so.
User avatar
DarkParadox
 
Posts: 457
Joined: Mon Jan 08, 2007 11:32 pm
Location: USA, Florida.
Score: 84 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron