Arcade Game Updating

BlitzMax Forums/BlitzMax Beginners Area/Arcade Game Updating

z80jim(Posted 2006) [#1]
It seems to me there are two approaches to arcade game updating:

1. Draw / Flip every time through your loop. Basically limited by speed of the computer. Moving a sprite pixel by pixel across even a 640 wide screen seems to take several seconds. Move by more than one pixel at a time to increase "speed".

2. The Draw / Flip is what is slow ( mostly the Flip I think ). Actually updating the location of the sprite is real quick - moves across the screen in a fraction of a second even pixel by pixel. So only draw the screen every n millisecs(). Actually use time delays to slow down and speed up the movement of your sprites.

Any comments on these would be appreciated. I'm just starting to experiment with #2. I've been using #1 but I'm finding my sprites are overlapping because of the >1 pixel movements and then I have to "back them up" and reposition them and things are getting complicated.


H&K(Posted 2006) [#2]
The flip is only slow if you sync with the display (Cos then it waits), if you just flip 0, (I think), its instant

The cls() is often the slowest single command.


(tu) ENAY(Posted 2006) [#3]
I guess what you're trying to achieve os that ultra crisp pixel to sync movement whereby pixels move flawlessly from one position to the next in each frame instead of that blurring effect you often get. Unfortunately it's almost impossible to achieve this effect due to PC hardware, monitor/windows and game refresh rates.

Even MAME emulation hasn't mastered this seemingly common of requests. I personally wouldn't try to strive for this effect but I'd be interested if you could achieve it though :)