Development for Stratagus Version 1.18


This file should give you some information to help with development of Stratagus.

Mailing list

If you want to help with development for Stratagus you should join the stratagus-devel mailing list.
You may also want to look at the archives.

IRC - Internet Relay Chat

You can try to meet other Stratagus developers and users on the FreeNode IRC Network, in channel #Stratagus.

Bugs and tasks

You can find known bugs and planned tasks on the Savannah pages of Stratagus.

Before starting on a bug or task, please ask on the mailing list or in the IRC channel whether anybody else is already working on it.

Building Stratagus

Installing CVS client

If you want to help develop, it is the best that you use CVS. To do so, first you need CVS for your system. Savannah has a guide that will help you get started.

Getting Stratagus from CVS

There are 3 modules in the CVS repository.

How do I access to these modules?

The instructions for accessing the modules are on the project cvs page.
NOTE: it is highly recommended that you use the -z3 flag, this compresses the data and therefore speeds the transfer up.

For example:

cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/stratagus login
"When prompted for a password for anonymous, simply press the Enter key."
cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/stratagus co stratagus
This is done only once. To update your CVS directory, go into the module directory and type 'cvs -z3 -q update -dP'.

You may put these flags in your ~/.cvsrc file so that you only need to type 'cvs update', the cvs (1) man page will show you how.

Getting Stratagus without CVS

Please note CVS is always the latest and it is easier for you to keep up to date. But if for some reason you cannot get the source via CVS, you find can regular snapshots of Stratagus here.

Compiling Stratagus

You can find instructions for compiling Stratagus at install.html.
Since you already have a copy of the source, you may skip ahead to step 2.

Source code documentation

Valery Shchedrin has introduced tagged source documentation for Stratagus.

You need either DoxyGen or DOC++ to generate source code documentation. You may then use the following commands to produce the documentation:

Tags used in source code

We use the doc++ tags:

Multi line source code documentation:

/** ... */

Single line source code documentation:

/// ...

Start grouping:

//@{ or /*@{*/

End grouping:

//@} or /*@}*/

Please read the doxygen/doc++ documentation.

Empty C prototype file

//       _________ __                 __                               
//      /   _____//  |_____________ _/  |______     ____  __ __  ______
//      \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
//      /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \ 
//     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
//             \/                  \/          \//_____/            \/ 
//  ______________________                           ______________________
//			  T H E   W A R   B E G I N S
//	   Stratagus - A free fantasy real time strategy game engine
//
/**@name {filename}.c	-	{One line description of this file} */
//
//      (c) Copyright 2003 by {insert your name here}
//
//      This program is free software; you can redistribute it and/or modify
//      it under the terms of the GNU General Public License as published by
//      the Free Software Foundation; version 2 dated June, 1991.
//
//      This program is distributed in the hope that it will be useful,
//      but WITHOUT ANY WARRANTY; without even the implied warranty of
//      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//      GNU General Public License for more details.
//
//      You should have received a copy of the GNU General Public License
//      along with this program; if not, write to the Free Software
//      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
//      02111-1307, USA.
//
//      $Id$

//@{

/*----------------------------------------------------------------------------
--	Includes
----------------------------------------------------------------------------*/

#include <stdio.h>

#include "stratagus.h"

// More game includes.

/*----------------------------------------------------------------------------
--	Variables
----------------------------------------------------------------------------*/

// Global and local variables of this module.

/*----------------------------------------------------------------------------
--	Functions
----------------------------------------------------------------------------*/

// Local and global functions of this module.

//@}

Coding style

You can use your own coding style in your own modules. If you fix in other modules, please imitate the coding style of the original coder.

We suggest the Linux kernel coding style (also found online here).

NOTE: If you make big changes please always extend the copyright with your name, and always update the copyright year if required.

Sending a patch

Once you have completed some work, you will probably want it to be included in the main Stratagus source.

Follow these steps:

Building FcMP

Once you have the fcmp module, go into the 'fcmp' directory, and edit the location variables if necessary in 'buildfcmp.sh'. Then run the 'buildfcmp.sh' script and it will create a working data.fcmp directory.

Please read the Stratagus data directory description.


(C) Copyright 1998-2003 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.