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 initThis 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 --helpUnder 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
}
usesPreloaderis deprecated and defaults tofalse, which lets the host reveal your game as soon as it is ready. See the Preloader API.
maxDprdefaults to1.5and clampswindow.devicePixelRatioto1.5on 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 to2.0for sharper visuals or3.0for native unscaled resolution. See Deploying Your Game.
This makes future deployments easier by storing your game ID and build path.
Last updated