Guides & API

Documentation

Learn how to use the Map Editor, Animator, and API.

Map Editor

A browser-based tile map editor for building 2D game worlds with real-time syncing and full undo/redo.

Overview

The Map Editor lets you create maps with multiple layers, paint tiles from your own tilesets, place entities with custom properties, draw collision shapes, and mark points of interest. Everything syncs in real-time and supports full undo/redo.

Work is organized around a project, which contains your maps, tilesets, and entity definitions. You work in a tabbed interface - open any map, tileset, or entity in its own tab and switch freely.

Projects

A project is the top-level container for everything in the editor. Each project holds its own maps, tilesets, and entity definitions.

  • Click New Project on the project list and give it a name and optional description.
  • Click Open on any project card to enter the editor.
  • Export a project as JSON using the download icon on the project card.
  • Deleting a project moves it to the trash. Restore it from the trash view, or it is permanently deleted after 7 days.

Maps

Maps are the canvases where you build your game levels. Each map contains layers, entity instances, colliders, and points.

Creating and managing maps

Open the Maps browser from the toolbar to create, search, rename, or delete maps. Double-click a map to open it, or select it and click Open. Each open map gets its own tab.

Layers

Each map has a stack of tile layers in the left sidebar. Layers render bottom-to-top, with the highest-order layer drawn on top.

  • Click + next to "Layers" to create a new layer.
  • Drag layers to reorder. Toggle the eye icon to show/hide.
  • Select a layer to paint on it - the right panel shows its properties.

Layer properties available in the right panel:

Property Description
Tile Size Width and height of each tile cell in pixels. Layers can have different tile sizes.
Parallax X and Y multipliers for parallax scrolling effects.
Offset Pixel offset for fine-positioning the layer.
Tint & Opacity Color tint and transparency.
Custom Properties Arbitrary key-value metadata readable from your game engine.

Foreground and background

The layer list includes an Entities pseudo-layer that separates foreground from background. Drag tile layers above or below this row to control whether they render in front of or behind entities.

Tile painting tools

When a tile layer is selected, use these tools from the map toolbar:

Tool Key Description
Pencil B Paint individual tiles or multi-tile selections onto the map.
Eraser E Remove tiles from the active layer.
Rect Fill R Fill a rectangular region with the selected tile.
Select V Select and move entity instances or other objects.

Use the tileset picker and tile picker buttons in the toolbar to choose which tileset and tile region to paint with. Drag to select a multi-tile region from the tileset.

Terrain auto-tiling

For tilesets with terrain layers configured, switch to terrain mode. Terrain painting uses bitmask-based auto-tiling to automatically select the correct tile variant based on neighboring tiles. See the Tilesets section for setup.

Entities

Entities are reusable game objects - characters, items, triggers, spawn points, or anything else you need. Define an entity once, then place instances of it on any map.

Defining entities

Open the Entities browser from the toolbar to create and manage definitions. Each entity has a name, a type string, and can contain:

  • Sprites - visual layers from your tilesets. Each has position, offset, origin, scale, rotation, opacity, tint, and z-index.
  • Colliders - collision shapes (rectangle, circle, or polygon) edited in a dedicated collider editor.
  • Properties - typed fields (string, number, boolean, enum, or color) with default values that act as a schema.

Placing instances

Switch to the Entity tool (T), select which entity to place, then click the map. Each instance has:

  • Position - X and Y coordinates on the map.
  • Rotation - angle in degrees.
  • Scale - independent X and Y scale factors.
  • Property overrides - override any default on a per-instance basis. Reset back to defaults individually.

Use V to select and drag instances. Right-click for a context menu with delete.

Tilesets

Tilesets are sprite sheet images that the editor slices into individual tiles based on a configurable tile size.

Managing tilesets

  • Open the Tilesets browser from the toolbar to create, search, and delete tilesets.
  • Open a tileset tab to view its image and configure tile metadata.
  • Upload or replace the image using Replace Image. PNG and GIF supported (up to 10 MB).
  • Set tile width and tile height in the sidebar to match your sprite sheet grid.

Tile properties

Click a tile in the tileset view to select it. The properties panel lets you set:

  • Name and Type - for identifying tiles in your game engine.
  • Custom properties - arbitrary key-value pairs (e.g., "walkable": "false").
  • Colliders - per-tile collision shapes with a visual editor.
  • Animation Frames - define frame sequences with per-frame duration to animate tiles.

Create Entity From Tile

Right-click any tile in the tileset view and select "Create Entity From Tile" to create a new entity with a sprite pointing at the selected tile. The entity is named after the meta tile (or the tileset name) and opens in a new tab.

Terrain layers

Terrain layers enable auto-tiling. In the tileset sidebar, click + next to "Terrain Layers" to create one. Select a terrain layer, then assign tiles to bitmask positions. When painting with the terrain, the editor auto-picks the right tile variant based on neighbors.

Colliders

Colliders define collision and trigger areas. They appear in three places:

  • Map colliders - drawn directly on the canvas for walls, floors, and trigger zones.
  • Entity colliders - attached to entity definitions and inherited by every instance.
  • Tile colliders - attached to individual tiles for per-tile collision shapes.

Drawing map colliders

Switch to the Collider tool (C) and click the map to place vertices. Each click adds a point to a polygon collider.

  • Right-click a point to delete it, or a segment to insert a new point.
  • Right-click the body to delete the entire collider.
  • Each collider has name, type, and custom properties in the right panel.

Points

Use the Point tool (P) to place named map points - spawn locations, waypoints, camera targets, or any position marker. Each has a name, type, position, and optional custom properties.

Keyboard shortcuts

Shortcut Action
Cmd/Ctrl+ZUndo
Cmd/Ctrl+Shift+ZRedo
VSelect tool
BPencil tool
EEraser tool
RRect Fill tool
TEntity tool
CCollider tool
PPoint tool
HToggle grid
FToggle fullscreen
DeleteDelete selected item
EscapeDeselect / cancel

Export format

Exporting a project produces a .zip file containing JSON resource files and tileset images. Use these files to load your levels in any game engine.

ZIP structure

project.zip ├── project.lostproj # Project manifest ├── resources/ │ └── tileset.png # Tileset images ├── tilesets/ │ └── forest.lostset # Tileset definitions ├── entities/ │ └── hero.lostentity # Entity definitions └── maps/ └── level1.lostmap # Map data

.lostproj (Project manifest)

The root file that lists every resource in the project.

{ "version": "1.0", "name": "My Project", "hash": "a1b2c3...", "lastModified": "2026-01-25T12:00:00Z", "resources": { "tilesets": ["tilesets/forest.lostset"], "maps": ["maps/level1.lostmap"], "entities": ["entities/hero.lostentity"] } }

.lostset (Tileset)

Defines a tileset image, its tile grid, per-tile metadata, and terrain layers.

{ "version": "1.0", "id": "uuid", "name": "Forest", "order": 1, "imagePath": "resources/forest.png", "tileWidth": 32, "tileHeight": 32, "tiles": [ { "x": 0, "y": 0, "width": 32, "height": 32, "name": "grass", "type": "ground", "colliders": [ { "id": "uuid", "name": "floor", "type": "solid", "position": { "x": 16, "y": 16 }, "points": [{ "x": -16, "y": -16 }, ...], "properties": {} } ], "properties": { "walkable": "true" } } ], "terrainLayers": [ { "id": "uuid", "name": "Ground", "tiles": [{ "tileId": 5, "bitmask": 255 }] } ] }
Field Description
order 1-indexed alphabetical position among project tilesets. Used in tile encoding.
tiles[].x / y Tile-grid coordinates (column and row in the tileset image).
colliders[].position Centroid of the collider shape.
colliders[].points Vertices relative to the centroid.

.lostentity (Entity)

A reusable entity definition with sprites, colliders, and a property schema.

{ "id": "uuid", "name": "Hero", "type": "character", "sprites": [ { "id": "uuid", "name": "body", "type": "", "tilesetId": "tileset-uuid", "rect": { "x": 0, "y": 0, "width": 32, "height": 32 }, "offset": { "x": 0, "y": 0 }, "origin": { "x": 0.0, "y": 0.0 }, "scale": { "x": 1.0, "y": 1.0 }, "rotation": 0, "zIndex": 0, "tint": { "r": 255, "g": 255, "b": 255, "a": 255 } } ], "offset": { "x": 0, "y": 0 }, "rotation": 0, "colliders": [ { "id": "uuid", "name": "hitbox", "type": "solid", "position": { "x": 0, "y": 0 }, "points": [ { "x": -16, "y": -16 }, { "x": 16, "y": -16 }, { "x": 16, "y": 16 }, { "x": -16, "y": 16 } ], "properties": {} } ], "properties": [ { "name": "health", "type": "number", "default": "100", "options": [] } ] }
Field Description
sprites[].rect Source rectangle in the tileset image in pixels (x, y, width, height).
sprites[].tint {r, g, b, a} values 0-255.
properties An array of definitions (schema), not instance values. Each entry has name, type, default, and options.
colliders Rectangle = 4 corner points, circle = 16-point approximation, polygon = raw vertices.

.lostmap (Map)

Contains layers, entity instances, map colliders, and points.

{ "version": "5.0", "id": "uuid", "name": "Level 1", "layers": [ { "id": "uuid", "name": "Ground", "visible": true, "foreground": false, "order": 0, "tileWidth": 32, "tileHeight": 32, "chunkWidth": 8, "chunkHeight": 8, "parallaxX": 1.0, "parallaxY": 1.0, "offsetX": 0.0, "offsetY": 0.0, "tint": { "r": 255, "g": 255, "b": 255, "a": 255 }, "properties": {}, "chunks": { "0,0": [4294967328, 0, ...], // 64 encoded tile values "-1,0": [...] } } ], "entities": [ { "id": "uuid", "x": 128, "y": 256, "entityDefId": "entity-uuid", "rotation": 0, "scale": { "x": 1.0, "y": 1.0 }, "properties": { "health": "50" } } ], "points": [ { "id": "uuid", "x": 100, "y": 200, "name": "spawn", "type": "player_start", "properties": {} } ], "colliders": [ { "id": "uuid", "name": "wall", "type": "solid", "position": { "x": 64, "y": 96 }, "points": [...], "properties": {} } ] }

Tile encoding

Each value in a chunk array is either 0 (empty) or a single integer that encodes the tileset, and the pixel position of the tile in the tileset image.

The exporter converts tile-grid coordinates to pixel coordinates before encoding: pixel_x = tile_x x tileWidth, pixel_y = tile_y x tileHeight. These pixel values are then packed into a 48-bit integer:

Encoding
tile_id = (tileset_order << 32) | (pixel_y << 16) | pixel_x
Decoding
tileset_order = tile_id >> 32 pixel_y = (tile_id >> 16) & 0xFFFF pixel_x = tile_id & 0xFFFF tile_col = pixel_x / tileWidth tile_row = pixel_y / tileHeight
  • 0 = empty tile
  • tileset_order = 1-indexed alphabetical tileset position (matches order in .lostset)
  • pixel_x / pixel_y = pixel coordinates of the top-left corner of the tile in the tileset image
  • Divide by the tileset's tileWidth / tileHeight to get grid column and row
  • 48-bit integer - requires BigInt or a 64-bit integer type in most engines

Chunks

Chunk keys are "chunk_x,chunk_y" strings (negative values supported). Each chunk value is a flat array of 64 encoded tile integers representing an 8x8 tile grid in row-major order (left-to-right, top-to-bottom).

Entity instances (in maps)

Field Description
entityDefId Links to the id field in a .lostentity file.
properties Flat {"name": "value"} map - only contains overridden values. Merge with the entity definition's defaults.
x / y Pixel position on the map canvas.
scale Independent X and Y scale factors.