realbasic-games
[Top] [All Lists]

Re: Bizzaro World Problem - Solved (sort of)

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Bizzaro World Problem - Solved (sort of)
From: Joseph Nastasi <joe at pyramiddesign dot us>
Date: Fri, 12 Aug 2005 10:05:52 -0400
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <5d12083bb58b6f45cafc8484c1e3220b at pyramiddesign dot us>
I decided to just let the thing go as long as it can run and wound up getting a stack overflow. Once that happened, I traced crash to a routine that draws the trajectory on a world map. (this is not yet implemented in the new sim) Once that draw routine was commented out, things worked.

I'm still puzzled as to why the problem manifested itself by speeding up when RB3DSpace windows were opened. I would have expected a massive slowdown if the stack was getting whacked too much.

Anyway, thank God for small favors!
Back to your regularly scheduled program...

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

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
--
Joseph Nastasi
Pyramid Design - a software development firm
http://www.pyramiddesign.us
Voice 609 601-0814      Fax 609 601-0815
Products:
A-OK! Spacecraft Simulation System - http://aok.pyramiddesign.us
A-OK! The Wings of Mercury
FTP Suite for REALbasic - http://ftpsuite.pyramiddesign.us
Proud Sponsors of REALbasic Olympics 2005



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


--
Joseph Nastasi
Pyramid Design - a software development firm
http://www.pyramiddesign.us
Voice 609 601-0814      Fax 609 601-0815
Products:
A-OK! Spacecraft Simulation System - http://aok.pyramiddesign.us
A-OK! The Wings of Mercury
FTP Suite for REALbasic - http://ftpsuite.pyramiddesign.us
Proud Sponsors of REALbasic Olympics 2005




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

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