Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Oct 21, 2017 3:44 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Game engine
PostPosted: Sun Aug 26, 2012 3:09 am 
Offline

Joined: Thu Dec 01, 2011 2:13 pm
Posts: 288
Hi guys! Im gonna create a game engine! But i have a question:

I created an update sub in a thread so events still fire. But you shouldnt change the gui from the thread. No, i cant just use a timer which does redraw in the main thread because then it would be a fixed update, not an update. Is it possible?

Thanks
NaNdummy

_________________
Mac OS X 10.3-10.8
Windows 2000 (I know it sucks)
Windows Server 2007

You want a bunch of new classes and web styles? realstudiodevspot.com (search there for Web Styles Plugin)
Folderitem is too hard? File Bin Class
I hate cows.


Top
 Profile  
Reply with quote  
 Post subject: Re: Game engine
PostPosted: Mon Aug 27, 2012 7:31 pm 
Offline
User avatar

Joined: Fri Jan 12, 2007 10:59 am
Posts: 136
Location: Victoriaville, QC, Canada
I would still put it in a timer. Make the timer with a small period (maybe 100 ms). Have the timer read a global boolean variable stored somewhere that acts as a flag. When the timer runs, it reads the flag. If the flag is false, do nothing - nothing gets updated. If the flag is true, it updates the gui an sets the flag to false.

This way, anytime you need to update the gui, be it from a thread or anywhere, just set the flag to true and the next timer run will update it.

_________________
Bruno Fr├ęchette
PJJ Productions inc.
RealStudio Web & Desktop on OSX


Top
 Profile  
Reply with quote  
 Post subject: Re: Game engine
PostPosted: Sun Jan 06, 2013 2:53 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
goto great white software...the "wheel" has already been invented for you ;-) there's a great game engine class available...

or save your money and goto

http://sourceforge.net/projects/racu/

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group