# app.golfthesky.round

> Published by [golfthesky.app](https://lexicon.garden/identity/did:plc:4ukvmcc7pscat4djemk4ckfl)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:4ukvmcc7pscat4djemk4ckfl/app.golfthesky.round)
- [Documentation](https://lexicon.garden/lexicon/did:plc:4ukvmcc7pscat4djemk4ckfl/app.golfthesky.round/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:4ukvmcc7pscat4djemk4ckfl/app.golfthesky.round/examples)

## Definitions

### `app.golfthesky.round#hole`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `holeId` | `string` | Yes | Permanent identity of the hole within the course. |
| `shots` | `string` | Yes | The whole hole as the only input the game takes. Comma-separated `<dtick>.<angle>.<mod>.<power>` entries: dtick is 120 Hz ticks since the previous entry, angle is milliradians counter-clockwise from +x (0–6283), mod is the ball type applied to that swing (0 none, 1 sticky, 2 super, 3 nitro, 4 air brakes, 5 sniper), power 1–100. An entry with power 0 is an event, not a swing: mod 4 is an Air Brakes tap, mod 5 a Mulligan. Power-ups cost energy; a verifier recomputes energy from the clock (starts at 4, +1 every 360 ticks, max 10; costs sticky 4, super 3, nitro 4, brakes 5, mulligan 6, sniper 6) and refuses a log that overspends. Example: `360.785.0.80,540.0.4.0`. |
| `strokes` | `integer` | Yes | Advisory stroke count, including out-of-bounds penalties. |
| `ticks` | `integer` | No | Advisory: the tick the ball dropped. Absent if the hole was never finished. |

### `app.golfthesky.round`

**Type**: `record`

One Golf the Sky round, published by the player into their own repo. The record stores every shot rather than a score: the game's ball physics are deterministic, so re-simulating the shots reproduces the round exactly. Owning the record is the identity proof, and replaying it is the score proof — strokes and ticks in this record are advisory and never trusted by a leaderboard.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `courseId` | `string` | Yes | Permanent identity of the course played. Append-only: ids are never reordered, renamed, or reused. |
| `createdAt` | `string` (datetime) | Yes |  |
| `field` | `integer` | No | How many players were in that live round. |
| `holes` | `array` | Yes |  |
| `mode` | `string` | No | solo: against local bots. live: against other players on a synced clock — the only mode in which placing means anything. |
| `placing` | `integer` | No | Advisory finishing position in a live round, 1 = won. |
| `players` | `array` | No | Everyone else who played this round, each with their own shot logs, so a replay of this one record shows the whole field. Bots carry a did of the form bot:N. Advisory, like placing: only the owner's own holes are theirs to prove. |
| `simVersion` | `integer` | Yes | Which physics produced these shots. A verifier must replay under the matching version or refuse the round. |
| `target` | `integer` | No | The pills (hole wins) the round was played to. |

### `app.golfthesky.round#player`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` | Yes | Their DID, or bot:N for a local bot. |
| `handle` | `string` | Yes | Their handle when the round was played (advisory). |
| `holes` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "hole": {
      "properties": {
        "holeId": {
          "description": "Permanent identity of the hole within the course.",
          "knownValues": [
            "opening-drive",
            "dogleg",
            "sky-ramp",
            "slick-slope",
            "bunker-alley",
            "island-hop",
            "first-light",
            "sticky-situation",
            "ice-cave",
            "archipelago",
            "clockwork",
            "mill-race",
            "skyhook",
            "paddle-alley",
            "crater"
          ],
          "maxLength": 64,
          "type": "string"
        },
        "shots": {
          "description": "The whole hole as the only input the game takes. Comma-separated `<dtick>.<angle>.<mod>.<power>` entries: dtick is 120 Hz ticks since the previous entry, angle is milliradians counter-clockwise from +x (0–6283), mod is the ball type applied to that swing (0 none, 1 sticky, 2 super, 3 nitro, 4 air brakes, 5 sniper), power 1–100. An entry with power 0 is an event, not a swing: mod 4 is an Air Brakes tap, mod 5 a Mulligan. Power-ups cost energy; a verifier recomputes energy from the clock (starts at 4, +1 every 360 ticks, max 10; costs sticky 4, super 3, nitro 4, brakes 5, mulligan 6, sniper 6) and refuses a log that overspends. Example: `360.785.0.80,540.0.4.0`.",
          "maxLength": 8000,
          "type": "string"
        },
        "strokes": {
          "description": "Advisory stroke count, including out-of-bounds penalties.",
          "minimum": 0,
          "type": "integer"
        },
        "ticks": {
          "description": "Advisory: the tick the ball dropped. Absent if the hole was never finished.",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "holeId",
        "shots",
        "strokes"
      ],
      "type": "object"
    },
    "main": {
      "description": "One Golf the Sky round, published by the player into their own repo. The record stores every shot rather than a score: the game's ball physics are deterministic, so re-simulating the shots reproduces the round exactly. Owning the record is the identity proof, and replaying it is the score proof — strokes and ticks in this record are advisory and never trusted by a leaderboard.",
      "key": "tid",
      "record": {
        "properties": {
          "courseId": {
            "description": "Permanent identity of the course played. Append-only: ids are never reordered, renamed, or reused.",
            "knownValues": [
              "skyline-links"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "field": {
            "description": "How many players were in that live round.",
            "minimum": 1,
            "type": "integer"
          },
          "holes": {
            "items": {
              "ref": "#hole",
              "type": "ref"
            },
            "maxLength": 18,
            "type": "array"
          },
          "mode": {
            "description": "solo: against local bots. live: against other players on a synced clock — the only mode in which placing means anything.",
            "knownValues": [
              "solo",
              "live"
            ],
            "type": "string"
          },
          "placing": {
            "description": "Advisory finishing position in a live round, 1 = won.",
            "minimum": 1,
            "type": "integer"
          },
          "players": {
            "description": "Everyone else who played this round, each with their own shot logs, so a replay of this one record shows the whole field. Bots carry a did of the form bot:N. Advisory, like placing: only the owner's own holes are theirs to prove.",
            "items": {
              "ref": "#player",
              "type": "ref"
            },
            "maxLength": 7,
            "type": "array"
          },
          "simVersion": {
            "description": "Which physics produced these shots. A verifier must replay under the matching version or refuse the round.",
            "minimum": 1,
            "type": "integer"
          },
          "target": {
            "description": "The pills (hole wins) the round was played to.",
            "maximum": 9,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "courseId",
          "simVersion",
          "holes",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "player": {
      "properties": {
        "did": {
          "description": "Their DID, or bot:N for a local bot.",
          "maxLength": 300,
          "type": "string"
        },
        "handle": {
          "description": "Their handle when the round was played (advisory).",
          "maxLength": 100,
          "type": "string"
        },
        "holes": {
          "items": {
            "ref": "#hole",
            "type": "ref"
          },
          "maxLength": 18,
          "type": "array"
        }
      },
      "required": [
        "did",
        "handle",
        "holes"
      ],
      "type": "object"
    }
  },
  "id": "app.golfthesky.round",
  "lexicon": 1
}
```
