Skip to content
Download all docs .md

Project Files

What is in a Web Creator game. The set-up script for your framework writes the first version; after that you and the AI change it.

index.html            the game's page (Hosting serves the folder as it is)
game.js, *.js, *.css  game code
assets/               pictures, sound, models
room/room.js          GameFuse Multiplayer room code (optional; bundled on deploy)
package.json          optional; packages the game needs from npm
gamefuse.json         { "framework": "phaser", "entry": null }
AGENTS.md             the guide the AI reads about this project

gamefuse-env.js

gamefuse-env.js is not in your files. The preview and the hosted game both serve it, filled in for you:

window.GAMEFUSE_ENV = { gameId, gameToken, apiUrl, preview };   // preview: true in the editor

The page loads it before the GameFuse library, and the game uses it to connect:

<script src="gamefuse-env.js"></script>
<script src="https://cdn.jsdelivr.net/gh/GameFuseCo/game-fuse-js@6bb58c3dedb6cde160b2c67ecaeb4fb0b553d945/gameFuseFull.min.js"></script>
GameFuse.setUpGame(GAMEFUSE_ENV.gameId, GAMEFUSE_ENV.gameToken, onReady);

const multiplayer = new GameFuseMultiplayer({
  gameId: GAMEFUSE_ENV.gameId,
  gameToken: GAMEFUSE_ENV.gameToken,
  apiUrl: GAMEFUSE_ENV.apiUrl,
});

In the preview these point at a test copy of your game, so test players and scores do not mix with your real ones.

Room code

room/room.js is ordinary GameFuse Multiplayer room code. Everything in the Room Code Reference applies. On deploy it is bundled into one file and uploaded with the game.

npm packages

If package.json lists dependencies, the build installs them (with install scripts turned off) and bundles the file named by "entry" in gamefuse.json. With no dependencies, the files are served as they are.

Sizes

What Limit
One file 25 MB
All your Web Creator games' files together Your account's storage: 100 MB, more can be bought
A deployed game Its hosting plan's game size: 100 MB on Hosting Basic
Room code 5 MB after bundling

See Limits and Plans.