Skip to content

Games

A game on OnlyWorlds can stand on two kinds of world. It can ship with a world its makers wrote. Or it can take the world the player brings: their own characters, places and ties, as the game’s cast and ground. The second is what a shared format is for. The player’s world was written in some other tool, and your game reads it without knowing which.

To a game, either kind of world is content: characters, creatures, locations, objects, institutions, events and more, with links between them. It stays editable outside the game, on onlyworlds.com, in Atlas or in any tool built on the standard. So writers and designers can shape it without opening the engine, and the game picks up their work.

Three ways a player’s world reaches your game:

  • Sign in with OnlyWorlds. A registered tool sends the player to onlyworlds.com and gets an account token back, without ever seeing a password. The player then picks one of their worlds. See Sign in with OnlyWorlds.
  • A key they paste. A key for a world of theirs. A read key (ow_r_) reads, cannot write, and needs no PIN. See Keys and PINs.
  • A world file. The player picks a world folder or a single .owworld file, and the game reads it from disk with no key, no account and no network. The Unity SDK reads either today. See World folders.

A stranger’s world is small and uneven. It may hold thirty elements and no economy. So ask little of it: say what your game needs, check that on load, and name what is missing in words the player can act on. Subs asks for one Character in a world the player owns. A game that needs a whole setting accepts few worlds.

If the game writes into a player’s world, the rules under Write back apply: it is their work you are writing into.

Fetch the world at build time and ship it inside the game. It works offline, needs no key at runtime, and changes only when you rebuild. This fits a world that is written first and then played.

  • Unity: fill a cache asset in the Editor and reference it from your scripts.
  • Any engine: read a world folder (one JSON file per element, the format Atlas, the Python package and the Unity SDK use), or take a full export from the API, and convert it into the engine’s own data.

The game reads the world from the API while it runs, so a new character or a rewritten place reaches players without a patch. Fetch the world once, then ask the changes feed for what changed since your cursor, rather than fetching everything again.

A read key (ow_r_) is made for this: it reads, cannot write, and needs no PIN. A key inside a shipped game can be extracted, so assume your players can read the whole world, hidden elements included. See Keys and PINs.

What a live read can count on:

  • It’s free, with no fee and no account tiers.
  • 300 requests a minute per key, reads and writes together. Every copy of a game that ships the same key shares that key’s 300; each reply’s RateLimit-Remaining header says what is left, and over the budget the server answers 429 too_many_requests with a Retry-After header. See Limits.
  • Under load the server answers 503 server_busy with a Retry-After header. Wait that long, then retry.
  • Image uploads have a daily cap per world.
  • The API can be briefly unavailable, and there is no uptime guarantee.

So a game that must never break should bake its world in, and read live only the content that may change.

The game writes its outcomes into the world: who died, which town burned, what was found. The world becomes the record of play, and every other tool on it sees the result. Writing needs a write key and the PIN, so keep it on a server or in a tool you control, not in a game you ship to players.

Four rules keep a write from damaging work done elsewhere:

  • Send only the fields that changed. A PATCH replaces every field it carries, so sending back an element fetched earlier undoes edits made since.
  • Change link lists with editLinks, which adds and removes ids on the server. A PATCH with a link list replaces the whole list. See Links.
  • Check every bulk response. A bulk write answers HTTP 200 even when some items failed. See Writes.
  • Keep game-only state in extension fields (x_yourgame_*), which the server stores and returns verbatim, up to 64 KB per element. A well-behaved client carries other tools’ extensions through untouched. See Extension fields.
Engine The path today
Unity The Unity SDK: typed C# models, a v2 client, a world cache that ships as an asset, and a world browser in the Editor.
Browser games (JavaScript, TypeScript) The TypeScript SDK.
Godot, Unreal and other engines A world folder or .owworld file read straight from disk, with no key and no network: one JSON file per element. Or the REST API directly: HTTPS and JSON, with the key in a header (the call below). Generate a client from the OpenAPI document, and a class per element type from schema-dist (its decoder, the walk, is Python today). A reader of the archive of your own is graded by schema-dist’s fixtures/owworld/.
Build pipelines and tools The Python package reads and writes world folders and talks to the API.

Every path ends in the same call. This one finds Admiral Fluffington in Moppetopia, a public sample world, with its demo key, the same first run the SDKs start with:

Terminal window
curl -H "API-Key: 0000000001" \
"https://www.onlyworlds.com/api/v2/character/?fields=id,name&name__icontains=fluffington"

Unity is the first engine with an SDK of its own. Until another engine has one, its path is the folder or the API. In Claude Code, the toolkit’s develop skill carries these paths for a game, the map’s coordinates included.

The element types cover most of what a game holds. A starting point:

In your game Element type
Player characters, NPCs Character
Races and peoples Species
Monster and animal types (goblin, frost wyrm, the stat block) Species
Individual monsters (the goblin chief, a named dragon) Creature, linked to its Species
Items, gear, loot Object
Skills, spells, actions Ability
Passive perks, qualities Trait
Guilds, kingdoms, orders Institution (organized) or Collective (no formal structure)
Magic systems, currencies, crafting rules Construct
Rules of a faction or realm Law
Ranks and offices Title
Languages, including those spoken in dialogue Language
Quests and storylines Narrative
Battles and happenings Event
Weather, curses, magic storms Phenomenon
Reputation, rivalries, alliances Relation
Towns, dungeons, levels Location
Territories and regions Zone
Maps and what is placed on them Map, Pin, Marker

The line between Character and Creature is agency, not species: an intelligent monster with goals of its own can be a Character. supertype and subtype hold your game’s own kinds (a Creature with supertype Boss), so you don’t need new element types for them. Where two types are close, Conventions draws the line between them. Each type’s fields are listed under Schema.

Tactical Tangle is a hoplite battle game in which your OnlyWorlds characters fight in the ranks of a phalanx. Subs is a convoy-escort game of the Second World War, in which one of your Characters captains the lead escort: you open a world you own from a link, sign in or connect it with its key, and the crossing is written back into that world as a record. Everything else built on OnlyWorlds is listed under Tools.