All pages

Build games on Eggox

A game is rooms, things, bricks and Lua scripts. Build it in the Studio inside Eggox, or as files on your own machine with the eggox command line. Hand the files to an AI agent: every page here is also markdown.

Install
npm install -g @eggox/cli
eggox login
eggox pull "My Game"

No npm? curl -fsSL https://eggox.net/cli/install.sh | sh

Pip: Can I build a game in my own editor?

Tavi: Yes. A game is a folder. Pull it, change it, push it.

Where to start

The command line is open source

Every page

Get started

  • What a game isA game on Eggox is rooms, things, bricks and scripts. Build it in the Studio, or as files on your own machine.
  • Your first gameA coin rush in ten minutes, with bricks and no code.
  • With an AI agentGive an agent the docs and a folder. It pulls, writes, checks until it compiles, pushes. You play.

A game as files

  • The foldereggox.json, a folder per room, a file per thing. Nothing in a game lives outside this shape.
  • Roomsroom.json holds a room's settings, its rules, and every thing standing in it.
  • ThingsA thing's script and bricks live in things/, and apply to every one of it in every room.
  • StockA game holds a stock of mints; its rooms place them by name.
  • Check, push, publishA push makes the game match the folder, whole or not at all. Publishing is a separate step.

Command line

  • OverviewInstall the eggox command line, log in, and take your games to your own machine.
  • eggox loginLog in to Eggox from this machine. A browser opens once.
  • eggox logoutForget the login on this machine.
  • eggox whoamiWho is logged in, and on which server.
  • eggox gamesThe games you own, with their id, rooms, API version and whether they are published.
  • eggox pullA game as files, into a folder on your machine.
  • eggox checkWould these files work? Nothing is written; errors come back as file and line.
  • eggox pushMake the game match the files, whole or not at all. The game becomes the draft.
  • eggox playtestPlay the pushed draft on the server with no browser, and read what its scripts did.
  • eggox publishPublish the game as it stands. From then on the door leads here.
  • eggox bagThe mints in your bag, the things a game can hold.
  • eggox stockThe things a game holds. Put a mint in from the bag, take one back, or show another version.
  • eggox docsThe reference as markdown, in the terminal or into an agent.
  • eggox entranceUse a mint from an experience's stock as its entrance, or restore the default floor star.
  • eggox mcpServe the commands to an AI agent as MCP tools over stdio.
  • eggox updateFetch the newest eggox from the server you use.
  • eggox blueprintLocal voxel files, complete-frame uploads, saved iterations and minting.
  • Render previewsSee blueprint frames and experience layouts as PNG images from the server.

Studio

  • The StudioThe in-game editor: a hierarchy on the left, the world in the middle, the inspector on the right.
  • BricksEvery brick, its fields and what it does. Bricks on the game make the rules; bricks on things make behaviour.
  • Blueprint filesBuild voxel items locally, save iterations and publish on behalf of your account.
  • Frame formatThe complete local voxel, layer, animation and binary contract for blueprint authors.

Scripting API

  • Scripting APIEvery event and verb a room script can use, on the current API version.
  • Objects, bricks and scriptsA game is also a folder of files (rooms, things, scripts, bricks) that the eggox command line pulls and pushes, so it can be worked on from your own machine, in
  • Build, playtest, publishBuy an experience in the Shop, place its door, and open its setup panel.
  • Runtime and stateScripts execute on the server in Luerl, an Erlang implementation of Lua.
  • Room events Event Handler arguments and meaning --- --- start function() once when the copy starts, before players enter enter function(player) when someone joins leave fu
  • Scene and players Call Effect or return value --- --- things() All things in the copy, including hidden stock named(name) Things with that exact name, as an array tagged(tag) Th
  • Windows and responsive layoutswindow(player, spec) opens or replaces one window for that player.
  • Readouts and messages Call Purpose --- --- say(text) / say(player, text) Brief line for everyone / one player panel(title, rows) / panel(player, title, rows) HUD with {{"SCORE", 3},
  • Timersafter(seconds, tag) runs once.
  • Saved progress and leaderboards Call Purpose --- --- save(player, key, value) / load(player, key) Personal progress in this game save(key, value) / load(key) Shared values for this game save(
  • Rooms, copies and invitations Call Purpose --- --- send(player, roomName) Enter a copy of another room in this game send({p1, p2}, roomName, true[, tag]) Start a fresh copy for these player
  • Lua library and limitsUseful library functions include pairs, ipairs, type, tonumber, tostring, assert, error, pcall, math, table, and string.
  • Thing scriptsThe server-owned interactive-furniture API also accepts a smaller script type.
  • Implementation and examplesThe API is implemented in server/lib/eggox/scripts/runtime.ex; window validation is in server/lib/eggox/scripts/window_spec.ex.
  • Costumes, combat feedback and interactive readoutsAn experience can temporarily dress a player using native artwork in that room (visible placements or hidden stock).
  • Public and private copiessend(player, "Room", "private"[, tag]) finds or creates that player's personal copy.
  • Real reward shops inside experiencesPlace a normal player stall in an authored room to sell real items that stay in the buyer's inventory outside the experience (a shop sells only editions of your

EggoxDB

  • EggoxDB APIEvery mint, blueprint and person in Eggox, as JSON anyone can read. No key, no account.