# actor.rpg.sprite

> Published by [rpg.actor](https://lexicon.garden/identity/did:plc:kwgllf365cwmxbnxitx4pjdj)

✓ This is the authoritative definition for this NSID.

## Description

A sprite sheet for an RPG character avatar.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:kwgllf365cwmxbnxitx4pjdj/actor.rpg.sprite)
- [Documentation](https://lexicon.garden/lexicon/did:plc:kwgllf365cwmxbnxitx4pjdj/actor.rpg.sprite/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:kwgllf365cwmxbnxitx4pjdj/actor.rpg.sprite/examples)

## Definitions

### `actor.rpg.sprite`

**Type**: `record`

A user's RPG character sprite. One record per user (rkey: self).

**Key**: `literal:self`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | No | Display name for the character (optional, can differ from Bluesky display name) |
| `rows` | `integer` | No | Number of rows in the sprite sheet (typically 4 for directional sprites: down, left, right, up) |
| `width` | `integer` | No | Total width of the sprite sheet in pixels |
| `frames` | `integer` | No | Total number of animation frames |
| `height` | `integer` | No | Total height of the sprite sheet in pixels |
| `source` | `string` (at-uri) | No | AT-URI of the generator record this sprite was composed from, if any (e.g. at://did:plc:xxx/actor.rpg.generator/self) |
| `columns` | `integer` | No | Number of columns per animation cycle |
| `createdAt` | `string` (datetime) | Yes | When this record was first created |
| `updatedAt` | `string` (datetime) | No | When this record was last modified |
| `frameWidth` | `integer` | No | Width of a single frame in pixels (if not auto-calculated from width/columns) |
| `frameHeight` | `integer` | No | Height of a single frame in pixels (if not auto-calculated from height/rows) |
| `spriteSheet` | `blob` | Yes | The sprite sheet image (PNG only). Max 10MB. |
| `animationSpeed` | `integer` | No | Milliseconds per frame for animation playback. Defaults to 200 if omitted. |

## Examples

The following examples demonstrate valid data for this lexicon. [View all examples](https://lexicon.garden/lexicon/did:plc:kwgllf365cwmxbnxitx4pjdj/actor.rpg.sprite/examples)

### Example 1 (`#main`)

**Description**: A 4-direction walking sprite sheet built with the sprite generator.

```json
{
  "rows": 4,
  "$type": "actor.rpg.sprite",
  "width": 144,
  "frames": 12,
  "height": 192,
  "source": "at://did:plc:example123/actor.rpg.generator/self",
  "columns": 3,
  "createdAt": "2026-02-13T04:15:29.266Z",
  "updatedAt": "2026-04-06T12:00:00.000Z",
  "frameWidth": 48,
  "frameHeight": 48,
  "spriteSheet": "(blob: 144x192 PNG sprite sheet, image/png)",
  "animationSpeed": 200
}
```

## Raw Schema

```json
{
  "id": "actor.rpg.sprite",
  "defs": {
    "main": {
      "key": "literal:self",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "spriteSheet",
          "createdAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Display name for the character (optional, can differ from Bluesky display name)",
            "maxGraphemes": 50
          },
          "rows": {
            "type": "integer",
            "maximum": 16,
            "minimum": 1,
            "description": "Number of rows in the sprite sheet (typically 4 for directional sprites: down, left, right, up)"
          },
          "width": {
            "type": "integer",
            "maximum": 4096,
            "minimum": 1,
            "description": "Total width of the sprite sheet in pixels"
          },
          "frames": {
            "type": "integer",
            "maximum": 64,
            "minimum": 1,
            "description": "Total number of animation frames"
          },
          "height": {
            "type": "integer",
            "maximum": 4096,
            "minimum": 1,
            "description": "Total height of the sprite sheet in pixels"
          },
          "source": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the generator record this sprite was composed from, if any (e.g. at://did:plc:xxx/actor.rpg.generator/self)"
          },
          "columns": {
            "type": "integer",
            "maximum": 16,
            "minimum": 1,
            "description": "Number of columns per animation cycle"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this record was first created"
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this record was last modified"
          },
          "frameWidth": {
            "type": "integer",
            "maximum": 512,
            "minimum": 1,
            "description": "Width of a single frame in pixels (if not auto-calculated from width/columns)"
          },
          "frameHeight": {
            "type": "integer",
            "maximum": 512,
            "minimum": 1,
            "description": "Height of a single frame in pixels (if not auto-calculated from height/rows)"
          },
          "spriteSheet": {
            "type": "blob",
            "accept": [
              "image/png"
            ],
            "maxSize": 10000000,
            "description": "The sprite sheet image (PNG only). Max 10MB."
          },
          "animationSpeed": {
            "type": "integer",
            "maximum": 2000,
            "minimum": 50,
            "description": "Milliseconds per frame for animation playback. Defaults to 200 if omitted."
          }
        }
      },
      "description": "A user's RPG character sprite. One record per user (rkey: self)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "A sprite sheet for an RPG character avatar."
}
```
