Image spritesheets vs separate files

0 favourites
  • 6 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • I noticed that when I export the project, all animation images are exported as separate files.

    I was under the impression that generally it is better to combine separate files into 1 sprite sheet where possible, especially for web content to reduce file size and HTTP requests. For example Google does this

    <img src="http://www.google.co.uk/images/nav_logo99.png" border="0" />

    So I was just curious as to why C2 doesn't do this. Is there a reason separate files are better for html5 games? Is this a planned feature?

  • It's a planned feature - it's simpler for the engine to use separate images for now.

    However it's not entirely straightforward if it saves you any download size. If you have a sprite sheet like that and a single 16x16 image makes it just over 256 color, you end up saving the entire sprite sheet as PNG-32 which can be 2-3 times larger. Otherwise C2 would've spotted it's a 256 color image and automatically recompressed to PNG-8.

    It's possible for C2 to work around that of course, but it's pretty complicated and in the mean time it's working fine soo....

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Cool, I was mostly just curious. I agree it's not a big deal. Thanks!

  • What about texture changes on WebGL case ? Having a lot of texture changes can be a great performance dropper.

  • As a webdesigner, i know that google do this to make the navigator downloads all the icons even if this icon isn't on the screen yet, so when the user interact with the icons it does not need to download the new icon that appear.

  • In webdesign, I don't think it's purely to do with pre-loading images. There's more than 1 way to do that, but with this method you also get other benefits eg

    "The conclusion is the same: Reducing the number of HTTP requests has the biggest impact on reducing response time and is often the easiest performance improvement to make."

    yuiblog.com/blog/2006/11/28/performance-research-part-1

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)