All Packages  Class Hierarchy  Index


Q2Java API Users's Guide v0.7

These are the JavaDocs for the Q2Java Interface and sample game classes.  There are some gaps in the documentation, but hopefully they'll be filled in as time goes by.  There should be enough here to give a good overview of the structure of the code.

Name Changes

Since this is pretty much a rewrite of the original Quake II game code, I took some liberties changing the names of functions and fields.  The Coding Conventions section below lists the stylistic changes made, but a few other major ones are:

Coding Conventions

The coding conventions used in the Q2Java packages are generally based on the way Sun does things, with a little bit of Taligent and Netscape conventions thrown in too. Throughout the code, I used the indentation style where the opening and closing brackets in a block are both indented, such as:
while (true)
    {
    foo(a);
    bar(b);
    }
I realize that there are other styles more commonly used, but I'd ask that you don't mix styles within a single file - as Netscape says in their Java coding guidelines:
When you pick a style, stick to it.  When editing another person's code, respect the code, copy the style. (When in Rome, do as the Romans do).
Unfortunately, the overall indentation of the source files is a bit whacked because I used IBM's VisualAge for Java - and when it exports source code, it's not so smart about it.  Sorry about that - maybe I can get something to fix it up for later versions. 
Barry Pederson <bpederson@geocities.com>