tanks

Blow up enemy tanks using code
git clone https://git.woozle.org/neale/tanks.git

Neale Pickett  ·  2024-12-05

README.md

 1Tanks
 2======
 3
 4Dirtbags Tanks is a game in which you pit your coding abilities
 5against other hackers.  You write a program for your tank, set it out
 6on the battlefield, and watch how your program fares against tanks
 7written by other players.
 8
 9
10Running it
11========
12
13    $ make                    # build source code
14    $ mkdir rounds            # set up storage
15    $ cp -r examples tanks    # install some tanks
16    $ mkdir tanks/mytank      # provision your own tank
17    $ ./tanksd
18
19At this point you can connect to http://localhost:8080/ and watch all the
20built-in tanks destroy your motionless tank.
21You can work on your tank with the token `mytank`.
22
23
24Administering a server
25==================
26
27The `tanks` directory
28----------------
29The `tanks` directory has tank definitions.
30Each subdirectory is a token that can be used to upload a tank.
31Empty subdirectories are okay.
32
33If you were running a 9-person event,
34and had a Bash shell,
35you could run something like this to set up `tanks` subdirectories:
36
37    $ cd tanks
38    $ for i in $(seq 9); do mkdir $(printf "%04x$04x" $RANDOM $RANDOM); done
39
40`forftanks` uses the inode of each tank subdirectory
41to uniquely identify the tank.
42So if you want to change somebody's token,
43you should `mv` the subdirectory.
44If you `cp` it, or remove it and create a new one,
45the scoreboard won't know it's the same tank.
46
47
48The `rounds` directory
49-----------------
50
51The `rounds` directory has internal state,
52containing an `index.json` file,
53and a bunch of game files.
54You can delete individual games if you need to, for some reason;
55tanksd will notice your change when it runs the next game.
56
57
58More Documentation
59============
60
61* [Homepage](https://dirtbags.net/tanks/)
62* [History](docs/history.md)
63* [Thanks](docs/thanks.md)
64
65
66Current Maintainer
67=====
68
69Neale Pickett <neale@woozle.org>