How BEAF works
A genre-neutral game framework and live editor, opened up
A closer look under the surface: the layers BEAF is built from, how a game boots, the pieces it can draw on, the editor that runs beside it, and how a game goes from a fresh scaffold to a shipped build.
BEAF (Banana Editor and Framework) is a genre-neutral game framework and live editor, written in TypeScript and PixiJS and built for rapid prototyping. Its kernel handles rendering, scenes, game flow, assets, text and audio without knowing anything about a specific genre. General modules add optional capabilities such as input, physics, tweening, grids and animation, and a game installs only the ones it needs. Slots are handled the same way, as an optional add-on for a casino-style game.
A game boots through a fixed run of steps, shown below. While it plays, its behaviour is written as Steps and Sequences: a step is one unit of work, and a sequence runs steps one after another, side by side, or as a race between them. Modules add their own services and behaviour through a typed description that is checked before anything installs, so a module never needs to know which game is using it.
Two short tables: the ideas every game gets for free from the kernel, and the modules built on top of them.
Core ideas
| Idea | What it does |
|---|---|
| Flow: Steps and Sequences | One unit of work, chained one after another, run together, or run as a race; a game's whole script is built from these. |
| Scene graph | The tree of everything on screen, built from data and edited while the game runs. |
| Modules and services | Optional capabilities a game installs, and the shared services they register for the game to use. |
| Systems, every frame | Ordered per-frame logic, such as physics or animation, added without touching a central switch. |
| Assets and sound | Loading images and audio, and playing sound with fades and mixing. |
| Text and localisation | On-screen text, translated strings and currency formatting. |
| View and orientation | Resizing, safe areas, and portrait or landscape layout. |
| Config and storage | Named settings any module can register, and progress saved between sessions. |
Modules
| Module | What it does | Used by |
|---|---|---|
| Input | Reads pointer and held-key input. | Brick Breaker, the card game, the match-3 puzzle |
| Physics | Simple bodies and collision. | Brick Breaker |
| Tweening | Animates values over time with eases and curves. | the card game, the match-3 puzzle |
| Grid | A tile grid, its view and its own node type. | the match-3 puzzle |
| Cascade | The gravity-and-refill loop behind a match-3 board. | the match-3 puzzle |
| Animation | Skeletal animation as a node type. | the match-3 puzzle |
| Save | Saves progress on top of the framework's own storage. | the match-3 puzzle |
| Shared balance | A balance or score any game can add for free. | Brick Breaker, the card game, the match-3 puzzle |
| Optional add-ons | Casino-style features such as wagering and regulation, opted into as one layer. | casino-style games |
The editor is BEAF's live, in-game development tool. It sits beside the canvas while a game runs, so a change shows up straight away. A developer, artist or producer can make their own changes, which streamlines the process, raises efficiency and reduces waste.
Developer
Inspects and edits the running scene, its config and its flow, without leaving the game.
Artist
Checks how assets and animation actually look in place, and swaps them directly.
Producer
Reviews a build's content and behaviour without reading any code.
Fine-tuning
Feel, animation timing and performance stay with a person. Routine code and tests go to the agent.
Main panels
- Scene tree and inspector
- Config panel
- Sequence logger, showing Steps and Sequences as they run
- Assets panel
- Viewport toolbar, with zoom, orientation and device frames
- Help tab, where a module can add its own page
A release build leaves the editor out entirely: a build-time switch makes it unreachable, so the bundler drops its code along with the editor's own interface, and a separate check confirms none of it reached the build.
A new game starts from the same scaffold, whether it stays as a reference example or ships as its own repository.
Each game was built to prove a different part of the framework.
| Game | What it is | What it proved |
|---|---|---|
| Brick Breaker | An arcade paddle-and-ball game with levels and a high score. | Real collision physics, and progress saved between sessions. |
| A card game | A turn-based card game built on colour matching. | A game that never touches physics pays nothing for carrying it. |
| A match-3 puzzle | Symbols fall and refill across a grid. | Grid and cascade mechanics working together, with saved progress and animated pieces. |
AI agents did the building, under my direction, inside the Vault and Trellis. Every milestone follows the same loop, from a plain-language goal through planning, parallel builders and integration, to review and a written record that carries the decision forward.
Safeguards
Core unchanged
New work stays in modules; the kernel's own code is checked to confirm nothing moved.
Enforced boundaries
Games never import each other, and only one narrow path can reach the editor.
Automated tests
A suite runs before anything is committed, and an independent check plants faults the tests must catch.
The Vault as memory
Decisions and fixes are written down as they happen, so each new session picks up from where the last one left off.
A person's go
Nothing starts and nothing ships without a plain-language go-ahead.
The Vault
The memory. Small, linked notes on how the framework works, decisions with their reasons, and fixes filed by symptom. The agent reads it before it acts and writes to it when it finishes.
Trellis
The rulebook. It sets the steps a session follows, who may change what, and which checks must pass. Nothing merges without a person’s go.
Task guides
Short guides in the Vault, one for each kind of task, so an agent reads only what its task needs.
- Read the Vault
- Build inside Trellis
- Checks pass
- A person approves
- Write back
Each session ends by writing back what it learned and what went wrong. Decisions are kept in a design log with their reasons, and fixes are filed so the next person finds them in one question. The next session starts where the last one stopped, so the framework, the Vault and the agent’s work all improve with use.