[comp.sys.amiga.tech] Using Interrupts to Update Screen Graphics

sinistar@mrcnext.cso.uiuc.edu (Jeff O'Hare) (10/19/90)

Hi.  I am planning on writing my first game, and was wondering how people have
gone about doing screen updating.  I want the actual velocity of the objects to
remain constant, while the update rate will become slower or faster depending
upon the processors speed and/or tasks running.  My best idea so far is to use
a vertical blank interrupt, and from within the interrupt, check to see if the
main program has finished writing the current frame.  If not, the interrupt
returns, and the main program continues drawing.  When the interrupt finally
does get the completed picture and blits it to the screen, then it will send
a signal back to the main program so it knows how much time has elapsed for
the position calculations, and so it knows to start drawing the next frame.
I also plan to check the joystick movements at every vertical blank using the
example from the RKM.  Does this seem like the best way to do what I need to
do?
	Thanks,	
	Jeff