# com.gamethesky.skytanks.run

> Published by [gamethesky.com](https://lexicon.garden/identity/did:plc:fpi7mvknwqh264gz6kug7pmk)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:fpi7mvknwqh264gz6kug7pmk/com.gamethesky.skytanks.run)
- [Documentation](https://lexicon.garden/lexicon/did:plc:fpi7mvknwqh264gz6kug7pmk/com.gamethesky.skytanks.run/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:fpi7mvknwqh264gz6kug7pmk/com.gamethesky.skytanks.run/examples)

## Definitions

### `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.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `image` | `blob` | Yes | The face: a 256×256 JPEG, 64 KB at most, cropped to the middle of the photo. Readers refuse a bigger one. |
| `name` | `string` | Yes | The name under the face, 40 characters at most. |
| `slot` | `integer` | Yes | 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. |

### `com.gamethesky.skytanks.run`

**Type**: `record`

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`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cleared` | `integer` | No | Advisory: mazes cleared. |
| `createdAt` | `string` (datetime) | Yes |  |
| `difficulty` | `string` | No | The difficulty the run was played at; absent means normal. A verifier must replay at it, and each has its own board. |
| `faces` | `array` | No | 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. |
| `kills` | `integer` | No | Advisory: rival tanks wrecked. |
| `level` | `integer` | Yes | Advisory: the maze the run ended on, 1 to 18, three a world. |
| `log` | `string` | Yes | 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`. |
| `rivals` | `array` | No | 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. |
| `score` | `integer` | Yes | Advisory: points. Higher ranks higher. |
| `seed` | `string` | Yes | The mazes: `arcade` (the same for everyone), or a UTC date `YYYY-MM-DD` for that day's. Each has its own board. |
| `simVersion` | `integer` | Yes | Which rules produced this log. A verifier must replay under the matching version or refuse the run. |
| `ticks` | `integer` | Yes | Advisory: 60 Hz ticks from the first count to the end of the run. |
| `won` | `boolean` | No | Advisory: all eighteen mazes cleared. |

## Raw 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
}
```
