Project #7: Screensaver
Write a program that switches between three 1990s-style screensavers

DESCRIPTION

Requirements

  • Write a program that has at least three gamestates each corresponding to a different visual

  • Each state will contain an animation which must do the following:

    • Have at least one class that defines a set of objects that can change over time

    • Objects of the class must vary in position and at least one other property (color, shape, size, etc)

    • Each state must have an array of these objects that cause them to update and move.

  • The user can switch between the three animations by pressing 1, 2, and 3 on the keyboard

EXAMPLE #1: STARFIELD

  • Your animation is an infinitely scrolling Starfield with a "depth of field" effect.

  • Each Star has a distinct position and size.

    • Large stars move more quickly than small stars

    • Large stars are brighter than small stars

  • When a star reaches the bottom of the screen, it cycles back to the top.

EXAMPLE #2: BUBBLES

  • Your animation looks like it's underwater with bubbles that float upward forever.

  • Each Bubble has a distinct position and size.

    • Large bubbles move more quickly than small bubbles

    • Bubble shake a bit, moving a bit randomly in all directions

  • When a bubble reaches the top of the screen, it cycles back to the botom.

EXAMPLE #3: SKETCHER

  • Your animation draws a series of randomly colored lines over time

  • Each ColorLine has a pair of points and two colors.

    • Draws a gradient line from one point to the other

  • Starts with all lines invisible, drawing a new line each frame.

    • When we run out of lines in the array, re-randomize the original set in a cycle.

HISTORY + INSPIRATION

CHALLENGE (+10%)

This project does not have a fixed challenge. Aim to impress Mr. M with complex coding and polished animation to earn extra credit.