Dirtbags Tanks
Go to file
Neale Pickett c1f6e765bc styling 2024-12-05 11:52:44 -07:00
contrib Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
docs styling 2024-12-05 11:52:44 -07:00
examples Add brick tank; start tracking contributions 2011-06-30 09:09:23 -06:00
www Add overall rankings. Playable now. 2024-12-04 18:39:55 -07:00
.gitignore Update makefile 2024-11-26 15:37:30 -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 Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -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 clang-format 2024-12-04 18:40:53 -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. Dirtbags Tanks is frequently a component of Dirtbags Capture The Flag.

Running it

forftanks TANKDIR [TANKDIR...]

forftanks will run a round with every tank provided as an argument. It outputs a JSON object describing the round.

Output fields

seed
Seed used by the random number generator. You can specify your own seed with the environment variable `SEED. If the same seed is used with the same tanks, you will get the same output.
field
Dimensions of the play field.
tanks
Description of each tank.
rounds
List of frames for each round. Each frame is a list of tank state for each tank. Tank state is described below.

Tank state

Tank state is packed more tightly than most modern JSON APIs. Tank state is a tuple of (x position, y position, orientation angle, turret angle, flags, sensor bits).

x position, y position
Tank's position on the play field.
orientation angle
Tank's orientation on the play field, in radians.
turret angle
Turret angle, relative to the tank, in radians.
flags
Logical or of 1 (firing), 2 (LED on), and 4 (dead)
sensor bits
Bit field of sensor state (1 = triggered)

Documentation

Current Maintainer

Neale Pickett neale@woozle.org