gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > Best way to do an animation sequence

#28816 - ozahid - Sat Nov 06, 2004 9:32 pm

If I wanted to create an animation sequance that consisted of lets say 100 different frames, what is the best way to go about doing it.

The first way I did it was to manually throw each pixel on in Mode 3. This is obvious a horriable way since you see flashing, and since no buffering is used.

The second way I did it was to use DMA, which was quicker at throwing things to the screen, however it turned out to be TOO quick that there was a smearing effect since it was so fast. So then I added a timer and waited a quarter second to throw the image on the screen. This made the animation a bit smoother. BTW this was mode 3 once again.

Well, now I am going to figure out how to use the double buffer (mode 4, 5 is too small), and include that into my section of code. Now, do you think the best way to handle this is to use the double buffer while using DMA to throw the graphic onto the screen? Or is there a better way?
_________________
http://people.umass.edu/ozahid

#28817 - sajiimori - Sat Nov 06, 2004 10:05 pm

Presumably you mean using DMA to throw the graphic off-screen, as throwing it on-screen would have the same tearing affect as mode 3. There's no flat-out better way to do it, but you can try it out and see if it does what you want.