Veduta

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

  1. Installation: the veduta tool and the VS Code extension.
  2. Your First Game: Gem Cave, a small complete game built step by step.
  3. How a Game Runs: ticks, callbacks, kinds, and the rules scripts follow.

Writing the game

PageWhat it covers
Project Layoutthe files of a game, veduta.json, card.json
Entitiesthe things in the game: fields, methods, spawning, collisions
Scenesscene files: camera, light, the starting entities
Graphics Assetsmodels, materials and textures as JSON
Inputthe console's buttons, keyboard and gamepad
Camera2D and 3D cameras, following and shaking, world to screen
HUDtext, bars, shapes, icons and panels over the frame
Game Toolkittimers, tweens, cutscenes, bodies, screens, menus, dialogs, camera follow and shake, particles, records, settings, languages, snippets
2D Gamessprites, depth, layers, hitboxes, the traps
3D, Worlds and Blocksperspective scenes, streamed worlds, block worlds built at runtime
Savesprogress, records and settings that outlive a play, on the card and in tests
Structuring a Large Gamefolders, modules, shared state, data tables, cutscenes

Making it solid

PageWhat it covers
Testingscenarios, expectations, invariants, goldens, fuzzing
Debugging and Performancebreakpoints, errors, the tick budget, bench
Publishing to the Consolethe SD card, releases, API levels
The Veduta Serveraccounts, roles, channels, what publishing does, the API

Reference

The format references (every field of every JSON file) are the other half of this site: Reference.

Veduta v2 (Lua games, release candidates). This wiki is built from wiki/ in the engine's repository, where its examples are tested, and published with every engine release on https://veduta.roomve.it/docs/.