Dirtbags Tanks
Go to file
Neale Pickett b1ab26e41f name change 2024-11-05 16:35:34 -07:00
contrib Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
docs name change 2024-11-05 16:35:34 -07:00
examples Add brick tank; start tracking contributions 2011-06-30 09:09:23 -06:00
www Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
.gitignore Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
LICENSE.md Rework for github jekyll hosting 2017-07-09 18:31:12 +00:00
Makefile Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
README.md Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
ctanks.c More fixes 2014-07-28 20:32:24 +00:00
ctanks.h Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
dump.h Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
forf.c check for overflow during division 2014-07-26 10:40:51 +02:00
forf.h Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
forftanks.c Output actual JSON, and modernize it a little 2024-11-05 16:34:07 -07:00
run-tanks switch to darkness jquery UI theme 2014-07-30 19:50:00 +02:00
upload.cgi.c Allow uploading sensors wholesale 2014-07-29 21:48:56 +00: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