[EMAIL PROTECTED] wrote:
I have a game in development with a layered map (land, units, cities, improvements
etc.) these layers can require up to about 12 WinDrawBitmap calls per square and
everything has some transperent areas except the bottom layer. The map is tiled
and there are 6000 (100 x 60) tiles, each tile is 20 x 20 pixels, meaning the
palm can display 256 (16 x 16) tiles. This means about 256*10 = 2560 WinDrawBitmap
=> 1300ms (TJ35). Also a side note, I use the pen input for certain objects on
screen.
Code using with WinDrawBitmap:
offScreenBitmap = BmpCreate(320, 320, 8, NULL, &error); //=> genericFormat
win = WinCreateBitmapWindow(offScreenBitmap, &error);
A few questions:
1. Is it possible to do so many draw operations and get speeds around 200ms
using ARM/nativeFormat etc, and should I take the time to modify the code.
2. Would I be better off storing all 6000 20x20 tiles into a DB (a lot of mem
req)?
3. Creating a new database with cached images with IDs that link to my map DB.
4. Read about direct screen drawing, don't think it would be useful here...
5. Or I'm messing something up, one should never need that many calls to
WinDrawBitmap
Basically I have a speed problem and I need the best solution, before wasting
my time trying 60 different things. So this is more of a general query on best
way to draw to screen.
Do you use transparency in your bitmaps? You better avoid it and go for
mask + fill and WinPaintBitmap. This is faster. If it will be fast
enough? I don't know.
Regards
Henk
--
-------------------------------------------------------------------------
Henk Jonas [EMAIL PROTECTED]
Palm OS � certified developer
Please contact me, if you need an off-side contract worker.
-------------------------------------------------------------------------
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/