Project site setup

From FreeGameDevWiki

Jump to: navigation, search

For an open source project, it is useful to setup a project site. There are many free free software project hosting facilities.

Contents

Choosing a host

Many services are provided by free software project hosting facilities: Mailing lists, source code repositories, bug and feature request trackers, wikis, forums, web site and file hosting and more.

You can read our personal recommendations on this topic.

Choosing a version control system

A few notes on version control systems, considering the special requirements of games. The main issue that comes up with version control of game code and data is support or lack there of of partial checkout (also called narrow and shallow cloning). This means some version control system clone always the whole repository on a checkout, including all directories and all versions, which when you store large binary files in your repository, will lead to very large downloads, even when a user is only interested in a small subset of your project.

CVS

  • old and obsolete

Subversion

  • easy to learn
  • good Windows support
  • allows partial checkouts
  • does not support changesets, only plain patches, i.e. users without write permissions will have a hard time working on the repository
  • does not support distributed development
  • backup has to be manually done via "svnadmin dump" or "svnsync"

Git

  • harder to learn
  • wonky Windows support
  • does not allow partial checkouts, everybody has to download everything (very bad for big media files)
  • does support changesets
  • does support distributed development
  • backup is "automatic" in the sense that each checkout of the repository contains everything in the repository

Mercurial

  • similar to Git

Setting up the host

Setting up Subversion

Different projects have different needs, the following layout however works quite nicely for games and is used by Pingus, SuperTux, Windstille and a few of other projects. The structure is as follows:

  • trunk/projectname - your engine code goes here
  • branches/branchname - in case you need to work you "svn cp" your code here
  • tags/projectname-version - when you do a release, you "svn cp" the code of the release

The different to the SVN default layout is that there are subdirectory under trunk/, one for each sub-projects of your game. Common sub-projects are:

  • trunk/media/ - source for your graphics, music and other media, these are often huge, so you want to separate it from your engine source code
  • trunk/projectname-editor - in case you have an external game editor
  • trunk/htdocs/ - your webpage source

An alternative is to use multiple SVN repositories for each sub-project.

Subversion Backup

Most code hosting services do not guarantee backup, therefore it is the users job to make regular backups, for SVN there are two ways. One way are full database dumbs via:

svnadmin dump ...

Many hosting provider have regular dumps to download. These dumps can however get a little large for bigger projects, an alternative is to use svnsync, which will only download the updates to the repository, not the full dump:

# Create a new empty local repository that will be linked to your remote repository, do this once
export SVNBACKUP=/home/juser/svnbackup
svnadmin create $SVNBACKUP
echo '#!/bin/sh' > $SVNBACKUP/hooks/pre-revprop-change
chmod +x $SVNBACKUP/hooks/pre-revprop-change
svnsync init file://$SVNBACKUP svn://your/remote/repository
# Copy all changes from the remote repository to the local one, do this regularly
svnsync sync file://$SVNBACKUP

Unlike a normal "svn checkout" a repository done via svnsync contains all the history of the project, not just the latest version.

Personal tools