Skip to content

feat(story-board): add the Story Board plugin - #70

Closed
dihuangdh wants to merge 3 commits into
mainfrom
feat/story-board
Closed

dihuangdh wants to merge 3 commits into
mainfrom
feat/story-board

Conversation

@dihuangdh

@dihuangdh dihuangdh commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What changed

A new Beta plugin, ohmygame/story-board, in plugins/story-board:

  • The panel: a Story Board on a canvas drawn and handled as OhMyGame's own canvases are. A game's chapters, scenes, levels or quests are cards, joined by arrows.
    • Cards: add from the tool bar, a double-click or a + port. Each card takes a picture from this computer or text, and can be renamed with its pencil.
    • Arrows: drawn from the ports and cut with the scissors. Named arrows show as rows with their condition.
    • Keys and menu: undo and redo, plus copy, paste, duplicate and Option-drag, and a right-click menu.
  • The canvas belongs to the plugin. panel/canvas.js holds <story-canvas> and <story-card>, and panel/canvas-alignment.js is a copy of the app's src/renderer/canvas-alignment.ts.
    • The canvas follows the app's canvas sources: editor-canvas.tsx, canvas-node-label.tsx, canvas-node-interactions.tsx and the Story canvas styles.
    • Colours, type and radii come from the page tokens, so themes follow. Sizes are copied from the app's canvas sources.
    • It isn't an OhMyGame page component yet: few plugins are canvases, so a shared one can be extracted once more of them need it.
  • Where it keeps data: story-board/board.json (version 1: read tolerantly, written strictly, and never written over when a later version saved it), layout.json, and images/.
  • Skill: a story-board Skill tells agents the format and to keep the board in step with the game.
  • README: the root README lists the plugin.

Why

A design document for a game's flow that works for any kind of game. It runs nothing and is tied to no project type.

How I checked

  • I ran these against an app on dev, without any canvas component:
    • plugin:check reports no problems.
    • test/official.test.ts, catalog and checks pass for story-board. The one failure is game-tests, which needs npm run build:game-tests first.
  • In a browser harness with dev's page components, I checked cards, ports, edge hover and scissors, the menu, undo, redo, duplicate, copy and paste.
  • I used it in the desktop app.

Before merging

It needs API 2.37. Pictures added from the panel need WhiteTowerAI/ohmygame#1141: without it, the app reloads the panel while the picture is written, and the card doesn't keep it. Merging here publishes the plugin, so merge it once an app with #1141 is out, or accept that pictures don't stick until then.

A panel for any project that lays out a game's chapters, scenes, levels
or quests as cards joined by arrows, on OhMyGame's own canvas
(omg-canvas, API 2.38), kept in story-board/, with a Skill so agents read
and update the board.
The board's canvas is the plugin's own panel/canvas.js, with a copy of
the app's alignment guides, instead of a new OhMyGame page component:
plugins are mostly not canvases yet, so the shared one waits until more
need it. The plugin now needs API 2.37.
…empty board

OhMyGame drops its own Story canvas, and an interactive story is a web game
whose flow is graph.json. An empty board in such a project offers to make a
card per Scene, where the old canvas placed it, with its picture and files,
and an arrow per connection named after its Exit. Undo takes it back.
@dihuangdh

Copy link
Copy Markdown
Contributor Author

Closing for now. Interactive stories are moving to the separate interactive-story plugin, which makes them web games played from graph.json. A board with its own board.json would be a second copy of the same flow that drifts from the game, and two story plugins would be confusing. I'm keeping the feat/story-board branch: if stories need a visual view later, it should live in the Interactive Story plugin and read and write graph.json directly, reusing this canvas.

@dihuangdh dihuangdh closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant