Interactive Media & Game Development
Worcester Polytechnic Institute

IMGD


IMGD-3000: Technical Game Development I
Project 4
Due: Saturday, February 13, 2010 at 11:59pm

Objective: THIS PROJECT SHOULD BE DONE IN YOUR PROJECT TEAMS!

In this project, you will learn how to generate a labyrinth structure for use in the game "Jäger: The Hunt for Crazy Gert's Gold!"

You will implement zones and portals around each cell of the maze. As you will notice, the framerate drops significantly with large mazes. The use of zones and portals will make this run significantly faster.

You will create the remaining data structures that will make up the rest of game.

You will add a way to exit the game.

There are two parts to this project: a "Preparation" part, and a "New Stuff" part.


Preparation: Compile and run your code-base before making any of the changes required for Project 4. (pretty easy, eh?)

New Stuff:
  1. You will need to write the code to generate a random labyrinth layout, based on the following rules:
    1. Each cell in the m x n maze should be assigned a cell type.
      (see JaegerMaze.h for the list of legal types. CELL_NONE is a valid filled cell type).
    2. Two cells may adjoin only if the adjoining sides are both openings or both walls.
    3. A cell side that abutts the edge of the maze must be a wall.
    4. A fully filled maze is only valid if there is a path from every filled cell to every other filled cell.
    5. At least 50% of all cells must have a type other than CELL_NONE.
    6. Cycles in the maze are okay.

    A method stub Maze::GenerateRandomMaze( long seed ) has been defined for you in the file JaegerMaze.cpp. You are to place your code within this function stub. The parameter 'seed' is the random number seed you should use before generating your random numbers.

    You should create (or modify ;-) a console command: "random <seed>", where <seed> is the seed to use. A default seed should be taken from the variables.cfg shipped with the Jaeger source.

  2. You will implement zones around each cell, and portals between each pair of reachable cells.
  3. You will implement code to display an "Exit" from the maze. This should be some marked trigger in the cell where Hedi spawns, so he can find his way back following dropped jellybeans. The trigger should exit the game.
  4. Art stuff goes here.
At the end of this project, you should have a fully working version of the game!

Attacking
the Problem:
This problem has less to do with C4 and more to do with coming up with a "good" algorithm to generate a proper labyrinth. So, independent of C4, you should be able to come up with code to do this. Start by looking at JaegerMaze.cpp and JaegerMaze.h, and try to see what you make of them. Most of your changes will be in these files.

As always, use the C4 wiki to help get you up to speed. Also, look at the Guide as a source info.

Next, read through the C4 Forums on the things that you are stuck on. They know you are coming, so please post to the "Beginners" forum with your questions! Of course, read through older posts before submitting.


Documentation: You must create adequate documentation, both internal and external, along with your project. The best way to produce internal documentation is by including inline comments. The preferred way to do this is to write the comments as you code. Get in the habit of writing comments as you type in your code. A good rule of thumb is that all code that does something non-trivial should have comments describing what you are doing. This is as much for others who might have to maintain your code, as for you (imagine you have to go back and maintain code you have not looked at for six months -- this WILL happen to you in the future!).

I use these file and function (method) headers, in my code. Please adopt these (or the official CS ones) for all your projects. The file header should be used for both ".h" and ".cpp" (or ".c") files.

Create external documentation for your program and submit it along with the project. The documentation does not have to be unnecessarily long, but should explain briefly how you altered the source files, and which art assets you created.


Submission: All documents are to be submitted electronically via turnin by 11:59 pm on the day the assignment is due.

Make sure to include a README file as well, listing the names of your team members, and a short description of what each person did.

When you are ready to submit, zip everything up into a single archive file.
Name the file LastnameFirstname_proj4.zip.

You will use the new Web-based "Turnin" facility to submit your work. Information about submitting can be found here:

http://web.cs.wpi.edu/~kfisler/turnin.html.

Choose one of your team members to submit the document.

Your WPI user ID should be used to login, and you should have been emailed a password.
The Turnin assignment ID is proj4.


Academic
Honesty:
Remember the policy on Academic Honesty: You may discuss the project with others, but you are to do your own work. The official WPI statement for Academic Honesty can be accessed HERE.


Back to course page.