Project #1: Scene, hero, dog, birds, bomb.
SCENE: sky, sun, grass below (lower ~2/3 of screen)
- display title at the top and your name in lower-left corner
- EXTRA: sun moves slowly across screen. (arc?)
HERO: constant velocity DX, DY
- bounce off "walls" (left, right, bottom, horizon)
- reverse X direction, when mouse clicks on hero.
- EXTRA: Hero "shrinks" as he goes toward the horizon.
(Smaller when Y coordinate gets smaller.)
DOG: follow the hero
- chase at a rate that cuts the distance in half every second.
- EXTRA: dog's head should always point toward hero
BIRD: flies thru the sky from left to right;
- resume with new bird, whenever old bird exits right
- Click near bird to start the bomb dropping.
BOMB: bomb begins dropping, when mouse clicks near the bird.
- bomb continues falling (until bottom of screen)
- if bomb hits hero, make a flash. (LATER: deduct 50 points!)
- EXTRA: clicking on a bomb destroys it.
GOLD: If click is on the grass but NOT near the hero (nor in the sky),
. . . create a GOLD nugget: 3 concentric circles, shades of yellow/orange.
- When hero gets within 10 pixels of gold, it vanishes (add 100 points!)
(Note: there is only one gold nugget at a time; it moves to where you click.)
MOUSE CLICK ACTIONS: As mentioned above, clicking does one of theses things:
1. Clicking near the bird starts the bomb dropping.
2. Clicking on the falling bomb makes it vanish (bombY = -1).
3. Clicking on the hero reverses his direction in X only.
4. Clicking elsewhere on grass creates GOLD nugget.
5. Clicking on the sky does nothing.
NOTE: These descriptions are very approximate.
Feel free to vary the details and/or to add extras.
Be sure to make everything "modular", to make changes easier.
Each method MUST begin with a comment that says what you are trying to do!
In project #2, score is displayed in upper-right corner.
Also: different keys will cause other effects.
|