CIS 300: Introduction to Computer Game Design

Assignment 4
Functional Specification

The Functional Specification Document

The purpose of this document it to be a resource from the programmers on the team. The Functional Spec gives the programmers an easy way to see the overall code architecture, and quickly see how components are related. 

A decent but not fantastic start is is the header files for all your classes. That at least gives you a crude picture of what's happening in your code, and you can use tools like Visio to generate nifty diagrams. But as all coders are aware, just looking at header files won’t give you the best sense of how the overall code is organized in interrelated. 

The Functional Spec should be more than that: it should give any coder (even one that isn’t part of your dev team) a way to see how everything is put together, what the important pieces are, how the classes are related, and how information flows. 

We require that your Functional Spec contain four sections:

  • A brief verbal description of the overall software design, the major parts of the code, and how those parts interact with each other. Include rationale for important architecture decisions.
  • A diagram of class hierarchy relationships – inheritance, etc. 
  • A diagram of how objects are connected to each other, in terms of game mechanics. 
    • What objects interact with other objects? 
    • What information is passed between these objects?
    • How do objects affect each other?
    • How do typical game events propagate along these relationships?
    • Most likely, each connection will correspond to some method in your architecture.

    This is the hardest part of the functional spec, but the most important. It will help you make the distinction between core engine and systems, and data-driven implementation and content. Understand these relationships, and you'll have a good handle on the methods needed in your code.

  • A well-documented list of all your classes, including member fields and methods. Think along the lines of http://java.sun.com/j2se/1.5.0/docs/api/ . You may want to use a documentation system like Doxygen.

In general, what’s going to be useful in the Functional Spec depends a lot on the sort of project you’re coding for. It’s going to be up to each group to determine what information is important, and how best to present it. is a great model. Remember that this is a living document. It's only kind of useful you make it once and then forget about it. Therefore, you should update it regularly when there are major code changes. Again, using something like Doxygen will make your life easier.

 

 

Submit to CMS by Friday, September 29th at 11:59pm.