PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Images loading too slow

I have a problem: in my game I'm using about 20 background images 320x240 and quite a lot of other graphics(about 3.5mb in png). All this loads quite a long time - almost 20 seconds(most of it is 320x240 backgrounds). Of couse I don't like this, so is there any sollution to make it little faster(twice as fast would be enough)?
All my graphics is in png format.

I'm using pocket Frog 7.0 and its internal loading functions. Images are not linked to .exe file as resource.
Yes, loading images using the imgdcmp.dll (the internal loading device of PF) takes a little time. I don't think it will matter if you have your images as resources or as files (as the resource images will be stored as files to free some of the memory when the app is loaded anyways (could be that I'm not remembering this correctly))

How to speed it up then?

I would suggest splitting up your graphics and loading only the stuff you need at a specific level (because you're not using all 20 images on all levels right??). While loading/initializing the next level you could display a splash-screen with progress-bar to alert the user of what's going on. Having to wait a few secs for the next level is not so bad. Having to wait a few secs for the app to begin isn't that bad either. Waiting 20s without a warning and I will press the reset button :)

If you need to load everything then perhaps looking for a port of libpng for PPC would be interesting (as I would imagine it to be much faster than imgdcmp.dll for decoding pngs), and then write a little wrapper so you can use it together with PF.

I actually thought about this myself once, but now I have installed Linux (the familiar dist) on my iPAQ so PF and PPC is not something that concerns me anymore (but it's always interesting to follow the progress).
The next release of PF will address this. The problem has to do with imgdecmp and the rotation of the image to the device's native display orientation.
Ok, I'll be the fool to ask the obvious, long-running question...

When can we expect the next PF release? And if you say "this weekend" I'm going to blow up your entire country, just to be sure I get you :)
I am working on it right now. I am too scared to answer "when" it will be released =)
adde wrote:
How to speed it up then?
I would suggest splitting up your graphics and loading only the stuff you need at a specific level (because you're not using all 20 images on all levels right??).

Well, it is the way. But the idea of a game is that my levels are very short in time(only about 15 secs).
although there is a little pause with status panel, i could use it.. But it is animated, well, if only i could make another process to load the image invisible while showing animation... Another bad thing is that i use this images to mix up on some game types.. Well, I'll think about it..

While loading/initializing the next level you could display a splash-screen with progress-bar to alert the user of what's going on. Having to wait a few secs for the next level is not so bad. Having to wait a few secs for the app to begin isn't that bad either. Waiting 20s without a warning and I will press the reset button :)

Well, there is a progress bar so you'll know you're going to the end of this :).

If you need to load everything then perhaps looking for a port of libpng for PPC would be interesting (as I would imagine it to be much faster than imgdcmp.dll for decoding pngs), and then write a little wrapper so you can use it together with PF.

Well, i'm not sure if i can do it myself. The worst thing is that i'm planning to release in a week :).
jaguard wrote:
Well, i'm not sure if i can do it myself. The worst thing is that i'm planning to release in a week :).
It's much better to delay the release than to release something that will leave a bad taste in your customers' mouthes. First impressions count for a lot, and so does word-of-mouth.

-John