What a game is made of
A Verge game is content you author (maps, logic, data, and art), all created in the Manager and its editor. You never write anything low-level; you design the world and write your game's rules in JavaScript. Everything a game is made of falls into a handful of kinds:
| Kind | What it is | How you make it |
|---|---|---|
| Maps | Multi-layer tile maps with walls and warp points | Painted in the editor |
| Server-side logic | Your authoritative game rules: combat, quests, NPCs, loot | JavaScript |
| Client-side presentation | What a player sees: HUD, panels, inventory, overlays | JavaScript |
| Data | Definitions for monsters, items, skills, dialog, and more | JSON |
| Art | Tilesets, character sprites, item sheets | PNG (import & pixel-edit) |
| Music | Background tracks per map | Tracker modules (.mod/.xm/.s3m/.it) |
The most important split is server-side vs. client-side logic. Your server-side JavaScript is authoritative. It owns the real game state: where players are, what they carry, who wins a fight. Your client-side JavaScript handles presentation only: the HUD, panels, and overlays each player sees on their own screen. Keeping the rules on the server means players can't cheat by editing their client.
Your first game
The Manager is the one desktop app you need to make a game. Every step is a button you click, no command line. Start a new game and it scaffolds a complete, runnable starter world. From there the loop is always the same: edit your world, build it, run it, and connect a client to play. Everything happens inside the Manager.
The editor
The editor opens in its own window from the Manager. It's where you author everything your game is made of: paint multi-layer tile maps, set walls and warp points, bind trigger tiles to your JavaScript, and import and pixel-edit your art. You can edit your game's scripts right here too, alongside the maps and art they drive. What you author saves straight back to your game's content, ready to build.
Game logic in JavaScript
Your server-side rules are registered against the server object. Here's a small, real slice: greet a map by name, start its music, and add a chat command that warps the player elsewhere.
// runs as your authoritative server-side game logic
// Play a music track for everyone who enters "town".
server.onEnterMap("town", "onTownEnter");
function onTownEnter(idx) {
server.playMusic(idx, "town");
}
// onChatCommand registers ONE handler that fires for every "/" command
// that isn't built in. Parse the full text and dispatch it yourself.
server.onChatCommand(function(idx, text) {
if (text === "/home") {
server.warpEntityToMap(idx, 48, 47, "town");
}
});
server.onEnterMap(mapName, fnName) fires whenever a player enters that map: on login, on map change, and on warp-to-map. server.onChatCommand(fn) registers a single callback invoked as fn(idx, text) for any /-command that isn't already handled for you. Your handler inspects the full command text and dispatches on it. server.warpEntityToMap(idx, tileX, tileY, mapName) moves a player to a different map (use server.warpEntity to move them within the current one). Coordinates are tile-based everywhere on the server.
Presentation lives on the client side, against the client object:
// runs as client-side presentation on each player's screen
const panel = client.createPanel(8, 8, 180, 40, {});
const label = panel.addLabel("-");
client.onDraw(function(ctx) {
label.setText(player.name + " @ " + player.map);
});
client.onDraw(fn) runs every frame above all game elements; client.createPanel(x, y, w, h, opts) builds a retained-mode panel with labels, progress bars, and buttons. The read-only player global (player.name, player.x, player.y, player.map) stays live per frame.
client.onDraw, client.createPanel, and friends. A convention worth adopting (it's how LoreWorld is built) is to route all UI through one module so feature scripts stay presentation-free and consistent. That's a project choice, not a requirement.tickInterval option when your server starts (100ms by default); lower it for snappier action, raise it for a slower pace.Build & run
When your content is ready, build your game and run it, both from the Manager. Building packages everything you've authored into what streams to each connecting client; running brings your world online for you and your players to connect to. Returning players only download the parts that changed since they were last on, so most reconnects are near-instant.