A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Dealing with large games & loading time

  1. #1

    Dealing with large games & loading time

    Ive been putting together a game that uses large, fully illustrated levels. I don't have all the assets ready yet, but from where it stands now I'm guessing the final game could add up to about 10mb. Im using gifs and trying to optimize in every way I can, but Im still concerned about the initial loading time.

    I was thinking could I load the backgrounds in a separate loading screen before each level (each level was going to have a 3-4 second introductory illustration anyways) but I have no idea how to do that.

    Am I worrying over nothing? Or is there some way I could better handle loading/optimization to reduce that initial time?

  2. #2
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    8-bit png's should compress better than gifs, grab a trial of Fireworks and do some tests.
    Maybe with some images you could get away with splitting them up, so the finer details are stored as a png, with the background as a jpg ( With de-blocking turned on in Flash ).
    Say for example you have an image of a village, with hills in the background, jpg the hills and add a low amount of blur, that'll hide your artefacts and give the impression of a depth of field effect.

    As for externally loading assets, the vast majority of portals expect a single file, which would mean hosting the assets yourself. That's a pain in that if your server is down the game is dead everywhere, plus if it really takes off you could be hit with bandwidth costs.
    Doing the actual loading / handling of the images is pretty straight forward, but unless you're just hosting the game yourself with no intention of spreading it, I'd keep that as a last resort.

    Squize.

  3. #3
    Ill try pngs, I had been using photoshop's save for web and devices but I can try fireworks if you think it can give a better result.

    If external assets are off the table, what about a dynamic load where some bigger stuff waits until you reach the appropriate level?

  4. #4
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    Yeah, it'll all stream in, so you can set up your preloader to only load what's needed for the first couple of levels / locations and let the player start playing early.

    The only caveats to that are:
    * Make sure the game still has a preloader for the streaming content, just in case the player gets through the levels before the later stuff is loaded in. Very unlikely, but better safe than sorry.
    * If there's a save in there, the player will be stuck waiting 'til enough loads so they can continue from that point, but hopefully if they're liking it enough to save then they won't mind waiting ( And if they've played it before it's more than likely sitting in the browser cache anyway ).

    Squize.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center