realbasic-games
[Top] [All Lists]

Re: Canvases sometimes black

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Canvases sometimes black
From: Troy Rollins <troy at rpsystems dot net>
Date: Mon, 27 Jun 2005 12:41:52 -0400
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <BEE5084A dot DD9D%larsjensen at rcn dot com> <d2fcd18d080737fcded2aa9997cb617f at rpsystems dot net> <a06200716bee5c154d193 at [10 dot 10 dot 13 dot 4]>

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>

<Prev in Thread] Current Thread [Next in Thread>