Code frameworks
Project layout and manifest
Where each file goes, how files are named, and what the manifest must declare.
Folders
| Folder | Holds | Notes |
|---|---|---|
| manifest/ | project.json | Exactly one manifest. |
| schemas/ | One JSON file per Framework | The Framework id is the file's id field. |
| rules/ | TypeScript rule files | One exported function per constructor or action file. |
| layouts/ | Frames | Each Frame is a JSON file that a Framework lists. |
| scenarios/ | Tests | One scenario object per file. |
Use lowercase relative paths with no .. parts. Framework, action and function ids start with a lowercase letter, then use lowercase letters, digits, underscores or hyphens, up to 64 characters.
The manifest
{
"formatVersion": "fabled.game-project/v1",
"projectId": "game-your-game-id",
"projectKind": "GAME",
"compilerProfile": "native-game-v1",
"name": "Lantern Keepers",
"entryFramework": "keeper",
"frameworks": ["schemas/keeper.json"],
"scenarios": ["scenarios/new-keeper.json", "scenarios/heal.json"]
}- Line 3 Keep the projectId the editor made. It must match the id of the project.
- Lines 8-9 Paths start at the project root.
| Field | Required | Meaning |
|---|---|---|
| formatVersion | Yes | Always fabled.game-project/v1. |
| projectId | Yes | The id the editor created for your game. Keep it as it is. It must match the id of the whole project, or saving fails. |
| projectKind | Yes | GAME for a full game with a character, or ADD_ON for extra content. |
| compilerProfile | Yes | Always native-game-v1. |
| name | Yes | The project name. |
| description | No | Up to 2000 characters. Use it for a licence or credit line. |
| entryFramework | Yes | The Framework players create first. For a GAME, a playable character. |
| frameworks | Yes | Paths of the Framework files, 1 to 64. |
| scenarios | Yes | Paths of the scenario files, 1 to 512. |
The manifest accepts only these fields, plus optional tables and rights. An unknown field is an error.
If the id in the manifest and the id of the project differ, the check stops with:
manifest projectId does not match source tree projectIdEvery file must be listed
The manifest lists the Framework and scenario files. Each Framework file lists its own rules and Frames. A file that nothing refers to is an error, so remove it or list it.
export function extra(): void {}Adding this file without referring to it fails with:
Project contains undeclared source files: rules/extra.ts.A path that is listed but missing fails too. Here the manifest points at a scenario file that does not exist.
{
"formatVersion": "fabled.game-project/v1",
"projectId": "game-your-game-id",
"projectKind": "GAME",
"compilerProfile": "native-game-v1",
"name": "Lantern Keepers",
"entryFramework": "keeper",
"frameworks": ["schemas/keeper.json"],
"scenarios": ["scenarios/new-keeper.json", "scenarios/nope.json"]
}Missing or misplaced project source.Size limits
A project can hold up to 8 MiB of source, 1000 files, 64 Frameworks and 512 scenarios. Fabled also compiles your source into one game. That compiled game must stay under 16 MiB before it can be prepared.

