1

Topic: Test maps on linux

How do you test maps on Linux? Every time I google how to test your maps I get someone talking about setting up a server in windows and playing the map on the LAN.  Then other videos show the person saving the map and then they are in the map as if that for some reason saving the map auto launches it.

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

2

Re: Test maps on linux

OK... I'll five you a short tutorial

you need server binaries. either download them or compile them. if you compile, you need compiler (Debian and Derivates, package build-essential), python and bam. if you grab binaries, you only need them and a config. name the config autoexec.cfg, put the map in data/maps/ and refer to it in config. now open a terminal, cd to that directory (where binary, autoexec and data folder is) and execute `./binary_name_tw_server` then open your tw client and connect to it (using localhost).  if you wanna compile, you have to run something like bam server_release... bam is available in debian packages, linuxbrew,.... you don't have to install it from source.

happy testing your map. (finally close the server with ctrl c)

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

3

Re: Test maps on linux

Where do I get this server binary blob?

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

4

Re: Test maps on linux

android272 wrote:

Where do I get this server binary blob?

You probably already have it if you installed Teeworlds via your distribution's package manager.

Put the maps into ~/.teeworlds/maps and fire up a server with

teeworlds_srv "sv_rcon_password <PASSWORD>" "sv_map <MAP_NAME>"

5

Re: Test maps on linux

android272 wrote:

Where do I get this server binary blob?

it depends  in what you want to test.
probably you have these installed, but otherwise you need to download them from the official download page. if you wanna test maps for a mod, you have to use those binaries.

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

6

Re: Test maps on linux

android272 wrote:

Then other videos show the person saving the map and then they are in the map as if that for some reason saving the map auto launches it.

This happens because the person is authenticated, if you save a map while being authenticated (map has to have the same name as the currently used map), the server will reload the server. if you are running a local server, the new version of the map will be loaded, if you are not on a local server, the server will just restart.

privet

7

Re: Test maps on linux

heinrich5991 wrote:
android272 wrote:

Where do I get this server binary blob?

You probably already have it if you installed Teeworlds via your distribution's package manager.

Put the maps into ~/.teeworlds/maps and fire up a server with

teeworlds_srv "sv_rcon_password <PASSWORD>" "sv_map <MAP_NAME>"

where do I get the sv_rcon_password? I tried to put the code above in my terminal and I got this.

teeworlds_srv: command not found
Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

8

Re: Test maps on linux

sv_rcon_password is the password you want to set for your server. It's up to you to choose it.

Not Luck, Just Magic.

9

Re: Test maps on linux

you don't have the binary installed. download it from the official download site and launch it as I explained in the first post.

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

10 (edited by Oblique. 2015-10-19 21:52:33)

Re: Test maps on linux

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:

bam

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:

cd build/x86_64/debug/

For a 32-bit sytem, enter this (I think this is right):

cd build/i686/debug/

Move the server binary into the original "teeworlds-master" directory.

mv teeworlds_srv ~/teeworlds-master

Then cd back into the original directory:

cd ~/teeworlds-master

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:

./teeworlds_srv

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:

./teeworlds_srv &

and then, while it's running, type:

bg

To see your background processes, enter this:

jobs

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:

fg %1

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:

kill %1

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.

11

Re: Test maps on linux

I did get some errors. Let me know if there is anything else you need.


src/engine/client/sound.cpp:11:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/sound.o' error 256
[570/628] #1 c++ src/engine/client/text.cpp
src/engine/client/text.cpp:13:22: fatal error: ft2build.h: No such file or directory
#include <ft2build.h>
                      ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/text.o' error 256
[571/628] #1 c++ src/engine/client/serverbrowser.cpp
[572/628] #1 c++ src/engine/client/graphics_threaded.cpp
[573/628] #1 c++ src/engine/client/friends.cpp
[574/628] #1 c++ src/engine/client/input.cpp
src/engine/client/input.cpp:3:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/input.o' error 256
[575/628] #1 c++ src/engine/client/client.cpp
src/engine/client/client.cpp:52:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/client.o' error 256
[576/628] #1 c++ src/engine/client/backend_sdl.cpp
src/engine/client/backend_sdl.cpp:2:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/backend_sdl.o' error 256

bam: error: a build step failed
andrew@andrew-desktop:~/Downloads/teeworlds-master$ bam
[1/6] #1 c++ src/engine/client/sound.cpp
src/engine/client/sound.cpp:11:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/sound.o' error 256
[2/6] #1 c++ src/engine/client/text.cpp
src/engine/client/text.cpp:13:22: fatal error: ft2build.h: No such file or directory
#include <ft2build.h>
                      ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/text.o' error 256
[3/6] #1 c++ src/engine/client/input.cpp
src/engine/client/input.cpp:3:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/input.o' error 256
[4/6] #1 c++ src/engine/client/client.cpp
src/engine/client/client.cpp:52:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/client.o' error 256
[5/6] #1 c++ src/engine/client/backend_sdl.cpp
src/engine/client/backend_sdl.cpp:2:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/backend_sdl.o' error 256
bam: error: a build step failed
andrew@andrew-desktop:~/Downloads/teeworlds-master$ bam
[1/6] #1 c++ src/engine/client/sound.cpp
src/engine/client/sound.cpp:11:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/sound.o' error 256
[2/6] #1 c++ src/engine/client/text.cpp
src/engine/client/text.cpp:13:22: fatal error: ft2build.h: No such file or directory
#include <ft2build.h>
                      ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/text.o' error 256
[3/6] #1 c++ src/engine/client/input.cpp
src/engine/client/input.cpp:3:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/input.o' error 256
[4/6] #1 c++ src/engine/client/client.cpp
src/engine/client/client.cpp:52:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/client.o' error 256
[5/6] #1 c++ src/engine/client/backend_sdl.cpp
src/engine/client/backend_sdl.cpp:2:17: fatal error: SDL.h: No such file or directory
#include "SDL.h"
                 ^
compilation terminated.
bam: 'build/x86_64/debug/objs/engine/client/backend_sdl.o' error 256
bam: error: a build step failed
andrew@andrew-desktop:~/Downloads/teeworlds-master$

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

12 (edited by Oblique. 2015-10-20 06:45:28)

Re: Test maps on linux

Try installing libsdl1.2-dev, libsdl2-dev, libsdl2-2.0-0, libsdl1.2debian, and libsdl-image1.2
I'm not quite sure which of these will solve the problem, but I'm fairly certain that one or two of them will.

A is for Apple.

13

Re: Test maps on linux

Note: Seems like you are trying to compile 0.7, not sure if that is what you want.

Real programmers don't comment their code - it was hard to write, it should be hard to understand.
Proudly verkeckt since 2010.

14 (edited by Schwertspize 2015-10-20 07:55:56)

Re: Test maps on linux

first. you are trying to compile also the client. compile just the server (there is a bam target, but I don't know now. try bam server or bam server_release, do this instead of installing SDL)

secondly, yes, you are compiling 0.7.

apt-get install git
git clone https://github.com/teeworlds/teeworlds.git
cd teeworlds
git checkout 0.6

then do the compiling thing In it.

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

15 (edited by Oblique. 2015-10-20 16:06:22)

Re: Test maps on linux

Yes, I am compiling 0.7. Since the compilation errors regarding SDL only occur during the compilation of the client, the server should still compile correctly. So if you do not install the SDL libraries, you should still see the server binary in the folder. However, the client will not be present.

If you want to compile 0.6, then do what Schwertspize suggested.

A is for Apple.