tanks/README.md

70 lines
1.8 KiB
Markdown
Raw Normal View History

2017-07-09 12:31:12 -06:00
Tanks
2010-07-22 22:41:46 -06:00
======
2017-07-09 12:31:12 -06:00
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
2024-12-05 15:36:41 -07:00
written by other players.
2010-07-22 22:41:46 -06:00
Running it
2024-12-05 15:36:41 -07:00
========
2024-12-05 15:36:41 -07:00
$ make # build source code
$ mkdir rounds # set up storage
$ cp -r examples tanks # install some tanks
$ mkdir tanks/mytank # provision your own tank
$ ./tanksd
2024-12-05 15:36:41 -07:00
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`.
2024-12-05 15:36:41 -07:00
Administering a server
==================
2024-12-05 15:36:41 -07:00
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.
2024-12-05 15:36:41 -07:00
If you were running a 9-person event,
and had a Bash shell,
you could run something like this to set up `tanks` subdirectories:
2024-12-05 15:36:41 -07:00
$ cd tanks
$ for i in $(seq 9); do mkdir $(printf "%04x$04x" $RANDOM $RANDOM); done
2024-12-05 15:36:41 -07:00
`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.
2024-12-05 15:36:41 -07:00
The `rounds` directory
-----------------
2024-12-05 15:36:41 -07:00
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.
2024-12-05 15:36:41 -07:00
More Documentation
============
2010-07-22 22:41:46 -06:00
2024-12-05 15:36:41 -07:00
* [Homepage](https://dirtbags.net/tanks/)
2018-10-10 09:29:37 -06:00
* [History](docs/history.md)
2024-12-05 15:36:41 -07:00
* [Thanks](docs/thanks.md)
2010-07-22 22:41:46 -06:00
Current Maintainer
=====
2010-07-22 22:41:46 -06:00
Neale Pickett <neale@woozle.org>