[dirGames-L] 3D Snowboarding game
Rasmus Keldorff
rasmus at planet.dk
Thu Dec 15 14:44:09 EST 2005
On 15/12/05 14:28, "Mal" <mal at candomultimedia.com> wrote:
>> right, but you really *really* can't run closed loops on Mac. So either you
>> will need to disable the loops on Mac (which should still let G5s run it), or
>> take Mac support out completely, and warn any Mac users against running it.
>
> We're getting reports of a few problems with some of our stuff running on a G5
> in Shockwave, so I'd be keen to use some of this info as well ( esp with not
> having a Mac ).
Can you point me to this? Perhaps I can test and verify the problems, I
might be able to help...
> What do you mean by disabling loops? Do you have a quick example of a loop,
> and a disabled loop?
OK; the idea is this. You differentiate between situations where it's
desirable to lock the game into a closed loop (with only updatestage to
ensure that visuals update), and situations where you simply fall back on
normal ExitFrame loops. You isolate all your game code so that it can be
called as just one handler, say 'GameUpdate': (pseudo-ish code)
global AllowLoop
if AllowLoop then
repeat while AllowLoop
GameUpdate()
CheckForLoopDisablers()
updatestage
end repeat
else
GameUpdate()
CheckForLoopEnablers()
end if
go to the frame
As stated previously in this thread, CheckForLoopDisablers would see if the
mouse loc had moved (perhaps consistently for more than one frame) and then
would set AllowLoop to FALSE; CheckForLoopEnablers would only ever run in
the 'open loop' and would be looking for the mouse loc to stay still for a
grace period of maybe 2 seconds before setting AllowLoop to TRUE.
/rasmus
More information about the dirGames-L
mailing list