Interactive Media & Game Development
Worcester Polytechnic Institute

IMGD


IMGD-3000: Technical Game Development I
Project 1
Due: November 5, 2007 at 11:59pm

Objective: 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!"

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


Preparation: The aim of this preparation part is for you to get your feet wet in the Jaeger development framework, as well as with C4.
You will download the Jaeger codebase, compile it on your system, and then execute it to see how it works.

Download the ZIP file from the appropriate forum on the MyWPI Web site for this course. Copy it to the directory where you will be doing your work, and unzip it. There will be a whole source tree, with accompanying project files for building using visual studio.

Once you have built your code, run it, and press the tilde/grave key to bring up the command console. Then type "default" to launch Jaeger with a simple labyrinth. Hit tilde/grave again to dismiss the command console, and then hit the ESC key to allow movement.

Use the WASD keys to move around the default labyrinth, and the mouse to look around.


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 Maze.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. Cyles in the maze are okay.

    A method stub Maze::GenerateRandomMaze( long seed ) has been defined for you in the file Maze.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 defualt seed should be taken from the variables.cfg shipped with the Jaeger source.

  2. Art stuff goes here.

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 Maze.cpp and Maze.h, and try to see what you make of them. Most of your changes will be in these files.

A great place to start getting up to speed on the C4 stuff is on the C4 wiki. Start with something small, like the "Hello World" tutorial, and work up from there.

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_proj1.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 be mailed emailed a password real soon now...
The Turnin assignment ID is proj1.


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.