realbasic-games
[Top] [All Lists]

Re: Thread behavior and priority in RB 5.2 vs 5.5

To: "REALbasic Games" <REALbasic-Games at lists dot realsoftware dot com>
Subject: Re: Thread behavior and priority in RB 5.2 vs 5.5
From: Frank C <lists at si-co dot com>
Date: Sat, 17 Apr 2004 12:56:58 -0400
References: <000501c423ed$53c1d610$2f0e4f18 at kwxgkx5y8sd746> <21826588-9055-11D8-96D6-000A95CDD7B0 at charcoaldesign dot co dot uk>
On 17-Apr-04, at 5:53 AM, Nick Lockwood wrote:

I was thinking of using a loop and do events with no thread but the whole Idea of this engine is that version 2 (maybe released by fall with a
game I am working on) will support network play.

For what it's worth, I always thought using a timer was the way to go, but in my experiments with doing OpenGL stuff lately, my project performance went from around 25fps with a timer to 1000fps with a tight loop.

Tight loop is the _only_ way to go if you need speed and/or smooth animation. Although a timer/thread can give you a "steady" rate, the display will jitter. Haven't got a clue why this happens, but drawing at 30FPS from a tight loop looks twice as smooth as 30FPS from a timer/thread. Contrary to what you wrote, a timer is just as unpredictable as a thread; there's absolutely no guarantee a timer will fire when it's supposed to.

Frank.


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