1

Topic: New here + compiling teeworlds on win7

Hello, I have played a few games of TWS recently and decided that I would have liked to see the sourcecode and maybe even help out with development... So, I have tried to compile the code on the "master" github branch.
I plan to use VS2012, but as afai understand, I still need to setup bam for the generation of scripts and so on, or can I skip it instead?
Anyway, I have downloaded and compiled bam (master from github), went into my source directory and tried

C:\bam-master\bam.exe release

But it says that the target "release" is not found.
I have tried then without target. Compilation starts but I get error like:

sound.cpp: impossible to open included file "SDL.h"

Which makes me think I probably need SDL somewhere in my system... Then my questions are:
- Which version of SDL should i get?
- How can I tell bam where to look for SDL?
- Do I need additional libraries?

Thank you in advance!

2 (edited by [pieLover] 2014-12-09 22:13:31)

Re: New here + compiling teeworlds on win7

If you're interested in modding or compiling the client, you will need the SDL.h, and probably freetype.h.. You won't need the additional libraries if you're just interested in compiling the server, but it'll throw a lot of errors. It'll still compile the server fine.

If you have a bam.lua in the Teeworlds source's root directory, then do:
bam -s bam.lua

Keep in mind that if you mod the server *at all*, you are not allowed to run it as "CTF", "TDM", and "DM" gametypes. So, if it is modded but appears (in the server browser) like it's running DM, your server might get banned from the master servers. /src/game/server/gamemodes/<gametype>.cpp somewhere in the first 20 lines of the file, you can change what it tells the master servers what it is running.

Also, a heads up: I found that 0.6.x clients cannot connect to the Github version of Teeworlds. I might've messed up somehow, but I suggest using the source from here: https://downloads.teeworlds.com/teeworlds-0.6.3-src.zip


Hope this helps! big_smile

Clan: Riot (I'm one of three leaders: Mile, Deku, pie)
Host teeworlds maps on a fng/ctf/dm/ddrace server for testing:http://riotproductions.tk/teewo/ broken-need reinstall nginx http://riotproductions.tk/bounce?whatEven, Teeworlds NA Discord chat

3

Re: New here + compiling teeworlds on win7

Hey,

the build script was updated some time ago but the documentation didn't recieve a change so far (:
To build the game call: `bam target=release game` (for more specific settings look into the bam.lua at the end)

With this change also the prebuilt libraries got removed, you can get a copy here https://github.com/teeworlds/teeworlds/tree/0.6/other (just copy the include and library files from /sdl and /freetype)

After you have copied the libraries call `bam -c all` to clean your settings (just to be sure)

You will find the executable in a subdir of /build

4

Re: New here + compiling teeworlds on win7

Hello, thanks for the replies! I have to say I stopped checking the forum after the first day, but I managed to compile everything by downloading (and building) SDL e freetype. I also understood the target thing, basically I read the bam sourcecode. There is only thing I did not understand: in the end, I got that bam is just a compile toolchain system or similar, but still, I can not really compile using only VS directly because I seem to miss some "generated" sources... How are they generated with bam?

Pielover, why I can't use github master? Is it some kind of too new version that should not be used? What about for developing? I am also not sure I got the part about being banned from the Master server, but I will read the source of gametype.cpp and maybe I will understand.
Also: is the issue list on github kind of updated with what is considered useful to have in the game?

5

Re: New here + compiling teeworlds on win7

This code is mainly generated by phyton scripts (check /datasrc), you find the associated calls in the `ContentCompile` function in bam.lua.

Github master is totally fine to use but due to changes to the network protocol it's not compatible with 0.6 clients/servers.

Pielover8888 just wanted to note you in the case you have in mind to setup an own server/create a costum gametype to follow this rules (https://www.teeworlds.com/forum/viewtopic.php?id=10442).

About the issue list ..  well it's half way up-to-date .. currently the maintainer is not so active as you might have noticed on the commit history. Issues labeled or tagged with milestone are pretty safe to work at imho (check existing pull request if someone already started working on this)

6

Re: New here + compiling teeworlds on win7

BeaR wrote:

This code is mainly generated by phyton scripts (check /datasrc), you find the associated calls in the `ContentCompile` function in bam.lua.

Github master is totally fine to use but due to changes to the network protocol it's not compatible with 0.6 clients/servers.

Pielover8888 just wanted to note you in the case you have in mind to setup an own server/create a costum gametype to follow this rules (https://www.teeworlds.com/forum/viewtopic.php?id=10442).

About the issue list ..  well it's half way up-to-date .. currently the maintainer is not so active as you might have noticed on the commit history. Issues labeled or tagged with milestone are pretty safe to work at imho (check existing pull request if someone already started working on this)

I see, thanks.
Last question of this batch: you speak about compatibility of master with version 0.6, but well, what is the current version of master? big_smile Could not find it anywhere, like, in the readme or anything.

7

Re: New here + compiling teeworlds on win7

The current version name of the master branch is "0.7 trunk" (https://github.com/teeworlds/teeworlds/ … /version.h)