# Universe

> The universe standard: the words, colours, art and texts that dress the same game; every field, rule and version.

A universe dresses the same game in its own words, colours, art and texts: a quest stays the same quest, the world around it changes. A universe is data only: no code, no address, nothing that runs.

| | |
|---|---|
| **Standard** | `alta.universe/0.1` (its art: `alta.art/0.1`) |
| **File** | a folder: `universe.json`, `vocabulary.json`, `palette.json`, `art.json`, `copy/en.json`, `copy/fr.json`, `onboarding.json`, `cinematics.json` |
| **Create it** | `alta new universe my-world` |
| **Check it** | `alta lint my-world` |
| **JSON Schema** | [alta.universe.schema.json](https://github.com/altasystem-ai/alta/blob/main/docs/standards/schemas/alta.universe.schema.json) |

Each file of the folder is one field of the universe below: `universe.json` is its `manifest`, `vocabulary.json` its `vocabulary`, and so on. A store item carries the same universe as one object, in its `universe` field.

## Minimal example

A universe needs every part to be played: a word for each thing of the map, every colour, a glyph for each kind. The folder starts with its manifest: who the universe is, and the words that are its own.

```json [my-world/universe.json]
{
  "id": "loomhollow",
  "order": 9,
  "name": "Loomhollow",
  "tagline": "Every mind is a tapestry.",
  "version": "0.1.0",
  "languages": ["en", "fr"],
  "fonts": { "display": "serif", "body": "rounded" },
  "distinctive": [
    "loomhollow",
    "spindle",
    "bobbin",
    "shuttlewing",
    "knotwork",
    "moth"
  ]
}
```

The whole folder, every file filled in, is in [examples/universe](https://github.com/altasystem-ai/alta/tree/main/examples/universe); `alta new universe` writes one you can change.

## Fields

### Universe

| Field | Type | Required | Description |
|---|---|---|---|
| `schema` | "alta.universe/0.1" | yes | The standard: `alta.universe/0.1`. |
| `manifest` | object | yes | Who the universe is. |
| `manifest.id` | string | yes | The universe's id: lowercase letters, digits and dashes. |
| `manifest.order` | number | no | Where it comes in the list of universes. |
| `manifest.name` | string | yes | Its name; it must not be taken. |
| `manifest.tagline` | string | no | One line that says what it is. |
| `manifest.version` | string | no | Its version. |
| `manifest.languages` | string[] | no | The languages of its texts. |
| `manifest.fonts` | object | yes | Its fonts, from the closed list (grotesk, serif, mono, rounded). |
| `manifest.fonts.display` | enum | yes | The font of the titles. |
| `manifest.fonts.body` | enum | yes | The font of the texts. |
| `manifest.distinctive` | string[] | yes | At least four words of its own, none of them a neutral word of the game. |
| `vocabulary` | object | yes | The universe's words for the things of the game. |
| `vocabulary.kinds` | object | yes | A word for each kind of thing of the map. |
| `vocabulary.kinds.core` | object | yes | The universe's word for a thing of kind `core`. |
| `vocabulary.kinds.core.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.core.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.agent` | object | yes | The universe's word for a thing of kind `agent`. |
| `vocabulary.kinds.agent.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.agent.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.module` | object | yes | The universe's word for a thing of kind `module`. |
| `vocabulary.kinds.module.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.module.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.proposed` | object | yes | The universe's word for a thing of kind `proposed`. |
| `vocabulary.kinds.proposed.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.proposed.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.automation` | object | yes | The universe's word for a thing of kind `automation`. |
| `vocabulary.kinds.automation.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.automation.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.automation-orphan` | object | yes | The universe's word for a thing of kind `automation-orphan`. |
| `vocabulary.kinds.automation-orphan.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.automation-orphan.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.device` | object | yes | The universe's word for a thing of kind `device`. |
| `vocabulary.kinds.device.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.device.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.account` | object | yes | The universe's word for a thing of kind `account`. |
| `vocabulary.kinds.account.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.account.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.interface` | object | yes | The universe's word for a thing of kind `interface`. |
| `vocabulary.kinds.interface.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.interface.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.market` | object | yes | The universe's word for a thing of kind `market`. |
| `vocabulary.kinds.market.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.market.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.peer` | object | yes | The universe's word for a thing of kind `peer`. |
| `vocabulary.kinds.peer.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.peer.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles` | object | yes | A word and a creature for each agent. |
| `vocabulary.roles.daemon` | object | yes | The universe's word and creature for the daemon. |
| `vocabulary.roles.daemon.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.daemon.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.daemon.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.roles.architect` | object | yes | The universe's word and creature for the architect. |
| `vocabulary.roles.architect.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.architect.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.architect.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.roles.operator` | object | yes | The universe's word and creature for the operator. |
| `vocabulary.roles.operator.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.operator.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.operator.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.roles.reviewer` | object | yes | The universe's word and creature for the reviewer. |
| `vocabulary.roles.reviewer.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.reviewer.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.reviewer.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.roles.guardian` | object | yes | The universe's word and creature for the guardian. |
| `vocabulary.roles.guardian.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.guardian.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.guardian.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.avatar` | object | yes | Its word for the player's avatar. |
| `vocabulary.avatar.label` | string | yes | The word, as the player reads it. |
| `vocabulary.avatar.gloss` | string | no | A short explanation of the word. |
| `vocabulary.level` | object | yes | Its word for a level. |
| `vocabulary.level.label` | string | yes | The word, as the player reads it. |
| `vocabulary.level.gloss` | string | no | A short explanation of the word. |
| `vocabulary.xp` | object | yes | Its word for experience. |
| `vocabulary.xp.label` | string | yes | The word, as the player reads it. |
| `vocabulary.xp.gloss` | string | no | A short explanation of the word. |
| `vocabulary.edge` | object | yes | Its word for a link between two things. |
| `vocabulary.edge.label` | string | yes | The word, as the player reads it. |
| `vocabulary.edge.gloss` | string | no | A short explanation of the word. |
| `vocabulary.world` | object | yes | Its word for the world. |
| `vocabulary.world.label` | string | yes | The word, as the player reads it. |
| `vocabulary.world.gloss` | string | no | A short explanation of the word. |
| `palette` | object | yes | Its colours, each `#rrggbb`. |
| `palette.bg` | string | yes | The background. |
| `palette.bg2` | string | yes | The second background. |
| `palette.ink` | string | yes | The text. |
| `palette.muted` | string | yes | The quiet text. |
| `palette.accent` | string | yes | The accent. |
| `palette.ok` | string | yes | What works. |
| `palette.warn` | string | yes | What needs a look. |
| `palette.bad` | string | yes | What is broken. |
| `palette.mock` | string | yes | What is only shown (a demo). |
| `palette.panel` | string | yes | The panels' background. |
| `palette.panelInk` | string | yes | The panels' text. |
| `palette.line` | string | yes | The lines. |
| `copy` | object | yes | Its texts, by language; English is required. |
| `copy.en` | object | yes | The texts in English. |
| `copy.fr` | object | no | The texts in French. |
| `art` | art | yes | Its art direction. |
| `skin` | object | no | The look of its panels. |
| `skin.radius` | number | yes | The corner radius of the panels, 0 to 24. |
| `skin.border` | number | yes | The border width, 0 to 3. |
| `skin.panelAlpha` | number | yes | How opaque the panels are, 0 to 1. |
| `skin.font` | enum | yes | The font of the panels. |
| `skin.caps` | boolean | no | `true`: titles in capitals. |
| `onboarding` | onboarding | yes | Its guide: the same beats and quests as the neutral guide, in its words. |
| `cinematics` | cinematics | no | Its trailer and scenes. |

### Art direction

`art.json`: the ground, a glyph for the core, the avatar, each agent and each kind of thing, the links and the light.

| Field | Type | Required | Description |
|---|---|---|---|
| `schema` | "alta.art/0.1" | yes | The standard: `alta.art/0.1`. |
| `ground` | object | yes | The ground of the map. |
| `ground.style` | enum | yes | The ground's style, from the closed list. |
| `ground.colors` | enum | string[] | yes | Its colours, 1 to 6. |
| `ground.particles` | object | no | Particles drifting over the ground. |
| `ground.particles.shape` | enum | yes | Their shape, from the closed list. |
| `ground.particles.count` | integer | yes | How many, 0 to 1500. |
| `ground.particles.drift` | number[] | yes | Their drift, `[x, y]`, each -50 to 50. |
| `ground.particles.twinkle` | boolean | no | `true`: they twinkle. |
| `core` | glyph | yes | How the core of the world is drawn. |
| `avatar` | glyph | yes | How the player's avatar is drawn. |
| `agents` | object | yes | How each agent is drawn, by role. |
| `agents.architect` | glyph | yes | How the architect is drawn. |
| `agents.operator` | glyph | yes | How the operator is drawn. |
| `agents.reviewer` | glyph | yes | How the reviewer is drawn. |
| `agents.guardian` | glyph | yes | How the guardian is drawn. |
| `kinds` | object | yes | How each kind of thing of the map is drawn. |
| `kinds.module` | glyph | yes | How a thing of kind `module` is drawn. |
| `kinds.proposed` | glyph | yes | How a thing of kind `proposed` is drawn. |
| `kinds.automation` | glyph | yes | How a thing of kind `automation` is drawn. |
| `kinds.automation-orphan` | glyph | yes | How a thing of kind `automation-orphan` is drawn. |
| `kinds.device` | glyph | yes | How a thing of kind `device` is drawn. |
| `kinds.account` | glyph | yes | How a thing of kind `account` is drawn. |
| `kinds.interface` | glyph | yes | How a thing of kind `interface` is drawn. |
| `kinds.market` | glyph | yes | How a thing of kind `market` is drawn. |
| `kinds.peer` | glyph | yes | How a thing of kind `peer` is drawn. |
| `links` | object | yes | How the links are drawn. |
| `links.flow` | link | yes | A link that carries data. |
| `links.cycle` | link | yes | A link that comes back on a schedule. |
| `links.control` | link | yes | A link that gives orders. |
| `light` | object | no | The light over the map. |
| `light.vignette` | number | no | How dark the edges are, 0 to 1. |
| `light.fog` | number | no | How much fog, 0 to 1. |

### Glyph

| Field | Type | Required | Description |
|---|---|---|---|
| `shape` | enum | yes | The shape, from the closed list. |
| `size` | number | yes | The size, 8 to 120. |
| `fill` | enum | string | yes | The fill colour. |
| `stroke` | enum | string | no | The outline colour. |
| `sides` | integer | no | The number of sides of a polygon, 3 to 12. |
| `glow` | number | no | How much it glows, 0 to 1. |
| `spin` | number | no | How it turns, -1 to 1. |
| `wobble` | number | no | How it wobbles, -1 to 1. |
| `layers` | layer[] | no | Up to three layers drawn over it. |

### Layer

| Field | Type | Required | Description |
|---|---|---|---|
| `shape` | enum | yes | The shape, from the closed list. |
| `size` | number | yes | The size, 8 to 120. |
| `fill` | enum | string | yes | The fill colour. |
| `stroke` | enum | string | no | The outline colour. |
| `sides` | integer | no | The number of sides of a polygon, 3 to 12. |
| `glow` | number | no | How much it glows, 0 to 1. |
| `spin` | number | no | How it turns, -1 to 1. |
| `wobble` | number | no | How it wobbles, -1 to 1. |

### Link

| Field | Type | Required | Description |
|---|---|---|---|
| `style` | enum | yes | The line's style, from the closed list. |
| `width` | number | yes | The line's width, 0.5 to 8. |
| `color` | enum | string | yes | The line's colour. |

The guide of a universe follows the [onboarding standard](https://docs.altasystem.ai/reference/standards/onboarding), and its scenes the [cinematics standard](https://docs.altasystem.ai/reference/standards/cinematics).

## Rules and errors

Each rule `alta lint` applies to a universe, with its section on the [errors page](https://docs.altasystem.ai/reference/errors#standard-universe). The most frequent: a word of its own that is also a word of the game ([`universe.purity`](https://docs.altasystem.ai/reference/errors#universe-purity)), and an address in a text ([`universe.no-address`](https://docs.altasystem.ai/reference/errors#universe-no-address)).

## Full example

<details class="alta-full-example">
<summary>The art direction of a universe</summary>

```json [my-world/art.json]
{
  "schema": "alta.art/0.1",
  "ground": {
    "style": "bands",
    "colors": ["bg", "bg2", "#3a2f45"],
    "particles": {
      "shape": "flake",
      "count": 220,
      "drift": [2, -1],
      "twinkle": true
    }
  },
  "core": {
    "shape": "ring",
    "size": 72,
    "fill": "accent",
    "stroke": "ink",
    "glow": 0.6,
    "spin": 0.1,
    "layers": [
      {
        "shape": "star",
        "size": 40,
        "fill": "ink",
        "sides": 8
      }
    ]
  },
  "avatar": { "shape": "drop", "size": 18, "fill": "ink", "glow": 0.3 },
  "agents": {
    "architect": {
      "shape": "leaf",
      "size": 34,
      "fill": "#c9824a",
      "glow": 0.3
    },
    "operator": {
      "shape": "flame",
      "size": 34,
      "fill": "#e5c35c",
      "wobble": 0.2
    },
    "reviewer": {
      "shape": "crystal",
      "size": 34,
      "fill": "#b9c4d6"
    },
    "guardian": { "shape": "shell", "size": 34, "fill": "#8fbf7f" }
  },
  "kinds": {
    "module": {
      "shape": "poly",
      "size": 28,
      "fill": "accent",
      "sides": 6
    },
    "proposed": {
      "shape": "poly",
      "size": 24,
      "fill": "mock",
      "sides": 6,
      "glow": 0
    },
    "automation": {
      "shape": "gear",
      "size": 20,
      "fill": "ok",
      "spin": 0.5
    },
    "automation-orphan": {
      "shape": "gear",
      "size": 18,
      "fill": "warn",
      "spin": -0.2
    },
    "device": { "shape": "spire", "size": 26, "fill": "muted" },
    "account": { "shape": "ring", "size": 22, "fill": "#a37cc6" },
    "interface": {
      "shape": "orb",
      "size": 20,
      "fill": "#7fb3bf",
      "glow": 0.5
    },
    "market": {
      "shape": "star",
      "size": 36,
      "fill": "accent",
      "sides": 5
    },
    "peer": {
      "shape": "blob",
      "size": 26,
      "fill": "line",
      "wobble": 0.4
    }
  },
  "links": {
    "flow": { "style": "line", "width": 1.2, "color": "line" },
    "cycle": { "style": "dots", "width": 1, "color": "muted" },
    "control": { "style": "wave", "width": 2, "color": "accent" }
  },
  "light": { "vignette": 0.5, "fog": 0.2 }
}
```

</details>

## Versions

| Version | What it adds | Read by the game |
|---|---|---|
| `alta.universe/0.1`, `alta.art/0.1` | Manifest, vocabulary, palette, texts, art, guide and scenes | current |

## Guides that use it

- [Create a universe](https://docs.altasystem.ai/guides/universes/create)
- [Create an onboarding variant](https://docs.altasystem.ai/guides/onboarding/variant)
