2014-12-29 22:44:47 +00:00
|
|
|
# ttrts - Tiny Terminal RTS
|
2014-12-16 13:13:04 +00:00
|
|
|
|
2014-12-29 21:57:52 +00:00
|
|
|
## SYNOPSIS
|
2014-12-20 15:35:16 +00:00
|
|
|
ttrts MAPFILE
|
2014-12-16 13:13:04 +00:00
|
|
|
|
2014-12-18 13:40:54 +00:00
|
|
|
## DESCRIPTION
|
2014-12-16 13:33:11 +00:00
|
|
|
ttrts is a tiny terminal based RTS where that uses text
|
2014-12-29 21:57:52 +00:00
|
|
|
files as order lists to control it's units
|
2014-12-16 13:13:04 +00:00
|
|
|
|
2014-12-16 13:33:11 +00:00
|
|
|
This means that any user, program or cat that can read
|
2014-12-29 21:57:52 +00:00
|
|
|
and write to text files can play the game
|
|
|
|
|
|
|
|
## OPTIONS
|
|
|
|
MAPFILE - File to read in the initial game state from
|
2014-12-16 13:13:04 +00:00
|
|
|
|
2014-12-18 13:40:54 +00:00
|
|
|
## USAGE
|
2014-12-29 21:57:52 +00:00
|
|
|
When invoked, ttrts will set up the game in a local
|
|
|
|
directory called `ttrts_{GAME_NAME}`
|
2014-12-16 13:13:04 +00:00
|
|
|
|
2014-12-29 21:57:52 +00:00
|
|
|
The GAMESTATE files in this directory can be read and
|
|
|
|
interpreted by human, robot or cat.
|
2014-12-16 13:13:04 +00:00
|
|
|
|
2014-12-29 21:57:52 +00:00
|
|
|
ttrts will then await ORDER files from each participant
|
2014-12-16 13:13:04 +00:00
|
|
|
|
2014-12-29 21:57:52 +00:00
|
|
|
Once all ORDER files have been received ttrts will
|
|
|
|
calculate the turn and output a new GAMESTATE file
|
2014-12-16 13:13:04 +00:00
|
|
|
|
2014-12-29 21:57:52 +00:00
|
|
|
This process repeats until the game is over
|
|
|
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
# TTRTS GAMEPLAY
|
|
|
|
|
|
|
|
## RULES
|
|
|
|
The game takes place in a series of simultaneous turns
|
|
|
|
on an arbitrarily sized 2D board
|
|
|
|
|
|
|
|
Each turn, the client outputs a GAMESTATE file and
|
|
|
|
waits for an ORDER file from each player
|
|
|
|
|
|
|
|
All commands are evaluated simultaneously with friendly
|
|
|
|
fire enabled by default
|
|
|
|
|
|
|
|
The game is over when any of three conditions are met -
|
|
|
|
* All remaining units are controlled by a single player
|
|
|
|
* No units are left (draw)
|
|
|
|
* All units left are unable to move (draw)
|
|
|
|
|
|
|
|
## UNITS
|
|
|
|
Each unit occupies a single tile on the board, facing
|
|
|
|
in a compass direction (NESW)
|
|
|
|
|
|
|
|
Units will only accept orders from their owner
|
2014-12-18 13:40:54 +00:00
|
|
|
|
2014-12-29 21:57:52 +00:00
|
|
|
Units can receive only a single order each turn
|
2014-12-18 13:40:54 +00:00
|
|
|
|
2014-12-29 21:57:52 +00:00
|
|
|
Units cannot occupy the same tile as other units/walls
|
|
|
|
|
|
|
|
## ORDERS
|
|
|
|
F - Move unit [F]orward one space, leaving a wall
|
|
|
|
|
|
|
|
This wall will remain until the end of the game,
|
|
|
|
blocking movement to that tile
|
|
|
|
|
|
|
|
Movement orders have no effect if impossible, eg.
|
|
|
|
* Attempting to move outside of map
|
|
|
|
* Attempting to move on to tile occupied by unit/wall
|
|
|
|
|
|
|
|
L/R - Rotate unit [L]eft or [R]ight
|
|
|
|
|
|
|
|
Unit will rotate clockwise or counter-clockwise,
|
|
|
|
this order cannot fail
|
|
|
|
|
|
|
|
A - [A]ttack in straight line in front of unit
|
|
|
|
|
|
|
|
Attack will continue forward until unit can't progress,
|
|
|
|
all units within the path of the attack are destroyed.
|
|
|
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|
# FILE FORMATS
|
|
|
|
|
|
|
|
## Gamestate File
|
2014-12-18 13:40:54 +00:00
|
|
|
Turn_{TURN_NUMBER}.txt
|
2014-12-29 21:57:52 +00:00
|
|
|
|
2014-12-18 13:40:54 +00:00
|
|
|
### Contents
|
2014-12-20 16:14:35 +00:00
|
|
|
===== ttrts v{MAJOR}.{MINOR}.{PATCH} =====
|
|
|
|
NAME:{GAMENAME}
|
2014-12-18 13:40:54 +00:00
|
|
|
SIZE:[{X},{Y}]
|
|
|
|
TURN:{TURN_NUMBER}
|
2014-12-29 21:57:52 +00:00
|
|
|
WALL:[{X},{Y}][{X},{Y}][{X},{Y}]...{repeat for all walls}
|
2014-12-18 13:40:54 +00:00
|
|
|
~~~~
|
2014-12-22 19:55:23 +00:00
|
|
|
UNIT:{ID} pl:{PLAYER} vs:{VIS} dr:{DIR(NESW)} ps:[{X},{Y}]
|
2014-12-20 16:14:35 +00:00
|
|
|
... {continue for all units}
|
2014-12-20 16:24:07 +00:00
|
|
|
END
|
2014-12-18 13:40:54 +00:00
|
|
|
|
2014-12-29 21:57:52 +00:00
|
|
|
## Order File
|
2014-12-22 19:55:23 +00:00
|
|
|
Player_{PLAYER_ID}_Turn_{TURN_NUMBER}.txt
|
2014-12-29 21:57:52 +00:00
|
|
|
|
2014-12-18 13:40:54 +00:00
|
|
|
### Contents
|
|
|
|
ORDER:{ORDER_CHAR} id:{UNIT_ID}
|
2014-12-20 16:24:07 +00:00
|
|
|
... {continue for all orders}
|
|
|
|
END
|
2014-12-18 13:40:54 +00:00
|
|
|
|