Development for FreeCraft Version 1.18


     ___________		     _________		      _____  __
     \_	  _____/______   ____   ____ \_   ___ \____________ _/ ____\/  |_
      |    __) \_  __ \_/ __ \_/ __ \/    \  \/\_  __ \__  \\   __\\   __|
      |     \   |  | \/\  ___/\  ___/\     \____|  | \// __ \|  |   |  |
      \___  /   |__|    \___  >\___  >\______  /|__|  (____  /__|   |__|
	  \/		    \/	   \/	     \/		   \/
    ______________________                           ______________________
			  T H E   W A R   B E G I N S
	   FreeCraft - A free fantasy real time strategy game engine

(C) Copyright 1998-2003 by The FreeCraft Project. Distributed under the "GNU General Public License"


This file should give you some information to help to develop FreeCraft.

If you make bigger changes please always extend the copyright with your name.

Mailing list

If you want to develop for FreeCraft you should join the development mailing list.

FreeCraft development Archives

Subscribe FreeCraft development

IRC - Internet Relay Chat

You can try to meet other FreeCraft developers and users on IRC: OPN OpenProjects Network, channel #FreeCraft.

Bugs and tasks

You can find known bugs here:

FreeCraft real-time strategy game engine - Tracker - Bugs

And the planned tasks here:

FreeCraft real-time strategy game engine - Tasks

Before doing some work, please ask on the mailing list, whether anybody else is doing the same thing and write what you plan to do to avoid that someone else starts the same work.

Compiling, tools, and libraries

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.

You find all information about CVS on SourceForge.

Getting FreeCraft from CVS

There are four modules in CVS repository.

How do I access to these modules?

Anonymous CVS Access
This is for all user/developer/designer without account on SourceForge.

Make somewhere a directory FreeCraft. Enter this directory.

cvs -d:pserver:anonymous@cvs.freecraft.sourceforge.net:/cvsroot/freecraft login
"When prompted for a password for anonymous, simply press the Enter key."
cvs -z3 -d:pserver:anonymous@cvs.freecraft.sourceforge.net:/cvsroot/freecraft co freecraft
cvs -z3 -d:pserver:anonymous@cvs.freecraft.sourceforge.net:/cvsroot/freecraft co crafted
cvs -z3 -d:pserver:anonymous@cvs.freecraft.sourceforge.net:/cvsroot/freecraft co fcgp
cvs -z3 -d:pserver:anonymous@cvs.freecraft.sourceforge.net:/cvsroot/freecraft co fcsp

You will now have the directories freecraft, crafted, fcpg and fcsp.

In the future, only go into any directory and enter "cvs -q update -d" to update to the latest version.

Developer CVS Access via SSH
Only project developers can access the CVS tree via this method. Substitute developername with the proper values. Enter your site password when prompted.

export CVS_RSH=ssh
cvs -z3 -d:ext:developername@cvs.freecraft.sourceforge.net:/cvsroot/freecraft co freecraft
cvs -z3 -d:ext:developername@cvs.freecraft.sourceforge.net:/cvsroot/freecraft co crafted
cvs -z3 -d:ext:developername@cvs.freecraft.sourceforge.net:/cvsroot/freecraft co fcgp
cvs -z3 -d:ext:developername@cvs.freecraft.sourceforge.net:/cvsroot/freecraft co fcsp

You will now have the directories freecraft, crafted, fcpg and fcsp.

In the future only go into any directory and enter "cvs -q update -d" to get the latest version. You'll be prompted to enter your ssh password.

Getting FreeCraft without CVS

Please note CVS is always a little newer and it is easier for you to keep up to date. But you find regular snapshots of the FreeCraft source here:

Linux(tm)

To build FreeCraft with Linux you will need the following packages. The following list refers mainly to Debian packages. You'll have to figure out the corresponding packages in your particular distribution.

MacOS(tm)

To build FreeCraft with MacOS you will need the following packages.

Windows(tm)

You need a C compiler for Windows. Get one of the following.

Windows CE(tm) / PocketPc(tm)

You need a C compiler for this platform.

You need the following libs for WinCE. Now you need the emVC++ project and emVC++ workbench for FreeCraft.

With the sources from CVS, you can continue working.
Note: WinCE isn't supported yet.

Make and makefiles

Remember the first time you must start ./setup or copy Rules.make.orig to Rules.make and edit it.

Type 'make help' to get an overview what all could be made.

'make depend'

and then

'make'

is all you need, most times.

C code documentation

See below: you can use always the source code documentation.

I have prepared some extra documentation:

Source code documentation

Valery Shchedrin has introduced tagged source documentation. I continue to use them.

This programs are required

You need one these programs to generate source code documentation.

Generate documentation from source code

Please compile and install one of the above programs. With these commands you produce the documentation:

Tags used in source code

I use the doc++ tags:

/** ... */

Multi line source code documentation.

/// ...

Single line source code documentation.

//@{ or /*@{*/

Start grouping.

//@} or /*@}*/

End grouping.

Please read the documentation of the programs.

Empty C prototype file

//   ___________		     _________		      _____  __
//   \_	  _____/______   ____   ____ \_   ___ \____________ _/ ____\/  |_
//    |    __) \_  __ \_/ __ \_/ __ \/    \  \/\_  __ \__  \\   __\\   __|
//    |     \   |  | \/\  ___/\  ___/\     \____|  | \// __ \|  |   |  |
//    \___  /   |__|    \___  >\___  >\______  /|__|  (____  /__|   |__|
//	  \/		    \/	   \/	     \/		   \/
//  ______________________                           ______________________
//			  T H E   W A R   B E G I N S
//	   FreeCraft - 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}
//
//	FreeCraft 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; only version 2 of the License.
//
//	FreeCraft 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.
//
//      $Id$

//@{

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

#include <stdio.h>

#include "freecraft.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 old coder.

I suggest: (Linux kernel coding style)

Sending a patch

Now you made something, how this should be included into the main distribution?

Follow the following steps:

Building FcGP (outdated see FcMP)

You always need the newest tarball from FcGP, because not all files are already imported into CVS.

Building FcSP (outdated see FcMP)

You need FcGP, without this FcSP can't be used. Follow the above instructions.

Building FcMP

The new FcMP (FreeCraft Media Project) isn't yet available from CVS. You can only download it as complete archive. Download it, extract it, copy the binary freecraft(.exe) into the top directory and start it.

Building CraftED from CVS

CraftED uses autoconf and configure. To build from CVS use.

./autogen.sh
make
./src/crafted

Note: the first time you must enter your path to the FcMP/original data directory. For more documentation please look into the docs directory.

Building CraftED from tarball

CraftED uses autoconf and configure. To build from tarball distribution use.

./configure
make
./src/crafted

Note: the first time you must enter your path to the FcMP/original data directory. For more documentation please look into the docs directory.


All trademarks and copyrights on this page are owned by their respective owners.
The FreeCraft Project