Make a game with your Agent
Shape a small Vishnu game with an Agent, test it, and share a build.
Vishnu games are code projects. Work with an Agent that can read and change the project files, and keep the project open in the same folder while you build it.
Install the Vishnu CLI with the scoped package @fungi.computer/vishnu, then
create the Acorn starter. The unscoped npm package vishnu is a different
project:
Illustrative: this setup needs a published Vishnu npm release and Node 24 or newer; it creates a new project folder.
npm install --global @fungi.computer/vishnuvishnu new acorn-gardencd acorn-gardenThe CLI needs the pinned simulation kernel for vishnu check, vishnu test and
vishnu build. Set VISHNU_PORTAL to the origin of the Vishnu Portal that
serves the kernel before running those commands. The CLI verifies the downloaded
kernel against the pin in vishnu.json; it refuses different bytes. If your
account has no Vishnu Portal configured, ask your Fungi administrator for its
origin before continuing.
Start with the Acorn game
Section titled “Start with the Acorn game”The Vishnu starter is a small playable game. Press P, then click the grass to plant acorns. They grow into trees, every third tree attracts a cat, and nine trees win. Starting with it gives your Agent working rules and a test to extend.
Ask your Agent to read the project’s AGENTS.md first. Then describe one small
game idea, including what the player does and how they win. For example:
Turn this into a tiny game about a frog protecting a pond. Give the player one clear action and a way to win. Keep the rules deterministic, add tests for the new rules and for winning, and run the Vishnu checks.
The main game is cartridge.ts; its rules are tested in cartridge.test.ts.
Ask the Agent to change one mechanic at a time and explain the controls and goal
when it finishes.
Check and play the game
Section titled “Check and play the game”Run the project checks from its folder:
Illustrative: these commands need the starter project and a configured Vishnu Portal serving its pinned simulation kernel.
vishnu checkvishnu testvishnu buildcheck typechecks the cartridge and runs authoring checks. test runs its
tests against the simulation kernel. build creates a static game in dist/.
Fix any failure and run the checks again before sharing the build.
To play the build locally, serve dist/ with a static file server. If Python 3
is installed, use:
Illustrative: this long-running server needs a completed dist/ build and a
free local port 8080; stop it when you finish playing.
python3 -m http.server -d dist 8080Otherwise, use Node’s package runner to start a static server:
Illustrative: this alternative downloads http-server from npm and runs until
you stop it; it also needs the completed build and port 8080.
npx --yes http-server@14.1.1 dist -p 8080Open http://127.0.0.1:8080/, click the world to focus it, and try the
controls.
Publish and share
Section titled “Publish and share”For publishing from an Agent on an authorized Team Computer, send the build through the Hub:
Illustrative: publishing needs an authorized Team Computer, a completed build and a Hub with its Portal publishing credential configured.
vishnu publish dist --hubThe Hub uses its Portal credential for the publish request; the Agent’s Computer does not need a Portal login or token. See Publish from your Agent through the Hub for the full workflow.
A new game is unlisted: anyone with its link can play it, but it does not appear on the public gallery. An operator reviews games before listing them there. Share the play link with the people you want to try it.
Add engine features
Section titled “Add engine features”Use these short examples when you want your game or Agent to use an engine feature:
- Define a custom actor
- Checkpoints and retry
- View-only point lights
- Click to target actors
- Drive an actor with the movement keys
- Prebuilt and breakable structures
- Build houses from blueprint modules
- Stage a moment with a test scenario
- Frame-aware observation for riders
- Start local games paused and control shared worlds
- Publish from your Agent through the Hub