Open up the terminal and type this in (hit enter of course):
wget https://github.com/teeworlds/teeworlds/archive/master.zip
This fetches the source code of Teeworlds from github.
unzip master.zip
cd teeworlds-master
This unzips "master.zip" and "cd"s into the new directory.
Unless you already have, enter the following to install the package "build-essential".
sudo apt-get install build-essential
Type in your password, and hit enter.
After that type this:
Wait for it to compile. Hopefully there are no errors.
Then "cd" into the folder with the generated binary.
For a 64-bit system, enter this:
For a 32-bit sytem, enter this (I think this is right):
Move the server binary into the original "teeworlds-master" directory.
mv teeworlds_srv ~/teeworlds-master
Then cd back into the original directory:
Create a config file for your server with a text editor. Here's an example:
sv_name Test Server
sv_rcon_password mysecretpassword #use this to log in as admin in the "f2" console
sv_register 0 #set it to "1" for it to show up in master servers
sv_map myMap #change it to the name of the map you want to test
sv_gametype ctf #change it to "dm" if it's a dm map
sv_scorelimit 1000
Now run the server:
Enter "CTRL-C" to stop the server.
If you want to run the server in the background (only if you're in a SSH session or something), use this instead:
and then, while it's running, type:
To see your background processes, enter this:
You should see something like this:
[1]+ Running ./teeworlds_srv &
The "1" in brackets represents the job number.
To bring it back into the foreground, type this:
Here, the "1" represents the job number.
To set it back into the background, hit CTRL-Z and type "bg" again.
To kill the process, type this:
Again, the "1" represents the job number.
If you have problems, check out this page here.
To test the map on your server, open up your Teeworlds client and click on the "LAN" tab. You should see your server there.
Also, after you save your map, go to your server, hit "f2" (type in your rcon password), and type "reload".
Hopefully I got this all right.
A is for Apple.