Hi Everyone,

A couple weeks ago I posed a question to this forum regarding bitmap animation.  
I explained that I am trying to create a graphic object that I can move around 
the screen (and over other bitmaps, etc), that won't require me to redraw the 
underlying bitmaps, etc.  For example, on a racing game, I want my car image 
to move across the road without requiring me to redraw the road over and over again.

I received several responses telling me to look at "bitmapwindow" and 
"offscreenwindow" for this process.  I've read the SDK on these APIs as well 
as articles on the developer's knowledge database on Palm's corporate web site.  
But, I still need a little clarification.

Let me state my question/statement differently:
==============================================

Surely ALL animation involves drawing a bitmap and then redrawing this 
bitmap to a new location on the screen.  Then repeating this process again and again 
over fixed time intervals.  This "translation" produces the effect of "animation" 
of the bitmap.  But, whether I do this with a single window or multiple
windows "offscreenwindow"...isn't the process the same?  If I use an offscreen
windows to draw my "updated" image, I'm still going to have to redraw the
background prior to drawing the bitmap or I'll always corrupt the background.

Here is my understanding of animating a racing game (please correct otherwise):

1)  Draw background bitmap (road) on current window.
2)  Draw bitmap of car on top of road (this will obviously corrupt underlying road 
image).
3)  Draw background bitmap (road) to offscreen window
4)  Draw bitmap of car on top of road at NEW location.
5)  Switch current window to offscreen window (result is car has appeared to move).
6)  Goto step #1

The net result is that the road image is never corrupted by "animating" the car bitmap.
Is my understanding correct?  Is it necessary to draw the background image (the road)
each and EVERY time PRIOR to drawing the car bitmap image?

Any thoughts/suggestions/corrections would be greatly appreciated!

Thanks,

Robert Purcell, [EMAIL PROTECTED]
BapSoft, http://www.bapsoft.com



__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to