Installing “Teeworlds” (Multiplayer 2D Game) and Creating Teeworlds Game Server
Teeworlds is a free 2D Multplayer online shooting game for Linux, Windows and Mac, very enjoying, it include many game modes (16 players game modes) like Deathmatch, Capture the Flag and many other game modes that are developed by game community, you can even design your own maps, create your own server mode and invite friends to it.
You can have a quick look of the gameplay, created by the developer at:
Step 1: Installing Teeworlds Game
The game is available to download from Ubuntu repositories, run.
$ sudo apt-get install teeworlds
In Fedora, the game is also available in the repositories, run this command as root.
# yum install teeworlds
You can also play it on OpenSUSE, download teeworlds package from the OpenSuse software download page.
Step 2: Create a Teeworlds Server
What we’ll be explaining now is, how to create a teeworlds server and how to configure it, of course you need to have an online server to do this (you can create a teeworlds server from your personal computer, but it will be very slow due to slow Internet connection, thats why you need an online server).
Creating a Teeworlds server is very easy in fact, you just need to install the ‘teeworlds-server’ package to do it, to install on Ubuntu.
$ sudo apt-get install teeworlds-server
On Fedora/OpenSUSE or any other distribution, you need to download Teeworlds from offical download page, and run the ‘teeworlds-server‘ file to start the server.
The Teeworlds server will be started on the same IP of your server and the 8303 port by default, let’s say that your IP address is xxx.xxx.x.xxx, the server will be on at xxx.xxx.x.xxx:8303 by default.
Open the game by running the following command, enter the IP and the port in this box. Replace xxx.xxx.x.xxx with your IP number.
Step 3: Configure Teeworlds Server
We’ll now dive into configuring the Teeworlds Server, if you are on Ubuntu, create a file named “teeworlds_srv.cfg” in your home directory.
$ nano teeworlds_srv.cfg
Add the following code to it. Save and close the file.
sv_name Tecmint Test Server sv_motd Welcome to our server! sv_gametype ctf sv_warmup 0 sv_map dm1 sv_max_clients 16 sv_scorelimit 1000 sv_rcon_password somepassword sv_port 8303
We’ll explain each of above lines in detailed fashion.
- sv_name: Name of the server.
- sv_motd: The welcome message.
- sv_gametype: The type of the game, it can be “ctf”, “dm”, “tdm”.
- sv_warmup: If you want to create a warmup before the game start, must be in seconds.
- sv_map: Map of the game, it can be “dm1”, “dm2”, “dm3”, “dm4”, “dm5”, “dm6”, “dm7”, “dm8”, “dm9”, “ctf1”, “ctf2”, “ctf3”, “ctf4”, “ctf5”, “ctf6”, “ctf7” keep trying in those maps until you find a nice one for your server.
- sv_max_clients: Maximum number of player on server (max is 16).
- sv_scorelimit: When a player reach the score limit, the game restarts.
- sc_recon_password: A password to access server settings from F2.
- sv_port: The port for game, default is 8303.
There are many other options provided by teeworlds, you take a look server settings page.
Now to run our Teeworlds server with the new configuration, apply.
$ teeworlds-server -f teeworlds_srv.cfg
Now if you are on another distribution, create the “teeworlds_srv.cfg” file in the same directory that the “teeworlds_srv” file exists (same is where you extracted the game), and run:
$ ./teeworlds_srv -f teeworlds_srv.cfg
And your server will be ready! You can find more about Teeworlds server configuration at official teeworlds documentation page.