browser caching

Discussion in 'Game Development (Technical)' started by lennard, Feb 18, 2013.

  1. lennard

    Moderator Original Member Indie Author

    Jan 12, 2006
    Likes Received:
    So, after some reading I decided to take a pass on Starling and do the next game in HTML. It's (surprise) another financial strategy game so I don't need to have a gazillion sprites moving on the screen but hitting a lot of devices at once has high value to me.

    This AM I have a caching question:

    I have 32 property cards that are 300x300 pixels - would you store these in a single large sheet or as indvidual images? I'm leaning towards the latter for faster start up as I expect to eventually have an asynchronous loading scheme so that the game starts faster (with the expectation that all of these large jpg files will sit in cache).
  2. Stropp

    Stropp New Member

    Jun 25, 2008
    Likes Received:
    I think, I read it somewhere but I haven't tried it, the latest CSS allows you to have a single image with multiple embedded images and specify each as individual graphics objects.

    I was reading an article on optimising web pages and this was one of the points to help the page load faster. I'm not sure what happens if the image sheet is huge though, if the savings outweigh the extra loading time for a sizable file. You might want to do some testing on this.

    But if you use a lossy format like JPEG you might be able to make the file small enough, and if you set it to cache and use a CDN it would probably be worthwhile.

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer