On Jun 27, 2005, at 10:48 AM, Joseph J. Strout wrote:
I had considered putting "updateGameScreen" into the paint event, but
then thought that might cause some circular thing to happen with the
window attempting to redraw continuously. Is it important to
implement the paint event?
Generally so, but I wouldn't worry about it much at this point.
Ultimately you should probably have the Paint event call your
UpdateGameScreen method, just to handle that odd case when the window
has to be redrawn by the system because it was covered (and then
revealed) by a dialog or whatnot. But the Paint event will *not* be
involved in the normal game animation.
OK, so I've made some changes, and reverted to a normal canvas, mostly
to be more clear about each thing I am doing.
In my updateGameScreen, I am drawing to a buffer picture. At the end, I
write that to my canvas. Using this technique, I am drawing a full
frame image, every time the method runs. Is there meant to be a simpler
technique which only updates the parts of the screen that need it? If
so, when and where would I write my background image to ensure I always
have a background... outside of my updateGameScreen method and within
the canvas' paint event?
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|