Our code has two main components: the stratagus engine written in C++, and the client API, written in Java. The code is organized in the repository so that these two components are at root directories. There are a few other directories for projects that use these main components. The top-level directories are
client branches tags trunk engine branches tags trunk maps members projects tools
The "client" directory contains the Java client API, the "engine" directory contains the stratagus C++ engine. The "maps" directory contains common maps used for agent evaluation. The "member" directory is a sandbox where project members can keep any of their own code. The "projects" directory is for components that are shared among members. The "tools" directory is for small programs that manipulate the stratagus map data.
Coding standards apply to the client API, the stratagus engine, and any code in the "project" directory that is shared by the strategy manager project ("strategy manager" is an architecture for playing stratagus using a high-level task network). We'll keep standards to the minimum needed to work together.
So that indenting appears the same on every machine, indenting will be done with spaces, not tabs. The indent level is 4 spaces.
Each project (JAR file) should have unique packages. We shouldn't have two JAR files containing class files in the "orst.stratagusai" package, for example. Package names will begin with "orst.stratagusai". Package names should be a short lowercase abbreviation describing the package domain or function. Avoid acronyms.
Generally, only the highest-level control code should call System.exit(). If a lower-level module ends the program, it is taking over the control of the application in a way that may not allow cleanup of the state. Ending the application may be unexpected to the user, and it can be hard to diagnose the cause. When an unrecoverable error conditions is detected, lower-level modules should throw an Exception and let higher-level code decide what to about the error condition.