# com.gamethesky.skytanks.run

> One Sky Tanks run, published by the player into their own repo. The record stores every input rather than trusting a score: the sim is deterministic, so replaying the log on the same seed reproduces the run exactly. Owning the record is the identity proof, and replaying it is the score proof; score, ticks, level and the rest are advisory and never trusted by a board.

- Kind: record
- Record key: tid
- Authority: skytanks.gamethesky.com
- Lexicon: 1
- Published by [gamethesky.com](https://lexicon.garden/identity/did:plc:fpi7mvknwqh264gz6kug7pmk), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:fpi7mvknwqh264gz6kug7pmk/com.gamethesky.skytanks.run)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:fpi7mvknwqh264gz6kug7pmk/com.gamethesky.skytanks.run/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:fpi7mvknwqh264gz6kug7pmk/com.gamethesky.skytanks.run/analytics)

## Record (`com.gamethesky.skytanks.run`)

Type: record · key tid

### Properties

- `cleared` (integer): Advisory: mazes cleared.
  - Constraints: minimum: 0, maximum: 18
- `createdAt` (string · datetime, required)
- `difficulty` (string): The difficulty the run was played at; absent means normal. A verifier must replay at it, and each has its own board.
  - Constraints: knownValues: easy | normal | hard
- `faces` (array): The player's own photo faces that rode in rival tanks, included on purpose (the game asks, off by default) so a replay anywhere shows them; each photo is a public blob in the player's repo. Looks only, like `rivals`: a face takes its slot ahead of the handles, the rivals' play is the sim's, and a verifier ignores this field entirely. Six at most.
  - Constraints: maxLength: 6
  - `items` (ref)
    - Reference: `#face`
- `kills` (integer): Advisory: rival tanks wrecked.
  - Constraints: minimum: 0
- `level` (integer, required): Advisory: the maze the run ended on, 1 to 18, three a world.
  - Constraints: minimum: 1, maximum: 18
- `log` (string, required): The whole run as the only input the game takes. Comma-separated `<dtick>.<k>.<a>` entries: dtick is 60 Hz ticks since the previous entry; k 1 holds (a 1) or lets go (a 0) of the trigger; k 4 gives up; k 5 sets the tank's controls to a = (throttle + 1) * 3 + (turn + 1), each -1, 0 or 1. Only inputs the sim accepted are logged. Example: `96.5.7,30.1.1,18.1.0`.
  - Constraints: maxLength: 400000
- `rivals` (array): Handles whose faces the rival tanks wore (people the player follows). Looks only: the rivals' play is the sim's and doesn't depend on this.
  - Constraints: maxLength: 6
  - `items` (string)
    - Constraints: maxLength: 253
- `score` (integer, required): Advisory: points. Higher ranks higher.
  - Constraints: minimum: 0
- `seed` (string, required): The mazes: `arcade` (the same for everyone), or a UTC date `YYYY-MM-DD` for that day's. Each has its own board.
  - Constraints: maxLength: 16
- `simVersion` (integer, required): Which rules produced this log. A verifier must replay under the matching version or refuse the run.
  - Constraints: minimum: 1
- `ticks` (integer, required): Advisory: 60 Hz ticks from the first count to the end of the run.
  - Constraints: minimum: 1
- `won` (boolean): Advisory: all eighteen mazes cleared.

## #face (`com.gamethesky.skytanks.run#face`)

Type: object

One of the player's own faces, as it rode in a run: which rival slot, the name under it, and the picture.

### Properties

- `image` (blob, required): The face: a 256×256 JPEG, 64 KB at most, cropped to the middle of the photo. Readers refuse a bigger one.
  - Constraints: maxSize: 65536, accept: image/jpeg
- `name` (string, required): The name under the face, 40 characters at most.
  - Constraints: maxLength: 160, maxGraphemes: 40
- `slot` (integer, required): The rival slot the face rode in, 0 first. The slots are filled by `faces` at their slot numbers and then by `rivals` in order, so a face sits ahead of the handles, as it did on the player's screen.
  - Constraints: minimum: 0, maximum: 5

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "face": {
      "description": "One of the player's own faces, as it rode in a run: which rival slot, the name under it, and the picture.",
      "properties": {
        "image": {
          "accept": [
            "image/jpeg"
          ],
          "description": "The face: a 256×256 JPEG, 64 KB at most, cropped to the middle of the photo. Readers refuse a bigger one.",
          "maxSize": 65536,
          "type": "blob"
        },
        "name": {
          "description": "The name under the face, 40 characters at most.",
          "maxGraphemes": 40,
          "maxLength": 160,
          "type": "string"
        },
        "slot": {
          "description": "The rival slot the face rode in, 0 first. The slots are filled by `faces` at their slot numbers and then by `rivals` in order, so a face sits ahead of the handles, as it did on the player's screen.",
          "maximum": 5,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "slot",
        "name",
        "image"
      ],
      "type": "object"
    },
    "main": {
      "description": "One Sky Tanks run, published by the player into their own repo. The record stores every input rather than trusting a score: the sim is deterministic, so replaying the log on the same seed reproduces the run exactly. Owning the record is the identity proof, and replaying it is the score proof; score, ticks, level and the rest are advisory and never trusted by a board.",
      "key": "tid",
      "record": {
        "properties": {
          "cleared": {
            "description": "Advisory: mazes cleared.",
            "maximum": 18,
            "minimum": 0,
            "type": "integer"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "difficulty": {
            "description": "The difficulty the run was played at; absent means normal. A verifier must replay at it, and each has its own board.",
            "knownValues": [
              "easy",
              "normal",
              "hard"
            ],
            "type": "string"
          },
          "faces": {
            "description": "The player's own photo faces that rode in rival tanks, included on purpose (the game asks, off by default) so a replay anywhere shows them; each photo is a public blob in the player's repo. Looks only, like `rivals`: a face takes its slot ahead of the handles, the rivals' play is the sim's, and a verifier ignores this field entirely. Six at most.",
            "items": {
              "ref": "#face",
              "type": "ref"
            },
            "maxLength": 6,
            "type": "array"
          },
          "kills": {
            "description": "Advisory: rival tanks wrecked.",
            "minimum": 0,
            "type": "integer"
          },
          "level": {
            "description": "Advisory: the maze the run ended on, 1 to 18, three a world.",
            "maximum": 18,
            "minimum": 1,
            "type": "integer"
          },
          "log": {
            "description": "The whole run as the only input the game takes. Comma-separated `<dtick>.<k>.<a>` entries: dtick is 60 Hz ticks since the previous entry; k 1 holds (a 1) or lets go (a 0) of the trigger; k 4 gives up; k 5 sets the tank's controls to a = (throttle + 1) * 3 + (turn + 1), each -1, 0 or 1. Only inputs the sim accepted are logged. Example: `96.5.7,30.1.1,18.1.0`.",
            "maxLength": 400000,
            "type": "string"
          },
          "rivals": {
            "description": "Handles whose faces the rival tanks wore (people the player follows). Looks only: the rivals' play is the sim's and doesn't depend on this.",
            "items": {
              "maxLength": 253,
              "type": "string"
            },
            "maxLength": 6,
            "type": "array"
          },
          "score": {
            "description": "Advisory: points. Higher ranks higher.",
            "minimum": 0,
            "type": "integer"
          },
          "seed": {
            "description": "The mazes: `arcade` (the same for everyone), or a UTC date `YYYY-MM-DD` for that day's. Each has its own board.",
            "maxLength": 16,
            "type": "string"
          },
          "simVersion": {
            "description": "Which rules produced this log. A verifier must replay under the matching version or refuse the run.",
            "minimum": 1,
            "type": "integer"
          },
          "ticks": {
            "description": "Advisory: 60 Hz ticks from the first count to the end of the run.",
            "minimum": 1,
            "type": "integer"
          },
          "won": {
            "description": "Advisory: all eighteen mazes cleared.",
            "type": "boolean"
          }
        },
        "required": [
          "simVersion",
          "seed",
          "log",
          "ticks",
          "score",
          "level",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "com.gamethesky.skytanks.run",
  "lexicon": 1
}
```
