Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Bizzaro World Problem (Real Studio games Mailinglist archive)

Back to the thread list
Previous thread: Re: Bizzaro World Problem - Solved (sort of)
Next thread: [ANN] PNG Utilities Plugin v1.7


[ANN] Preview of RBD 2.4   -   Marc Zeedar
  Bizzaro World Problem   -   Joseph Nastasi
   Re: Bizzaro World Problem   -   Asher Dunn
   Re: Bizzaro World Problem   -   Joseph Nastasi
   Re: Bizzaro World Problem - Solved (sort of)   -   Joseph Nastasi

Bizzaro World Problem
Date: 12.08.05 14:00 (Fri, 12 Aug 2005 09:00:58 -0400)
From: Joseph Nastasi
Okay, this one is really kicking me!

In Wings of Mercury, I can have multiple windows that contain RB3DSpace
controls open at once. I recently did a big overhaul of the main loop
of the program, eliminating all threads (though in 2005, we can now
control the priorities! my timing blows) and have everything contained
in a short interval timer. I use the milliseconds technique that
produces a delta time that can be used to modify simulated movement,
etc. Almost exactly like the Open Plane by the Strout Game Think Tank.
:-)

It was working very well up until one revision ago both on OS X and
Window XP. All of a sudden, after making some minor changes (yeah, I
know) the speed of the simulation starts racing like it's in fast
forward mode. It only happens on XP, not OS X. Okay, so I go back to
the older version. Still does it. Go back another version. Still does
it. and so on...

I keep copious development logs and there is no reference to seeing
anything like this before. Besides, this version has only been in
development for a couple of months, so I'd probably remember anyway.
I've done all sorts of tracing and can't figure out how it could be
screwed up.

But here's what I just discovered: If no RB3DSpace windows are visible,
the timing looks fine. As I start to open Rb3DSpace windows, the
simulations starts to speed up. Once all three are open, I am running
at almost 15x normal speed.

I'm using 5.5.5, BTW and have the latest version of Quesa, though
neither of those have changed in the last couple of months. It does
this when running in the IDE and as a compile application.

Now here's another piece of the puzzle. The new simulator, which is
more of "MS Flight Simulator for spacecraft" and therefore allows
creation of vehicles from the ground up, uses the same
timer/millisecond technique and does not exhibit this problem at all.
The ONLY difference is that there is one main window that has two
RB3DSpace controls on it. (one for views and one for the control panel)
It works fine on both platforms. (actually, it works _better_ on XP)

Obviously, the must be _something_ I am doing wrong. My RB version
hasn't changed (well, there were sometimes I used 2005, but the
debugging issues stopped that) and neither has Quesa, OpenGL or even my
Windows version.

So, other than crying in my beer (which I am, at this point,
considering replacing with a vat of rum), I'm asking for ideas on why
opening windows with RB3Dspace controls would speed up program
execution?

Thanks for any ideas,
Joe

Re: Bizzaro World Problem
Date: 12.08.05 15:28 (Fri, 12 Aug 2005 10:28:20 -0400)
From: Asher Dunn

On Aug 12, 2005, at 9:00 AM, Joseph Nastasi wrote:

> So, other than crying in my beer (which I am, at this point,
> considering replacing with a vat of rum), I'm asking for ideas on why
> opening windows with RB3Dspace controls would speed up program
> execution?

How are you calculating your delta time? Are you using a "lastFrameTime
- microseconds; lastFrameTime = microseconds" approach? If so, are you
doing that once *for each Rb3DSpace* by accident? If so, it would think
your frames were much shorter than they really were, which would cause
it to run *slower*... Oh well, maybe it's something like that anyway.

Asher Dunn
--------------------------------------------------------
President and Head Developer of Fireye Software
<http://www.fireyesoftware.com/>
AIM, Yahoo, MSN: crazedglkid

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

Re: Bizzaro World Problem
Date: 12.08.05 17:21 (Fri, 12 Aug 2005 12:21:57 -0400)
From: Joseph Nastasi

On Aug 12, 2005, at 10:28 AM, Asher Dunn wrote:

>
> On Aug 12, 2005, at 9:00 AM, Joseph Nastasi wrote:
>
>> So, other than crying in my beer (which I am, at this point,
>> considering replacing with a vat of rum), I'm asking for ideas on why
>> opening windows with RB3Dspace controls would speed up program
>> execution?
>
> How are you calculating your delta time? Are you using a
> "lastFrameTime - microseconds; lastFrameTime = microseconds" approach?
> If so, are you doing that once *for each Rb3DSpace* by accident? If
> so, it would think your frames were much shorter than they really
> were, which would cause it to run *slower*... Oh well, maybe it's
> something like that anyway.

Yeah, I thought of that. But it was simply attempting to draw a canvas
way too fast. I think I kept on creating a new picture instance (for
double-buffering) and it just ate away at the stack. It was happening
right in fastest part of the loop so it would not take too long.

Glad that's over...