| CS183 -- Project 1: Individual Design Project |
|
|
Course Objectives Addressed
OverviewThe purpose of this project is to develop a simple computer game. Video Introduction (requires MS Media Player 7 or higher) AcknowledgementThis project was inspired by the game "Chain Shot", written by Kuniaki Moribe in 1985. In 1992 Eiji Fukumoto rewrote the game and gave it its more common title, "Same Game." This assignment was developed by Dr. Chris Taylor. Important NoteSource code for a number of implementations of this assignment are freely available on the web. You may look at the applications to get an idea of how the game works, but you MAY NOT LOOK AT THE SOURCE CODE for any of these implementations until AFTER you have submitted your final report. Problem StatementYou and one partner are to write a version of the Same Game. Game boardThe game consists of a multi-colored tiled board. The board should be at least ten tiles high and twenty tiles wide and should have at least four unique tile colors. ![]() Game playSame Game is a one player game. The player removes tiles from the board by selecting a tile that has at least one adjacent (to the west, east, north or south) of the same color. The first click selects a group of adjacent tiles. The second click on the selected group of tiles will remove the tiles from the board. This causes the tiles to the north to shift south and tiles to the west to shift east to file the space left by the removed tiles (all southerly shifts should occur before any westerly shifts). Game scoringWhen a player removes a group of N same-colored blocks, the player's score increases by (N-2)2 points. When play has progressed to the point where there are no groups left (only single colored blocks remain), the game should end. The player's final score should be reduced by one point for each remaining block. If no blocks remain, the final score should be increased by five times the number of tiles on the full board. Game extrasAlthough not required, you may choose to incorporate additional features. These may include a high score list, resizable board, selectable number of colors for the blocks, hint feature, undo, sound, make it a two player game where players alternate turns, etc... Here are a few sites that offer versions of the game. Remember, you may not look at the source code for these implementations until after you have submitted your final report.
DesignYour design should consist of an annotated UML class diagram (see my useful software page for a tool to draw UML diagrams) expressing your high level design, a verbal description of how your objects/functions will interact, and at least one use case for your software project. HintsYou will need to store the grid of game pieces in your program. One way to do this would be to make each button be an MFC button. When a button is clicked a function would be called that will need to figure out if it is a valid move and if so, which pieces to remove and then shift the other pieces south and west. The following is a pseudocode function that is designed to give you an idea about how to tackle the problem of figuring out which game pieces should be removed.
function(i, j, count, clr) {
if(color of (i,j) == clr) {
increment count
flag piece as one to be removed
// Calls the function on the neighboring pieces
function(i-1, j, count, clr)
function( i, j-1, count, clr)
function(i+1, j, count, clr)
function( i, j+1, count, clr)
}
}
The removing and shifting of game pieces may be done by recoloring the buttons. You may find my MFC Button Coloring example useful. Dr. Rothe has developed this button framework that you may wish to use, and short Video explanation (requires MS Media Player 7 or higher) Lab reportThere should be one lab report for each pair of students. The report should consist of the following:
Deliverables
Project report templateAs with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. Your lab grade will be determined by the following factors:
If you have any questions, consult your instructor. |
| © 2002-2003 Dr. Christopher C. Taylor | Office: CC-27C | Phone: 277-7339 | Last Updated: Tue Apr 15 18:04:14 2003 |
| I am responsible for all content posted on these pages; MSOE is welcome to share these opinions but may not want to. | |||