Results 1 to 2 of 2

Thread: browser caching

  1. #1




    Join Date
    Jan 2006
    Location
    Terrace, BC, Canada
    Posts
    2,240

    Default browser caching

    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. #2

    Join Date
    Jun 2008
    Location
    Adelaide, Australia
    Posts
    126

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •