home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!tulane!agwbbs!Paul_Trauth
- From: Paul_Trauth@agwbbs.new-orleans.LA.US (Paul Trauth)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Game timing
- Distribution: world
- Message-ID: <Paul_Trauth.1a52@agwbbs.new-orleans.LA.US>
- Date: 18 Dec 92 02:30:18 CST
- Organization: The Amiga GateWay BBS * New Orleans, La.
- Lines: 47
-
- In a message dated Thu 17 Dec 92 11:28, Fkpec@westminster.ac.uk (liaket Ali
- wrote:
-
- FA> A question (hypothetical) related to Game timing...
-
- FA> I have an AMIGA 500 and will soon be getting a 1200 which is a faster
- FA> computer.
- FA> The game that I'm currently writing runs at 10 frames per second on
- FA> the A500.
- FA> However, I would like the game to run at 20fps on the A1200 but be
- FA> smoother.
- FA> This means that it will not zoom past at twice the speed but instead
- FA> will increment the display view by half increments.
-
- Hmmm, i'd hate to be your artist if it's not a 3d game: "What?!? You want
- me to inbetween EVERY SINGLE FRAME?!?"
-
- FA> For example, consider a flight simulator which, say, updates 10
- FA> pixels in 1 frame in order to achieve a frame rate of 10fps.
- FA> I would like to be able to then update 5 pixels in 1 frame to achive
- FA> 20fps.
-
- FA> Is this possible? And how would I go about programming it.
-
- 2 ideas:
- 1. if cpu>=[your definition of a really gnarly system] then halve all your
- deltas (that is, reduce the amount everything moves per frame)
- 2. seperate into two threads. one thread handles the game logic and moves
- everything about, in the simplest form possible (say, an XYZ point and a
- vector or two); the other thread samples the first thread's output as fast
- as it can, and renders the frame. (this way, you could possibly always get
- the maximum framerate possible for the amount of stuff you're throwing
- around at the moment. as things got more complex, the framerate would slow
- down, but the objects would still be moving at the same absolute speed)
-
- Note that this is just off the top of my head. Idea 1 seems a lot easier to
- implement; idea 2 is closer to being the Right Thing, as if done properly
- it would work on future machines with nauseating speeds.
-
- -- Via DLG Pro v0.995
-
- - be zorch, daddi-o --------------- paul (raccoon) trauth ----------------
- --------------------------------------------------------------------------
- Internet -> paul_trauth@agwbbs.new-orleans.LA.US \\\///\\\///\\\
- Usenet -> rex!agwbbs!paul_trauth \\\///\\\///\\\
- --------------------------------------------------------------------------
- "eagles may fly, but a weasel will never get sucked into a jet engine"
-