realbasic-games
[Top] [All Lists]

Re: A possible answer to performance woes?

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: A possible answer to performance woes?
From: Chris Dillman <chrisd at plaidworld dot com>
Date: Wed, 26 May 2004 22:21:21 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
List-help: <mailto:realbasic-games-request@lists.realsoftware.com?subject=help>
List-id: REALbasic Games <realbasic-games.lists.realsoftware.com>
List-post: <mailto:realbasic-games@lists.realsoftware.com>
References: <D2A43315-AF88-11D8-B391-000A95CDD7B0 at charcoaldesign dot co dot uk> <p06100503bcdb09803bde at [192 dot 168 dot 0 dot 100]> <046834FD-AF8C-11D8-B391-000A95CDD7B0 at charcoaldesign dot co dot uk>
And here we have a tight loop running at about 100fps (on my machine anyway), yet the window can still be moved and closed, and the app can be quit!

Funny I just had this thought a few minutes ago :)

Also.

You could try calling DoEvents only every so many passes through your loop.
I did that to ok effect.

I currently use a tight loop inside a timer which exits every few times through. I find that works better than DoEvents, but results may differ.

Also.. What if you take over the screen and where to hide the mouse cursor..
That might be another option..

Indeed, the best perhaps, but only for certain game types.

Do you think your crash is related to teh code above???
It would seem odd.

I get a nilobject exception if I close the window. Probably nothing serious.

Its you I think.

I have your codeing working fine in the tactics engine right now.
Thanks BTW.


Sadly, attempting to put this into practice in my game has revealed that the framerate is very jerky. If I change the WaitNextEvent timeout from 0 ticks to 1 then the framerate is nice and steady,

OK im getting 65 - 78 FPS
using GL and drawing 600 quades. (tiles)
on my laptop

problem is it doesn't go much above 30fps :-) I suspect we may have just gained some insight into the internal workings of the RB event loop itself!

hehe...

Hmm my C++ bang test app calls it at 0



--
Email: chrisd at plaidworld dot com
iChat / AIM: crackbunny at mac dot com

Buy Art : http://www.starbounce.com
Listen to Music: http://www.trance-o-matic.com
Play Games: Plaid World Studios http://www.plaidworld.com
Learn game programming at http://www.idevgames.com
Day job: Software Engineer for http://www.riskwise.com, Part of LexisNexis



_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

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