At 9:43 PM +1000 5/19/05, Martin Fitzgibbons wrote:
I have a student using sprite surfaces for his game and he is
noticing slight delays when swapping between images.
Is there a way to preload images so that he won't notice the delay?
Is he running on Windows, perchance? Swapping images is noticeably
slower there than on the Mac.
It's been a long time since I looked at this, but I don't think
there's any way to preload an image. However, if really desperate
(and if you don't have too many different shapes), you could have
extra Sprite objects already loaded but positioned way off-screen,
and then just swap positions to change the shape that appears on
screen.
Another alternative, of course, would be to switch to using Rb3DSpace
-- see the "Three Ways to Animate" article in issue 1.1 of RB
Developer for considerations and sample code.
Best,
- Joe
--
Joe Strout REAL Software, Inc.
Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
http://linux.sys-con.com/general/readerschoice.htm
_______________________________________________
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>
|