Homework 3: Take a Stroll

Short Description:

Write a program that allows the player to navigate a sprite around a map picking up treasures and avoiding bad guy(s).

This assignment is worth 30 points.

Goals

When you finish this homework, you should

Formal Description

Create a game that allows a character to wander around a fixed world collecting treasures. Your game should be based on the Sprite character developed in class. You should modify this to use a character with four animation directions like:

.

Your program should use the correct orientation for the character deepening on the direction last traveled. So if the last move the character made was to the right, the right facing sprite should be displayed.

The character should move some reasonable distance when the player issues a move command. If you wish you may have two levels of move, a walk and a run.

Your player should not be able to walk outside of the canvas.

You may use buttons for navigation or you may incorporate canvas keypress events or mouse click events which we will discuss soon.

You should have treasures that pop up on the screen at random, in random locations. When the player comes into contact with these treasures they should collect the treasure and a displayed score should increase. You should have at least two treasure types and the scores for each should be maintained in a different count and display. You should have different images for each treasure.

You should have a "goal" area which ends the game when the player enters. You should disable any further movement and put "Game Over" on the canvas when this occurs.

You should have at least five obstacles in your game. These can be as simple as rectangular walls. The character can not walk through these walls and you should not spawn treasures on these walls.

Finally you should have at least one "bad guy" that moves at random around the world. The bad guy should not be able to walk through walls or outside of the canvas. The bad guy should pick up treasures they are encountered. Finally if the player comes close to the bad guy, the bad guy should steal all of one type of the player's treasure. You may have multiple bad guys if you wish and they may have more intelligent strategies as well. This is up to you.

Documentation

Please create an introduction page (index.html) that explains your game and how it is played. In addition give credit for any resources you used and acknowledge anyone you worked with producing this game.

There should be a link from this page to your game.

Additional Requirements/Comments

Extras

I find that I want to continue to play with simulations/visualizations of this type. Please do so, but only if you have sufficient time, do not enhance this, or any other project at the expense of your other classes.

Submission

When you have finished your assignment, please submit a tar or zip file containing all files needed for this project. Please do not post your project on line until after grades have been assigned.

Submit your tar or zip file as an attachment to a message to dbennett@edinboro.edu. Please include your name, and the fact that this is homework 3 and Computer Graphics in the title of the message.