realbasic-games
[Top] [All Lists]

Re: Slow Sprites and Editfields

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Slow Sprites and Editfields
From: Zac Cohan <applezac at mac dot com>
Date: Wed, 22 Dec 2004 08:58:53 +1100
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <91C16875-533D-11D9-BA21-000A959AABFE at mac dot com> <a06200709bdedeb4f8549 at [10 dot 10 dot 13 dot 4]>
Once again your a hero Joe, thanks so much.

-Zac

On 22/12/2004, at 2:03 AM, Joseph J. Strout wrote:

At 9:46 PM +1100 12/21/04, Zac Cohan wrote:

Whilst playing around in sprites on the Mac version of Realbasic 5.5.4 i tried to make an edit-field display the position of a sprite within its spritesurface with code that looked like this:

Why an EditField? That's about the slowest way to display text there is. Try a StaticText instead, or assigning to the window Title property.

Try as I might, I could not get the edit-field to display the value.
Incredibly, with the same code, my friend was able to make it work great in the windows version of realbasic. Anyone have an idea why this might be?

My guess is that you're using SpriteSurface.Run. On the Mac, this takes over the entire process, and doesn't give other controls a chance to update. I don't recommend this method; call SpriteSurface.Update from a Timer instead. Then you'll find controls, menus, the mouse, etc. all working as normal.

Also, I find it very odd that moving a picture across the screen using sprites in RB milks my processor to 100% stalling anything else

Yes, that's the Run method for you.

whilst seriously graphic intensive games work great.

Well, seriously graphic intensive games also milk your processor to 100%. But they can do it in a somewhat more friendly manner, and so can you -- just stop using the Run method.

Best,
- Joe

--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
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>

_______________________________________________
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>