Spritesheets with png or jpg, which is better?

I am optimizing my game loading speed, turns out jpg is a lot smaller than png file, but we could use png && spritesheet to minimize the requests count.
if the resolution is large, I guess jpg would be better.
what if it’s small pics? do I choose fewer requests or smaller filesize?

Fewer requests is generally preferable and should be quicker as you don’t have the latency costs of making separate requests.

You do have to balance it with how much you want to be loaded before the user can start playing and what you can load in the background while the user is busy.

Eg separating the resources by level (one sprite sheet per level) is most likely going to be better than having a giant spreadsheet for the whole game as the user won’t have to wait as long to download the assets needed to start playing.

For small images, you can have them on a single texture and use the sprite sheet tools to make separate sprite assets out of them.

thanks for the clarification :slight_smile:

13 posts were split to a new topic: Animated texture with cookie light