For the complete documentation index, see llms.txt. This page is also available as Markdown.

Initializing Your Game

When you want to set up your project to work with RUN.world, or if you want to make an existing project publish to a new game (like forking a project), run:

rundot init

This command interactively walks you through the initialization process.

Manually initialize with CLI options

You can bypass interactive mode and manually specify everything. To see options:

rundot init --help

Under the hood

After initialization, a game.config.prod.json file is created in your project root that stores your game's configuration:

{
  "gameId": "your-game-id",
  "relativePathToBuildFolder": "./dist",
  "usesPreloader": false,
  "maxDpr": 1.5
}

usesPreloader is deprecated and defaults to false, which lets the host reveal your game as soon as it is ready. See the Preloader API.

maxDpr defaults to 1.5 and clamps window.devicePixelRatio to 1.5 on mobile devices (iOS & Android). This reduces GPU fill-rate by ~75%, stabilizing 60 FPS gameplay and eliminating iOS WebKit Jetsam OOM crashes. You can set this to 2.0 for sharper visuals or 3.0 for native unscaled resolution. See Deploying Your Game.

This makes future deployments easier by storing your game ID and build path.

Last updated