MaVi-0.2-65M
MaVi is a small language model that turns a plain-English game idea into a playable 2D game. It was trained
from scratch, together with its own game engine: the model writes GSL, a compact game-specification language
(see GSL.md), and the engine plays it, validates it and exports it to Godot 4 and Ren'Py. It can also draw
pixel-art sprites in PXL, a small drawing language, and edit existing games and levels.
This is an alpha release (version 0.2, 64.7M parameters).
Model
| Architecture | decoder-only transformer, 12 layers, 10 heads, d_model 640, d_ff 1728 (RoPE, RMSNorm, SwiGLU, tied embeddings) |
| Parameters | 64,732,800 |
| Tokenizer | byte-level BPE, 8,192 tokens, trained on GSL + English |
| Context | 4,096 tokens (NTK RoPE base 27524) |
| Training | English pretraining on public-domain books, then a fine-tune on game tasks; single RTX 4060 Ti |
| Skills | create (prompt โ game), edit, repair, GDScript, draw / redraw (pixel art), level edits |
Use
pip install torch safetensors
python generate.py "a platformer where an orange fox collects cherries and avoids bees and snakes, 3 lives"
python generate.py --task draw "orange fox side view, walk cycle"
The output is GSL (or PXL for sprites). The model alone only writes the spec: playing it needs the MaVi engine,
which also checks it and repairs errors with the model. Prompt format (see formats.py):
<|bos|><|create|>{prompt}<|gsl|> โ game, <|bos|><|r2|>{prompt}<|gsl|> โ sprite.
Training data
All training data is generated or openly licensed:
- Game tasks: synthetic prompt โ game examples from a procedural generator (16 genres, everyday vocabulary, casual phrasing); every example was played by a headless playtester and kept only if valid and playable.
- English: public-domain books from Project Gutenberg.
- Code: GDScript and Ren'Py files from MIT / CC0 licensed GitHub repositories.
- Pixel art: procedurally drawn sprites, plus sprites from Kenney (CC0) and OpenGameArt (CC0 and CC-BY,
credited in
ATTRIBUTION.md).
Evaluation
Evaluated on 200 held-out tasks (each output checked by the engine's validator and a headless playtester):
| MaVi-0.1 (v3.3) | MaVi-0.2 (v3.4) | |
|---|---|---|
| valid and playable | 93.0% | 92.5% |
| new-game (create) tasks | 90.3% | 89.6% |
| repair tasks | 100.0% | 100.0% |
| edit tasks | 100.0% | 100.0% |
Single attempt, no retries; the MaVi Studio additionally retries and repairs with the engine's feedback.
New in 0.2: GSL v0.4 action mechanics (melee attacks, dash, enemy health bars, enemies that fight back), a quest game type (keys, locked doors, characters you talk to), prompts naming two kinds of enemy or pickup, 31 more drawable subjects (food, tools, vehicles, spacecraft) and Kenney CC0 pixel art in the drawing data.
Limitations
- Alpha quality: it sometimes leaves out something the prompt asked for, or repeats itself on long levels.
- It draws familiar subjects (animals, characters, items, vehicles) well and unfamiliar ones poorly.
- It writes GSL v0.4 games: melee, dash, enemy health bars, keys and locked doors, talking characters.
- English only. Not meant for anything beyond making small games.
Licence
Weights and code: Apache-2.0. Training art credits: ATTRIBUTION.md.
- Downloads last month
- 12