Article View: rec.games.programmer
Article #1742Re: Game timing
From: Jarno Tapio Rajahalme
Date: Fri, 18 Dec 1992 12:43
Date: Fri, 18 Dec 1992 12:43
34 lines
2297 bytes
2297 bytes
In article <1992Dec17.144044.18199@westminster.ac.uk> fkpec@westminster.ac.uk (Liaket Ali) writes: A question (hypothetical) related to Game timing... I have an AMIGA 500 and will soon be getting a 1200 which is a faster computer. The game that I'm currently writing runs at 10 frames per second on the A500. However, I would like the game to run at 20fps on the A1200 but be smoother. This means that it will not zoom past at twice the speed but instead will increment the display view by half increments. Note: I have never done this, but... To adapt to the speed of the machine the game is running on you should measure how many frames it takes to draw the scene. Then when you know that drawing the scene too, say, 5 frames, you advance the simulation time of your game by 5 frames, draw next scene, etc. Note that this algorithm adapts to the complexity of your scene too (more detail => less frames / sec, but the 'time' will be correct, only taking bigger jumps.). One problem with this is that the game control will be taken into account only after the prevoius scene is totally ready, so if the frame rate falls too low, your game will not be playable anymore. But this should not be a problem for moderate frame rates. LIAKET ALI fkpec@westminster.ac.uk Jarno -- ----------------------------------------------------------------------------- | Address: Jarno Rajahalme | EMail: | | Servin Maijan tie 12 H 111 | Jarno.Rajahalme@hut.fi | | 02150 ESPOO, FINLAND | tel: +358 0 468 2891 | -----------------------------------------------------------------------------
Technical Details
Message-ID:
<JRAJA.92Dec18124346@vipunen.hut.fi>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!nntp!jrajaReferences:
<1992Dec17.144044.18199@westminster.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer,comp.sys.amiga.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!nntp!jraja From: jraja@vipunen.hut.fi (Jarno Tapio Rajahalme) Subject: Re: Game timing In-Reply-To: fkpec@westminster.ac.uk's message of 17 Dec 92 14:40:44 GMT Message-ID: <JRAJA.92Dec18124346@vipunen.hut.fi> Sender: usenet@nntp.hut.fi (Usenet pseudouser id) Nntp-Posting-Host: vipunen.hut.fi Organization: Helsinki University of Technology, Finland References: <1992Dec17.144044.18199@westminster.ac.uk> Date: 18 Dec 92 12:43:46 Lines: 34