Tuesday, May 22, 2012

Load times reduced (images)

After my very successful return on audio loading time reduction. It was time to attack the Image load time.

I am using Marmalades Cross platform development system and this means there are a few things that are going to happen when loading files etc. Though there are several ways to achieve loading data within Marmalade I chose to use their resource manager. This is a useful and efficient tool. It did however complicate my new image loading spread technique slightly.

I did a LoadGroup on my data block using the ResManager and this happens to load and uncompress to memory ALL the data in that group. My initial group was called AllData, as it used to contain ALL the data I was eveer gonna load (except audio). So changing this full loading behaviour mean't I was required to make another Resource file, or I could of course just make another Group.

So I split off the Main Page artwork and the 5 golden coins I have into another Resource file called 'pages.group', and of course removed this artwork from my alldata (which is now misnamed, gah!). Then I load in the first group when booting into the game.. the dreaded initial load. Once it is all in the Title page comes up and the Whole of the title sequence and menu works fine. Only when the title page fades out to go to the actal pages/game itself do I do an on demand load while the screen is fully faded out. There is no noticable hiccups or anything and yet seamlessly the new page comes up and works just fine.

I am very happy with this change and have now reduced initial load time to 10 seconds on the iPod3 (my worst performing load times by far).

Next up is to do the final recordings of the pages being read by my Daughter, who is supplying the female reading. She has been very busy lately playing as Falkor in a stage production of Never Ending Story in a nearby town.

Have a great day
Da Voodoochief

No comments:

Post a Comment