Veduta: making games in Lua
Veduta is a game engine for a small handheld console: a 320 × 240 panel, a D-pad, A, B, Select, Cancel and Home, 20 frames a second. You write the game in Lua, test it on your PC in a simulator window, and copy it to the console's SD card. No compiler, no build step: the engine runs your scripts directly, on the PC and on the console alike.
Every run is deterministic. The same buttons pressed at the same ticks always give the same game, on every machine, so a play session can be saved as a test and replayed forever.
These pages describe Veduta v2, whose Lua games are still in release candidates (
v2.0.0-rc.N). Install from the beta channel, see Installation.
Start here
- Installation: the
vedutatool and the VS Code extension. - Your First Game: Gem Cave, a small complete game built step by step.
- How a Game Runs: ticks, callbacks, kinds, and the rules scripts follow.
Writing the game
| Page | What it covers |
|---|---|
| Project Layout | the files of a game, veduta.json, card.json |
| Entities | the things in the game: fields, methods, spawning, collisions |
| Scenes | scene files: camera, light, the starting entities |
| Graphics Assets | models, materials and textures as JSON |
| Input | the console's buttons, keyboard and gamepad |
| Camera | 2D and 3D cameras, following and shaking, world to screen |
| HUD | text, bars, shapes, icons and panels over the frame |
| Game Toolkit | timers, tweens, cutscenes, bodies, screens, menus, dialogs, camera follow and shake, particles, records, settings, languages, snippets |
| 2D Games | sprites, depth, layers, hitboxes, the traps |
| 3D, Worlds and Blocks | perspective scenes, streamed worlds, block worlds built at runtime |
| Saves | progress, records and settings that outlive a play, on the card and in tests |
| Structuring a Large Game | folders, modules, shared state, data tables, cutscenes |
Making it solid
| Page | What it covers |
|---|---|
| Testing | scenarios, expectations, invariants, goldens, fuzzing |
| Debugging and Performance | breakpoints, errors, the tick budget, bench |
| Publishing to the Console | the SD card, releases, API levels |
| The Veduta Server | accounts, roles, channels, what publishing does, the API |
Reference
- Lua API Reference: every function and field a script can use.
- Command Line: the
vedutacommands. - FAQ and Troubleshooting: common problems and current limits.
The format references (every field of every JSON file) are the other half of this site: Reference.