Mail Archives: djgpp/1997/08/09/12:51:04
Marcus Brenneman (mrln AT flex DOT net) writes:
> Okay. I am using Allegro 2.2 and I am writing a game--like almost
> everyone else. You know how you can have a 386 and a Pentium running,
> say, DOOM, and on both machines it will take the same amount of time to
> go across the same room (although it will look a lot smoother on a
> Pentium)? I think this revolves around a concept I call virtual
> framerate; the engine updates the positions of everything, etc. at the
> same rate of the highest possible framerate but only draws the frames it
> can. I want to do this with my game and I'm not sure how to approach it.
> I thought of perhaps updating positions every iteration (synched to 60
> Hz, FPS, whatever) and only drawing what would be frame 1 of x. The
> problem with that method would be that the user would have to set x, and
> if a whole bunch of entities were on the screen things could slow down
> to the point of x having to be re-adjusted. I also thought of drawing a
> frame but using a timer interrupt at 60 Hz that calls all the position
> updating stuff (the entities' AIs, etc.; no drawing) so that
> (theoretically) once the next frame were ready to be drawn, the correct
> positions would be in place. That probably wouldn't work because the
> Allegro documentation said that only simple things should be done within
> a function linked to an interrupt. How can I accomplish that trick
> that's seen in DOOM, Quake, etc.?
It's Deja News all over again! I answered this the first time it
appeared...it should be a few screens up from here. Grep for the subject
you used before and my name in the headers...
--
.*. Where feelings are concerned, answers are rarely simple [GeneDeWeese]
-() < When I go to the theater, I always go straight to the "bag and mix"
`*' bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh
- Raw text -