$25
To use a vertical sync function and set pixel to further your understanding of: VBlank and HBlank, drawing and erasing pixels in Mode 3, and working with an infinite while loop.
Instructions:
For this homework, you will make a simple frame-by-frame animation in Mode 3. This may be as simple as having a few shapes move and change colors, or as complex and original as your heart desires. Creativity is encouraged!
Requirements:
● Follow good code architecture
○ Not a bunch of set pixel calls in main
● The animation must loop forever
CS 2261 Spring 2021
● A vertical sync function must be used
● There must be at least four different frames of animation
● There must be at least three different colors
● There must be a minimal amount of flicker
Tips:
Consider writing a separate function for every frame and calling these functions in an endless loop. Or, write a procedural animation that resets itself so that it also looks like it loops. Either is fine, and it’s up to you how you want to organize your code, so long as there is meaningful organization.
● If you are having trouble with flicker, try drawing fewer pixels per frame (don’t draw a pixel unless you really need to).
● If you need help getting started, drawing out a few frames on a 240x160 canvas in a simple paint editor or on graph paper may help.
● Make sure your moving elements/shapes don’t “wrap around” the gba screen, in other words, check your boundaries!