Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!ohstpy!miavx1!rlcollins From: rlcollins@miavx1.acs.muohio.edu (Ryan 'Gozar' Collins) Newsgroups: comp.sys.atari.st Subject: Re: questions about GFA basic and REPLAY 4 Message-ID: <3415.279b0372@miavx1.acs.muohio.edu> Date: 21 Jan 91 20:06:26 GMT References: <3374.27938072@miavx1.acs.muohio.edu> Lines: 37 In article <3374.27938072@miavx1.acs.muohio.edu>, tmwhitehead@miavx1.acs.muohio.edu writes: > I have REPLAY 4 (awesome sound digitizer) > I also have GFA Basic 3.(something) > I have a 1040 ST with a color monitor. > > My second question is this: > The game I'm writing is, essentially, one large loop. Currently, I have a > variable that I increment each time through the loop and use as a counter to > determine the timing of certain events. however, since the program falls > through different segments of code depending on the players actions and the > timer value, the speed changes. I've been able to control it somewhat by > putting in small pauses in the right places, but if I could get access to an > internal timer, I could use that to time my rpogram. I need pretty small > increments (probably at LEAST 1/100 of a second...) GFA Basic 3.0 has a command called every, with the syntax: EVERY ticks GOSUB proc ticks are in 1/200 of a second, so: EVERY 200 GOSUB move_char Every 200 ticks (1 sec) the procedure move_char is executed. EVERY STOP stops the command and EVERY CONT continues. ~~~~~~~~~~~~~~~~~~~~~~~~~ Ryan 'Gozar' Collins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ o__)\ rlcollins@miavx1.BITNET / ) RC1DSANU@miamiu.acs.muohio.edu / / ____ R.COLLINS1 (On GEnie) /(____/__(_) o)_/ /) [ || ] Atari Computers, "There is no Substitute." [ || ] They're not just Vs lbh pna ernq guvf, lbh'er geniryvat // || \\ for breakfast gbb pybfr! // || \\ anymore ~~~~~~~~~~~~~~~~~~~~~~Yea, right, thats what I said.~~~~~~~~~~~~~~~~~~~~~~~~~