Dirtbags Tanks
Go to file
Neale Pickett 4192f455b6 CI/CD? 2024-12-05 16:09:28 -07:00
contrib Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
docs update figure on index 2024-12-05 12:03:54 -07:00
examples Simplify setup 2024-12-05 15:36:41 -07:00
www New "stealthy" award 2024-12-05 16:01:00 -07:00
.dockerignore Simplify setup 2024-12-05 15:36:41 -07:00
.gitignore Update makefile 2024-11-26 15:37:30 -07:00
.gitlab-ci.yml CI/CD? 2024-12-05 16:09:28 -07:00
Dockerfile Simplify setup 2024-12-05 15:36:41 -07:00
LICENSE.md Rework for github jekyll hosting 2017-07-09 18:31:12 +00:00
Makefile Update makefile 2024-11-26 15:37:30 -07:00
README.md Simplify setup 2024-12-05 15:36:41 -07:00
ctanks.c clang-format 2024-12-04 18:40:53 -07:00
ctanks.h clang-format 2024-12-04 18:40:53 -07:00
dump.h clang-format 2024-12-04 18:40:53 -07:00
forf.c clang-format 2024-12-04 18:40:53 -07:00
forf.h clang-format 2024-12-04 18:40:53 -07:00
forftanks.c Simplify setup 2024-12-05 15:36:41 -07:00
tanksd.go Add overall rankings. Playable now. 2024-12-04 18:39:55 -07:00

README.md

Tanks

Dirtbags Tanks is a game in which you pit your coding abilities against other hackers. You write a program for your tank, set it out on the battlefield, and watch how your program fares against tanks written by other players.

Running it

$ make                    # build source code
$ mkdir rounds            # set up storage
$ cp -r examples tanks    # install some tanks
$ mkdir tanks/mytank      # provision your own tank
$ ./tanksd

At this point you can connect to http://localhost:8080/ and watch all the built-in tanks destroy your motionless tank. You can work on your tank with the token mytank.

Administering a server

The tanks directory

The tanks directory has tank definitions. Each subdirectory is a token that can be used to upload a tank. Empty subdirectories are okay.

If you were running a 9-person event, and had a Bash shell, you could run something like this to set up tanks subdirectories:

$ cd tanks
$ for i in $(seq 9); do mkdir $(printf "%04x$04x" $RANDOM $RANDOM); done

forftanks uses the inode of each tank subdirectory to uniquely identify the tank. So if you want to change somebody's token, you should mv the subdirectory. If you cp it, or remove it and create a new one, the scoreboard won't know it's the same tank.

The rounds directory

The rounds directory has internal state, containing an index.json file, and a bunch of game files. You can delete individual games if you need to, for some reason; tanksd will notice your change when it runs the next game.

More Documentation

Current Maintainer

Neale Pickett neale@woozle.org