Dirtbags Tanks
Go to file
Neale Pickett 4441520048 Update makefile 2024-11-26 15:37:30 -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 Go-based daemon w/HTTP; new designer 2024-11-26 15:35:25 -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 Go-based daemon w/HTTP; new designer 2024-11-26 15:35:25 -07: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 Go-based daemon w/HTTP; new designer 2024-11-26 15:35:25 -07:00
tanksd.go Go-based daemon w/HTTP; new designer 2024-11-26 15:35:25 -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