1

Topic: Code cleanup and bam improvements

There has been a bit lack of information from my side, my bad. But here comes an update with some juicy information.

I've been very busy with work and building stuff for my appartment, but I've managed to set aside some time to work on teeworlds. The work on 0.5.0 is moving forward. This version will mainly be a cleanup of the code and fix all small quirks that it gathered so far. The cleanup / restructure has also started with the rewrite of data compiler, network objects and tuning parameters unification (is this even a real word?:D). I've rewritten a part of the lowlevel network to reduce the bandwidth requirements. Right now 0.5.0 uses just 40% of the bandwidth compared to 0.4.2, might even go down a little bit futher aswell.

I interrupted this work to begin to satisfy all the package maintainers by making changes to bam (the build system that we use). These are changes that should have been done long ago. It's now much faster (even faster then jam!), cleaner and proper support for multithreading. Gonna spend some more time on bam to improve how you can build teeworlds. Add a mechanism make it possible to compile teeworlds dynamicly linked to the systems version of portaudio, glfw etc instead of using the versions that we supply. Also gonna make a way to auto-detect system preferences like OSS, ALSA, stack protector etc.

But now I shall reinstall my computer to the new and shiny xubuntu 8.04 big_smile

Cheers!

2

Re: Code cleanup and bam improvements

Well, this is a great news. Good that you did some work on those things.

matricks wrote:

But now I shall reinstall my computer to the new and shiny xubuntu big_smile

I should do that too. big_smile

3

Re: Code cleanup and bam improvements

i don't understand everything T_T

sorry for my bad English smile

***connect 90.157.87.109:8303*** - Best CTF maps, much rush and meat!!!

4

Re: Code cleanup and bam improvements

Just curious, have any of the team members worked on other open-source projects before, in particular any large ones?  The decision to use a custom build system is very bizarre, and distributing code for dependencies (portaudio, glfw, etc.) is very, very non-standard and IMHO not the world's best idea.  Not linking dynamically against system-wide versions of these libraries makes it extremely difficult to take advantage of bug fixes and other improvements to those libraries, as you have to manually copy in the changed files and recompile teeworlds itself (as opposed to just let your package manager update a library).  I can understand distributing pre-compiled DLLs with windows EXEs (it sucks, but that isn't the app developer's fault wink ), but under Linux, you should really just treat them as external dependencies - they are maintained by other teams, have their own build scripts (which you're bypassing for no good reason), licences, etc. and it's wrong to just take the code, compile it in statically and forget about it.

My gut feeling is that you're making work for yourselves by re-inventing the wheel; and build systems are a particularly troublesome wheel to get right, which explains why there are so few commonly used ones.  Having to add support specifically for linking against external libraries is a good example of this: they're shared objects, you link against them, why was it ever done differently?

I really love teeworlds as a game, I just think you're doing it a great disservice by limiting the appeal of the project to developers, package maintainers and distributors.  Take the Gentoo ebuild here, for example - it has to actually alter the .bam file to specify custom CFLAGS, which is not something that needs to be done for 99% of other packages, nor should it have to be.  None of this is meant to be taken personally, I just really hate it when this kind of thing happens to a project, and think correct use of a good build system is of fundamental importance to anyone trying to create a decent cross-platform program.

Would you ever consider switching to something like the autotools (automake, autoconf etc.) if someone who knew how to use them "properly" was willing to help?

5 (edited by void 2008-04-29 16:21:41)

Re: Code cleanup and bam improvements

Damn, I started writing a long and nice message and the power went smile
Oh well...

We are fixing the build-things you are asking for... but we will keep the possibility for static linking to a specific version of the libs we use (which all are BSD/zlib licensed and allow static linking).

Bam is another question which mostly boils down to make being a horror to maintain for larger projects and SCons being too slow smile

EDIT: I forgot:
Teeworlds does not really have an open source agenda. Our main goal was to provide binaries for people to install in a simple way. Not writing which versions of which libs they need to install in a special way on certain distros.

Languages shapes the way we think, or don't.

6

Re: Code cleanup and bam improvements

I've considered many different build systems before I started to bam. Either they are horrific to use (make/automake/autoconf, throw in windows there and you will die), horribly slow (scons) or not generally very nice. Bam is a side project that I started before I started this version of teeworlds. There are a couple of buddies who also use it and love it because it's kinda like scons, but fast!. I recently reconsidered alternative build systems but ended up in improving bam instead to support the features requested by package maintainers. These features were planned from the beginning but there havn't been a big need for them until now.

As for the shipped libraries. This is done to ease the compile on the different platforms. Collecting and installing all the dependencies under windows or osx is horrific to do and takes loads of time and error prune. In future versions of teeworlds with a new version of bam, you will have the option to link against the systems version of these libraries or the versions that we suppled.

Being open source isn't really a priority for teeworlds at all. My main priority has been, and always will be to make Teeworlds a good game for the end user. The end user in 99% of the cases doesn't really care about these kind of questions and therefore this has been a low prio for now. But now when I do clean up the code I might as well fix these issues while I'm at it.

7

Re: Code cleanup and bam improvements

it's possible to compile a 64bits version for Vista with a v0.5 ? tongue

map: manti1vs1.map  //  manti1vs1-v2.map  (without katana)  //  manti-2worlds.map

items & Tee: My Items & Tee

8

Re: Code cleanup and bam improvements

Good luck with the upgrade.

if($poster["intelligence"] == $intelligence["idiot"])
        deny_post($poster);

9

Re: Code cleanup and bam improvements

void wrote:

Damn, I started writing a long and nice message and the power went smile
Oh well...

My machine's recent favourite seems to be freezing X. sad  Either way, I feel your pain wink

void wrote:

(which all are BSD/zlib licensed and allow static linking).

Oh, I'm not suggesting anyone was infringing on licences; that's another matter entirely.  I just feel that on a platform that lets you (Linux), users should be able to upgrade dependencies separately from packages that use them (provided they haven't broken the ABI).

void wrote:

Bam is another question which mostly boils down to make being a horror to maintain for larger projects and SCons being too slow smile

I can't say much for its speed, but coming from the background of being a user (I wouldn't say "fan", but it gets the job done) of the autotools, I've tried to use scons and just found it incredibly confusing and counter-intuitive.  If you know how to use it (and there's the rub, because the learning curve admittedly does seem steep), an autotools build system can be got up and running for compilation on a number of platforms without too much effort.  In my limited experience with scons, I felt like I was maintaining two entire codebases: one for the program itself, and one to build it!  Basically, it felt too much like hard work.

void wrote:

EDIT: I forgot:
Teeworlds does not really have an open source agenda. Our main goal was to provide binaries for people to install in a simple way. Not writing which versions of which libs they need to install in a special way on certain distros.

matricks wrote:

Collecting and installing all the dependencies under windows or osx is horrific to do and takes loads of time and error prune.

But how many people actually do that?  Package maintainers and developers, not end users.  I can understand it being a pain on Windows, where building anything that uses DLLs not shipped with the OS is basically asking for all kinds of trouble, but on Linux surely the end users just install the runtime packages, and the devs install the -dev packages?  Personally I use Gentoo for the simple reason that it makes for a brilliant development environment, but this is far from impossible on other distros.  I must admit I don't know much about OS X, having never developed for it, so for all I know it's as bad as Windows in that regard.

Basically, on Linux and the BSDs (possibly Mac OS X, but I don't know), you shouldn't have to know or care how users install the dependencies.  That's what package managers are for; it's why we use distributions in the first place instead of just downloading a bunch of tarballs and installing everything by hand.  All worthwhile package systems will install the dependencies automatically, in fact, providing the package is well written (which is up to package maintainers, not yourselves).

Anyway... as I said in the original post, I like teeworlds.  I'm not going to stop playing it or recommending it to people just because of how it's compiled. wink  I just wondered how much thought had gone into the route it's taken, and whether those involved realise how much work writing a build framework really is.  Perhaps the fact that bam exists and compiles teeworlds indicate that the answers are "lots" and "yes". smile

10

Re: Code cleanup and bam improvements

mangobrain wrote:

Basically, on Linux and the BSDs (possibly Mac OS X, but I don't know), you shouldn't have to know or care how users install the dependencies.  That's what package managers are for; it's why we use distributions in the first place instead of just downloading a bunch of tarballs and installing everything by hand.  All worthwhile package systems will install the dependencies automatically, in fact, providing the package is well written (which is up to package maintainers, not yourselves).

Ideally yes... It would be best for all, but teeworlds was not packaged at all for any distro in the beginning. That's one of the reasons it's the way it is. smile

Languages shapes the way we think, or don't.

11

Re: Code cleanup and bam improvements

that sounds neat big_smile

How's the progress? Are you able to release 0.5 in June or is it not realistic?
I'm looking forward to the Demo Function. Now we're able to produce some very nice Teewars Movies *g*(Fraps still sucks because u have to play at 25-30fps, which makes nice aiming impossible)

you are making an awesome Job. Teeworlds is one of the funniest and best Games I've ever played. And it's free smile
Keep on working guys, you're awesome big_smile

12 (edited by Max_Steel 2008-06-12 00:37:49)

Re: Code cleanup and bam improvements

Can you implement to use Compile-/Link-Flags during the Build-Process.
e.g. My System is build with gcc and -march=athlon-xp -pipe -fomit-frame-pointer, so it was very nice to build teeworlds with this Flags, i don't found this function, or i don't seen it.

For Windows you must give the Depend with the Packet, because itdon't have a packet-manager, but GNU/Linux with the Packet-Manager the Dependencys are already included, so you can use it.
For Configuring and compile you can use cmake, that is against ./configure && make really fast.

_____________
Sry, for my bad English, I'm German.

My System:
- AMD Athlon XP 1700+
- Gentoo Linux
- Kernel 2.6.24-r8 gentoo-sources
- System built with gcc 4.2.1 and -march=athlon-xp -pipe -fomit-frame-pointer

13

Re: Code cleanup and bam improvements

Max_Steel wrote:

Can you implement to use Compile-/Link-Flags during the Build-Process.
e.g. My System is build with gcc and -march=athlon-xp -pipe -fomit-frame-pointer, so it was very nice to build teeworlds with this Flags, i don't found this function, or i don't seen it.

For Windows you must give the Depend with the Packet, because itdon't have a packet-manager, but GNU/Linux with the Packet-Manager the Dependencys are already included, so you can use it.
For Configuring and compile you can use cmake, that is against ./configure && make really fast.

_____________
Sry, for my bad English, I'm German.

My System:
- AMD Athlon XP 1700+
- Gentoo Linux
- Kernel 2.6.24-r8 gentoo-sources
- System built with gcc 4.2.1 and -march=athlon-xp -pipe -fomit-frame-pointer

Most of these features are already in the trunk version of teeworlds. Expect them in 0.5.0.

14

Re: Code cleanup and bam improvements

Where can I find them?

15

Re: Code cleanup and bam improvements

Max_Steel wrote:

Where can I find them?

You won't find them until they release 0.5.0

16

Re: Code cleanup and bam improvements

When released version 0.5.0?

Sorry for my bad English smile

17

Re: Code cleanup and bam improvements

only god knows this... and your mom LOL

@topic: nice to see that you are working on smile

... i wanna have an account-system and a clan-system... i am waiting... ^^

ima charhgin ma lazerz!!1
SHOOP DA WHOOOOP!!!!!!11

18

Re: Code cleanup and bam improvements

"... i wanna have an account-system and a clan-system..."
Me too smile

Sorry for my bad English smile

19

Re: Code cleanup and bam improvements

And where i can get new version of bam? I can't compile sourcecode from trunk repository with published version...

Sorry for my english sad

20

Re: Code cleanup and bam improvements

By the way, are any dates scheduled for the 0.4.3 and 0.5.0 releases ?

Play ctf_fall if you dare!

21

Re: Code cleanup and bam improvements

No, no dates. I'm pretty swamped with work right now. But the cleanup is coming along nicely but sadly slowly.

22

Re: Code cleanup and bam improvements

Heh. Ironic how today I read a comic strip about 'swamped' meaning a person surfs the web for eight hours and is in the midst of a 5 minute project.
http://www.comics.com/comics/pearls/arc … 480618.gif
Not that I'm suggesting anything. Keep up the good work, matricks.

if($poster["intelligence"] == $intelligence["idiot"])
        deny_post($poster);

23

Re: Code cleanup and bam improvements

Lite wrote:

And where i can get new version of bam? I can't compile sourcecode from trunk repository with published version...

svn://svn.teeworlds.com/bam

But don't expect the current version in /trunk to be playable. X-P

bam: WARNING:'src/game/server/gamemodes/mod.cpp' comes from the future

24

Re: Code cleanup and bam improvements

time for a new blog-entry ;-)

Antoine de Saint Exupéry: It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away.
Besides -  I am the gfx guy!

25

Re: Code cleanup and bam improvements

landil, we have to wait... september...

ima charhgin ma lazerz!!1
SHOOP DA WHOOOOP!!!!!!11