Game speed control considerations

GFA, ASM, STOS, ...

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Game speed control considerations

Postby AtariZoll » Mon May 29, 2017 5:19 pm

There is game OIDS, where programmer limited framerate to 10 fps using 5 Vbl waits in every screen generating cycle. However, it needs only 2 Vbl time on simpler planets, and 3 on complexer ones. So, framerate could be 25-17.
I'm thinking about best way to achieve it, maintaining constant movement speed of objects on screen, without that not wise framerate limiting,
I think that dml could say something here considering his experience.
Idea at moment is to draw next frame at begin calculating with 2 Vbl (1/25 sec on PAL) needed for it - so doing movements for 40mS time period. That's the start Vbl count. Then, looking how much it really took - what depends mostly from scene complexity. If it is 3 or 4 Vbls, then calculating next frame for that time period (because scene certainly will not change much in so short time). So, calculating bigger movement for next frame. And so on.
That should result in relative constant speed of movement on screen, even if framerate changes in meantime.
I will go on 2 video buffers (as it is already) - so it will run with 512KB RAM for sure. 3 video buffers are better (can get little higher framerate, since can render ahead during wait on Vbl), but I don't think that it will be worth to go on it
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Cyprian
Atari God
Atari God
Posts: 1405
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Game speed control considerations

Postby Cyprian » Mon May 29, 2017 7:53 pm

AtariZoll wrote:programmer limited framerate to 10 fps using 5 Vbl waits in every screen generating cycle

nice finding. what was the reason of that?
Last edited by Cyprian on Tue May 30, 2017 8:28 am, edited 1 time in total.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
alexh
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2595
Joined: Wed Oct 20, 2004 1:52 pm
Location: UK - Oxford
Contact:

Re: Game speed control considerations

Postby alexh » Tue May 30, 2017 7:54 am

Presumably so the game played at the same speed / frame rate on all levels regardless of complexity?

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Game speed control considerations

Postby AtariZoll » Tue May 30, 2017 8:41 am

Cyprian wrote:
AtariZoll wrote:programmer limited framerate to 10 fps using 5 Vbl waits in every screen generating cycle

nice finding. what was the reason of that?

I can only guess. Probably he considered that 10 fps is enough for this type of game (not too much shooting). And it made things (coding) simpler.
alexh wrote:Presumably so the game played at the same speed / frame rate on all levels regardless of complexity?

Yes. It's just that it can have much more fps at simpler planets. And another benefit is that speed is same on very fast machines too. Well, not 100% same - if refresh rate is 60 Hz, so NTSC, Falcon on VGA, TT, it will play 20% faster than on PAL.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
calimero
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2068
Joined: Thu Sep 15, 2005 10:01 am
Location: STara Pazova, Serbia
Contact:

Re: Game speed control considerations

Postby calimero » Tue May 30, 2017 10:08 am

Reason is probably time vs quality ...

I am looking forward to see new version and speed improvement from petari :)
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 1 guest