main | survey | daily schedule | fundamentals | FTP help

Game Exercise 5: Using repeat loops

Lingo: intersect of sprite property, puppetSound

EXAMPLE:

The following lingo randomly changes the color of sprites in channels 5-24.

repeat with x = 5 to 24

sprite(x).forecolor=random(255)

end repeat

REVIEW: basic properties (locH, locV, width, height, color, rotation, blend, locH, locV), marker navigation, and if-then statements.

IN-CLASS TECHNICAL EXERCISES:

1) Create a single frame movie 640 x 480 pixel stage size. Place at least 20 "bricks" (vector cast membes) on stage in channels 1 through 20. Now use a repeat loop to change the colors of the bricks on stage constantly as the movie plays.

2) Create a new movie with a ball that will bounce around the walls of the stage. We have done this before by making a movie that has four markers: "upleft", "upright", "downleft" and "downright." It's harder, but you can also do this with a single behavior script that you place on the ball sprite. Place at least 10 "bricks" (vector cast membes) on stage in channels 1 through 10. Create a circular "ball" sprite and place in channel 15. Now have the bricks disappear when your ball sprite touches, or intersects them.

3) Import 5 short (less than 2 seconds) sounds into your movie that you made for Exercise #2. Whenever the circular sprite intersects a brick, write a script (use a list) to puppet one of these five sounds randomly.

**finish in class or for homework!

HOMEWORK: MIDTERM PROJECT PROPOSAL

1) Write a short paragraph about your proposed midterm project: an alternative breakout game. Address how the following aspects of the game might be creatively reinterpreted by your creation:

-Object of the game?

-Concept? You are breaking out of what?

-Scoring?

-User data?

-Llook and feel?

-Accessing other levels?

2) In Director set up your score with markers to reflect a possible game design. Print your score and annotate it to make it understandable.

3) Set up a sample "game" on stage. Print yor stage and annotate it for clarity. If you have time get started on the game!