Friday

How-to compile DDRace on Linux

Install development-environment as root (or via sudo on Ubuntu):

Debian, Ubuntu, (and Debian based distros): 

Code:
apt-get update && apt-get install build-essential libsdl1.2-dev libfreetype6-dev
RH based distros (just guessed) like Fedora: 

Code:
yum install SDL-devel python gcc alsa-lib-devel freetype-devel
Something similar on Gentoo using portage to get sdl (and python)- gcc should be already installed on Gentoo because normally everything would be compiled fresh before it would be installed on Gentoo. I'm not sure if that alsa, gl and glu stuff is really needed (for example if you just would compile the server) - however I learned that from TW howto: http://www.teeworlds.com/?page=docs&...lingEverything

GreYFox told me on Ubuntu it was ok with just:
Code:
apt-get update && apt-get install build-essential libsdl1.2-dev
. But not every distro cames with same packages out of the box. So you can try with that one (to avoid useless stuff on your HD) and if something is missing at compilation came back an install even other stuff.

Use urpmi on Mandriva. Most time the names should sound similar (even on SuSE, Slackware, ...) so it should be not so difficult if your really like to compile it. Development-packets are sometimes called *-devel on CentOS or RHEL and *-dev on Debian. These are the packages which should contain even headers. 

If you have all you think you would need follow with that steps (which should work in same way on nearly every distro):


Do as some user (no need for root):

Code:
mkdir ddrace-compilation
cd ddrace-compilation
wget http://github.com/matricks/bam/tarball/master
mv master bam-source.tar.gz && tar xvfz bam-source.gz 
cd matricks-bam*       # if you have already downloaded some matricks stuff in the past for sure cd into that instead of wildcard
./make_unix.sh   # if everything is ok you should have some file called 'bam' now in your directory
cd ..
wget http://github.com/GreYFoXGTi/DDRace/tarball/master
mv master GreYFoXGTi_source.tar.gz && tar xvfz GreYFoXGTi_source.tar.gz
cd GreYFoX*    # if you have already downloaded source from GreYFoX cd into right version instead of wildcard
../matricks*/bam release        # now it should compile - if you don't need all but just server change release to server_release
Note: I've used a lot of wildcards (*) above. If you do with different versions please avoid that and use full filenames instead. If something goes wrong at the "bam release" step then look what it's telling you. Look if you get all stuff you might need and download. If he miss some file you should get a clue at the error lines (warning lines are not beatifull but ok). Look even at "dev" or "devel" packets (maybe not python but other stuff like SDL). Most time you need that "devel" or "dev" packets if you like to compile and not just the binaries or libs (which came without headers so it can't be included). Take a look here to get an idea what you might need: http://www.teeworlds.com/?page=docs&...lingEverything

There are lot of different distros out there and even if most feel similar if you get deeper into Linux-World they might have some differences. In that case please ask in the forum.

How to Compile DDRace on Windows

Download Visual C++ 2010 Express in your language
after it is downloaded install it using the default settings, no need to change anything.


Now go to python.org and get the latest 2.x python ( since tw files are not all python 3.x ready )

install python in it's default location c:\python2x don't change anything or you may regret it later...


after having downloaded and installed these tools it's time to download bam trunk and compile it

click here to get the latest bam trunk src code 

now unzip the downloaded zipfile and run make_win32_msvc.bat

you may see some warnings but thats ok

now click here to get the latest DDRace Source Code
now click here to get the latest DDRace Stable to trunk converter
now click here to get the latest DDRace Beta to trunk converter

unzip this to any folder

now go to the bam folder and get bam.exe and paste it into the unzipped DDRace folder

now open notepad and paste this in:
Code:
@echo off
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
:start
cls
@taskkill /f /im "DDRace-Server.exe"
@taskkill /f /im "DDRace.exe"
bam server_release client_release
echo now please start the client or server as you need
pause
goto start
save this file as Build.bat
NOTE: this must be saved in the same dir as bam inside DDRace folder that you unzipped

now all you have o do to build DDRace is double click this files

What is DDRace.

DDRace is a modification of Teeworlds (teeworlds.com).
It was created by 3DA and is based on the [N]race mod created by Nox Nebula which is also based on the race mod by Rajh and Redix.
Currently DDRace is maintained by GreYFoX@GTi and btd.