From: deadman@garnet.berkeley.edu (Ben Haller)
Newsgroups: comp.sys.mac.games
Subject: Re: Game Speed
Date: 13 Sep 92 00:58:56 GMT
Organization: Stick Software
NNTP-Posting-Host: garnet.berkeley.edu

In article <1992Sep12.103157.1@cubldr.colorado.edu>
  patlin_s@cubldr.colorado.edu writes:
>I've noticed on Ben Haler's Lunatic Fringe that there is a significant
>difference between play on a friends SE and on anothers IIci.  While
>this is not surprising, it is noteworthy that the difference was extreme
>enough to make it seem that Ben had written 2 seperate games.
  Yeah, doesn't it suck?

>While up to a point, I can see faster being better, I can also see a
>point somewhere out there where the game would play TOO fast.  It 
>wouldn't seem to my less than educated self that it would be technically
>difficult to limit speed by checking how many ticks have occured
>between actions, and waiting if too few have happened.
  Well, it's harder than you might think.  I mean certainly you can
do that.  But two things get in the way.  One is that an SE just isn't
fast enough to keep up with the intended speed of the game.  So there
is nothing I could do to speed it up (actually there was an easy fix, but
it would have vastly increased the amount of memory the game took).
  The other problem is that Lunatic Fringe, in order to produce the
best possible graphics quality, synchronizes its graphics to the
refresh rate of the monitor.  Montitors have refresh rates from 50Hz
to 75Hz and higher, so the speed of the game varies according to the
monitor type.
  Obviously it would be ideal to have the game logic running at a rate
based on Ticks, and the graphics running synched to the VBL of the
monitor.  This is very difficult.  I am working on technology to
allow this, but it is quite complex comparatively (you need to be
prepared for you game logic to be interrupted by the drawing code
at any time, and the drawing must be done all at interrupt time).  There
wasn't nearly enough time to do this sort of thing for Lunatic Fringe.
  So the answer is, it is more complex than you might think.  There
is a maximum speed in Lunatic Fringe, but it is proportional to the
refresh rate of your monitor.  For a given monitor & card, a Quadra will
not run LF significantly faster than a IIci.

>Or, alternatively, it would probably be possible to ask the user or
>check the hardware, and base the speed on that.
I'm not sure I know what you mean by this.

>I'm also sort of curious about which speed Ben had in mind when
>writing...
The speed on a standard Apple 13" color monitor on a Quadra (or a
normal IIci, for that matter) is the intended speed.  But on a IIci
it is using most of the processor, so when you go to slower machine it
really can't help slowing down.
  Of course, the code could have been optimized more, but that's another
issue...that would have put us way past deadline...

>(BTW- LF is a great game at both speeds, and anyone who has After Dark
>will want MAD for this module alone.)
Thank you.

  Another interesting issue is scaling to monitors of different sizes.
LF does scale, but the "feel" of the game is very different on a big
monitor.  The universe is bigger, the distance between interesting
objects is greater, the danger of running out of fuel is (consequently)
higher, etc.  How do people feel about this?  Should things like this
change when you change monitor sizes?  Given that a big monitor lets you
see a bigger area, if the universe stayed the same size you would be able
to see almost a quarter of the whole universe on some monitors, so clearly
that would affect the balance of the game.  But clearly making the size of
the universe proportional to the visible area also changes the dynamics.
  What is the correct solution?
  (I, of course, have not got the answer.  LF wasn't even a very good
approximation of what I might guess to be the right answer).

-Ben Haller (deadman@garnet.berkeley.edu)
Newsgroups: comp.sys.mac.games