Object Design Document (ODD)

From ALESwiki



Table of contents

Introduction

The A.L.E.S. system is a continuously running, interactive simulation game. This game is designed to be very simplistic and easy to learn, yet have a fair amount of accuracy and enough entertainment to make people want to play over and over. The game's initial design only includes enough objects and controls to get started, but as we release later versions, many upgrades can be easily added.


This simulation models a drop of water, under glass, with living organisms inhabiting it. This is all viewed through the lens of a microscope, or as we call it, the game board. You will be given the option to create your own custom game, or start with a predefined game. From there, it is up to you to main the environment to help it grow and thrive.

Subsystem Decomposition at the main level.


Main System


Image:mainalessub.png





Level 2





Game Subsystem


Image:GameSub.png


FileIO Subsystem


Image:FileIOSub.png



GUI Subsystem


Image:GUISub.png



Object Design Trade-offs

In the ALES system, there were a few design decisions that were contested during the analysis phase of our project. During these discussions, we went through many scenarios to decide which direction to take and ultimately had to put each decision to a vote. The main points of contention were how to store creatures in the system and how the creatures would make their decisions.


There were two differing view points on how to store creatures. The first was that the creatures should be stored in an array of creatures, then the GameManager could cycle through this array and based on its internal variables, assign the creature an action that it would perform. This was a straight forward solution and easy to visualize.

The other creature storeage technique was to use an Object Oriented approach. This would involve creating each creature as its own object. The creature object would internally store its own properties and methods/actions. Then, there would be a list the GameManager would iterate through and tell the object to do "something". It would be up to the object to decide what to do, based on its own values and the values of any objects surrounding it.

We ended up choosing the object oriented approach because it simulated the actual environment closer and also lent itself to easy expansion. Although it would take a little more planning in the initial stages, this was the best solution for maintainability and scaleability.




Interface Documentation Guidelines



Definitions, Acronymns, and Abbreviations

ODD
Object Design Document
GUI
Graphical User Interface
ALES
Automated Life Ecosystem Simulation
JDK
Java Development Kit
JRE
Java Runtime Environment
A.L.E.S.
The Artificial Life Ecosystem Simulator
Algae
Plant Critter. Algae are unable to move, they can only consume nutrients and reproduce.
Amoeba
Plant eating creature in the environment. It does not hunt other creatures. This is more of a herbivore creature.
Critter
Any living creature in the ALES environment. This can be Algae, Paramecium, or ...
Hex
A single unit of the game board that can be occupied by a critter.
Nutrients
A general description for the amount sustenance in the water.
Paramecium
This creature is more of a carnivore. Part of its behavior is that it eats other critters in the ecosystem.
Slider
A control in a GUI interface that slides back & forth on a scale and assigns a value based on the position of the slide button, relative to the endpoints.
Temp
The temperature attribute for the game board or for a hex.
Tile
This is the same thing as a Hex or Hex-Tile. A single unit of the game board that can be occupied by a critter.



References

How to Program in Java, 5th Edition, Dietal & Dietal


The Definitive Guide to Java Swing, 3rd Edition, John Zukowski


Object-Oriented Software Engineering: Using UML, Patterns, and Java; 2nd Edition, Bernd Bruegge


Sun Microsystems website, http://java.sun.com/reference




Packages



GUI Subsystem

Contains the packages, interfaces, and classes responsible for user interaction with the system and display of information to the screen.



UI Package

Contains interfaces and classes that allow the user to interact with the system.

  1. menus.java
    includes interfaces to the IO Subsystem
  2. gamecontrols
    1. sliders.java
      interface objects to control Game elements
    2. clockface.java
      interface to the game clock



Display Package

  1. GameWindow.java
    container for sliders, animator
  2. BoardBuilding.java
    container for BoardBuilding Game elements




File I/O Subsystem

  1. Wrap.java
    Class that collects and packages game info. Requires interfaces to GUI and GamePlay subsystems.
  2. UnWrap.java
    Collects a file from the system and passes information to the GUI and GamePlay subsystems. Requires interface to both systems.




GamePlay Subsystem

Contains the Animation Package, which draws the board and keeps the time, and the board package, which contains the game elements themselves.

Animation Package

  1. CreatureStore.java
  2. animator.java
    implements creature
    interfaces with GUI.windows
  3. boardmanager.java
    interfaces with creatureStore

Board Package

  1. pond.java
    the pond has three variables that effect the behavior of creatures
    Must interface with GUI.sliders
  2. creature.java
    superclass contains the position data and a method to get.
  3. barrier.java
    implements creature
  4. algae.java
    inherits creature, adds health modifiers and methods to relate health to the water, die and beEaten methods, reproduction methods
  5. paramecia.java
    inherits algae, adds movement method, eat method
  6. amoeba.java
    inherits algae, implements paramecia movement

Class Interfaces