Blender extension · Illustrated documentation

GameStudio user manual

From installation and your first playable level to reusable assets, game logic and a tested web build.

10 chapters · 17 screenshots and previews · Version 0.1.2
Browse the chapters

Build a game in Blender, play it while you work, and export it for the web. GameStudio keeps the level and art in Blender files, attaches game data to objects, and runs game logic in TypeScript. You can work manually, with a coding agent, or with both.

This manual covers the GameStudio 0.1.2 extension, whose declared minimum is Blender 5.2.0. It is tested with Blender 5.2 LTS and Blender 5.3. Screenshots show the included demonstration content and may differ slightly from your theme, window size or agent selection. Paths in examples are relative to a fictional game project.

GameStudio playing the demo inside Blender, with object components at the right and the game console below

The embedded Game view runs the exported game inside Blender. The right-hand panel holds the selected object's components; the lower panel shows game messages. The warning shown is part of this captured demonstration, not a required setup step.

Choose a starting point

Contents

  1. Installation and setup
  2. The editor and play controls
  3. Your first game
  4. Projects and templates
  5. Components and game logic
  6. Assets and rendering
  7. Menus, HUDs and audio
  8. Working with coding agents
  9. Testing and web builds
  10. Troubleshooting and reference

How the parts fit together

Part Your work What it produces
Blender Model objects, arrange levels, set components, author UI .blend source files
GameStudio extension Export scenes and UI, send edits, manage the project Generated game data and a live connection
TypeScript code Define components and systems Rules such as collection, movement, combat and winning
Dev server Load the game and rebuild changed code A local browser game with live updates
Web build Package code and exported assets A dist/ folder for static hosting

A .blend file is the editable source. Exported files under .gamestudio/ are generated from it. A game running in a browser has its own simulated state: a pickup disappearing during play does not delete the pickup from your Blender level.

What you can make

The included templates demonstrate third-person platforming, top-down shooting, driving and an endless runner. The runtime also supports orthographic cameras, constrained movement for 2.5D games, animation, prefabs, navigation, sound, particles, menus and multiple levels. Templates are starting points whose code and assets you can edit.

The downloadable output is a browser game. Blender's tools author its content, while the GameStudio runtime determines which rendering and game features appear in play. Use Scene view and playtests to evaluate that result.

Reading conventions

GameStudio > New Project means open the GameStudio menu and select New Project. Properties > Object > Game means open the Properties editor's Object tab and expand its Game panel. src/components/ is a folder inside the game project. Code blocks labeled TypeScript belong in the stated file; small snippets explicitly identify the hook or context they need.

Screenshots have descriptive alternative text and captions. In the offline edition, click an image or focus it and press Enter to enlarge it; Escape closes the enlarged view. Some editor captures deliberately contain example warnings and errors to illustrate the Console. They do not indicate that a new installation should produce those errors.

For exact field names and advanced APIs, use the documentation index. To read all chapters in one browser tab, open the offline edition.

Installation and setup

Manual contents · Next: The editor and play controls

Requirements

Requirement Details
Blender Version 5.2.0 or later, as declared by this extension's manifest. GameStudio 0.1.2 is tested with Blender 5.2.2 LTS and 5.3.0 on Windows; Blender 5.3 has not been tried by hand on Linux or macOS
Operating system The manifest lists Windows, macOS and Linux, each for x64 and ARM64; the matching Blender and runtime binaries must be available
Project storage A writable folder for levels, assets, code and generated files
Network during setup Used to obtain missing runtime dependencies; external coding agents also have their own service requirements
Game browser Chrome, Edge or Chromium for embedded play and browser automation, or the game browser offered by setup
Existing Node.js Optional; GameStudio accepts Node.js 22.12+ and can download its managed Node.js 24 runtime when needed

You do not need to install a coding agent to edit a level, add components or play a template. The normal extension setup manages the runtime dependencies; terminal commands are an optional developer workflow.

Install the extension archive

  1. Download gamestudio-<version>.zip from the latest GitHub release, under Assets. Keep it zipped. Do not use the Source code archives; they are not the extension.
  2. Drag the ZIP onto Blender's window and confirm the install, or open Edit > Preferences > Get Extensions, open the menu for extension management and choose Install from Disk, then select the ZIP.
  3. Enable GameStudio if Blender does not enable it automatically.
  4. Return to Blender's main window. The GameStudio and Game menus should now be visible.

Welcome to GameStudio with New Project, Open Demo and Add Game Workspace controls

The welcome screen provides the main entry points. The agent button becomes useful after you open a game project. A missing agent does not prevent manual editing.

Only if you work from a clone of the repository: build the archive yourself by running this in the repository root with Python and a supported Blender available. It writes the ZIP to dist/.

python tools/build_extension.py

The resulting ZIP includes the runtime packages and example content. Installing an arbitrary ZIP of the repository is not the same as building the extension package. Contributors can use npm run extension:install after setting up the checkout; this is a development convenience rather than a requirement for players or artists.

Complete the first runtime setup

Opening a project, pressing Play or enabling a game-rendered view can trigger Set Up GameStudio. The dialog explains the dependencies it needs and their destination before downloading them.

  1. Choose Set Up when you are ready to download the runtime.
  2. Watch the status bar or GameStudio menu for progress.
  3. Let setup finish. The action that requested it continues afterward.
  4. If setup fails, use Show Log, resolve the reported problem and choose Retry.

Setup can provide Node.js, game packages and a game browser. It uses the extension's user storage rather than installing these system-wide. Choosing Set Up also enables Blender's Allow Online Access when it is off. Set up automatically in GameStudio preferences skips the setup question on future requests; it is off by default.

Download sizes vary by platform and existing dependencies. Use the setup dialog's estimates rather than assuming every computer downloads the same files. After dependencies are installed, ordinary local authoring and play do not require an AI service.

Create or open a project

Use GameStudio > New Project, enter a name, choose a writable location and select a template. Starter is a useful first choice because its small collection game is easy to understand. A project folder holds both Blender files and TypeScript code.

Use GameStudio > Open Project to open an existing project folder containing gamestudio.json. If another Blender file has unsaved changes, choose whether to save it before switching. When a new project's setup finishes while you have unsaved work, it can wait for you; the GameStudio menu then offers Open followed by the new project's name.

Projects received from someone else may show a trust prompt before their scripts or dev server run. Inspect the source you received, then use GameStudio > Trust This Project if you choose to run it. This trust setting concerns executable project code, not whether Blender can display a mesh.

Confirm that setup works

  1. Open the project's start level.
  2. Check that the Game workspace and Properties > Scene > Game Project panel recognize the project.
  3. Press F5. On keyboards that use the function row for media controls, hold Fn as needed.
  4. Click the embedded game to give it input. If a title menu is open, choose its start button.
  5. Move the player, then press Shift+Esc to return input to Blender and F8 to stop.

Embedded play needs a supported game browser. If it is unavailable, Play can open the game in the system's browser instead. Complete the game-browser setup to use embedded play or select the Window display mode deliberately.

Set preferences

Choose GameStudio > Preferences or find GameStudio in Edit > Preferences > Add-ons. The most useful initial settings are Game display, Code editor, Coding agent, Scene view frame rate and Show launcher at startup. A full explanation is in Preferences.

The Game tab in the 3D View sidebar option restores the older sidebar layout. Current workflows put components in Object Properties and project controls in Scene Properties.

Update an installation

Save your open Blender files and retain a backup or version-control snapshot of the project. Install the newer extension archive through Blender's extension controls. Opening or playing a project lets GameStudio refresh its managed runtime packages; a package download is only needed when dependencies require it. Deliberate links into a development checkout are preserved.

After an update, open one representative level, press Play, inspect the Console and build the game once. This checks the actual combination of your project, extension and runtime. Keep your source files even if you discard old generated exports.

Disable or remove the extension

Stop the game and dev server, save Blender files, then disable or uninstall GameStudio in Blender's extension preferences. Your game project is a separate folder: keep it if you want to continue later. Do not treat uninstalling the extension as a backup or as deletion of project data. Any manually installed coding agent has its own installation lifecycle.

If setup stalls or Blender cannot access the project folder, use Troubleshooting.

The editor and play controls

Manual contents · Previous: Installation · Next: Your first game

The Game workspace

New projects open in the Game workspace. For an older Blender file, choose GameStudio > Add Game Workspace. Blender's regular modeling, material, animation and geometry-nodes tools remain available through their normal workspaces.

Game workspace with the selected player in the viewport, hierarchy at the upper right, components at the lower right and Console below

Read the workspace from left to right: author the level in the 3D View, select objects in the Outliner, and configure the selected object's game behavior in Object Properties. The example Console messages illustrate how runtime errors appear.

Location Purpose Typical action
Top bar Play controls, display mode, agent status Start a playtest or inspect agent actions
3D View Scene authoring or embedded game display Move a platform, preview a material, play the game
Outliner Object and collection hierarchy Select the player, camera or reusable collection
Properties > Object > Game Entity identity and components Add a Collider or change a controller's speed
Properties > Material > Game Game shaders and their fields Assign Water or FoliageSway
Properties > Collection Prefab configuration Prepare a reusable group of objects
Properties > Scene > Game Project Project, levels, scripts, lighting and build Export all levels or build for the web
Game Assets in the 3D View header Project asset libraries Place or replace a library asset
Console below the viewport Game messages, warnings and errors Find the source line that failed

The top bar adapts to window width. Play controls can move beside the scene selector when there is insufficient room next to the workspace tabs.

Play, pause, step and stop

Action Default shortcut Result
Play F5 Prepare/export the scene as needed and run the game
Pause or resume F6 Toggle simulation pause
Step F7 Advance the game for inspection
Stop F8 Stop the simulation and restore the editing view
Release embedded game input Shift+Esc Return mouse and keyboard control to Blender

The same play actions are available in the Game menu and as top-bar buttons. macOS and some laptop keyboards require Fn with the function keys. GameStudio's Play Shortcuts preferences allow rebinding them.

Click inside the embedded Game view before trying to move the player. A title screen or pause menu may intentionally keep the simulation paused; use the menu's start or resume button first. Escape is commonly a game's pause-menu key, while Shift+Esc releases embedded input.

Stopping a game is separate from stopping its dev server. GameStudio can keep the browser ready for a fast next Play. The Close idle game after preference controls how long an idle embedded game stays alive; Game > Stop Dev Server stops the development service explicitly.

Embedded and Window display

The icon beside the play buttons switches between Embedded and Window. Embedded streams the game's browser view into Blender. Window displays it separately and is useful when you want the level and game visible on different displays.

In embedded mode, Scene | Game in the area's header lets you return to the 3D View while the game runs. Switching the visible view does not replace the Play/Pause/Stop controls.

Scene view while editing

The Game toggle in a 3D View header draws that editing view using the game's renderer. GameStudio > Scene View creates a split view for this purpose. It lets you evaluate game materials, lighting and post effects without advancing gameplay.

You still navigate, select and transform objects using Blender's editing tools and overlays. This is useful for moving a light or adjusting a water material while looking at the exported result. Change Scene view frame rate if the preview costs too much while working; it defaults to 30 frames per second.

Scene view and Game view answer different questions. Scene view shows how the level renders from the editor's current viewpoint. Game view runs the player's camera, systems, physics and menus. A player that falls through a floor must be tested in play.

In a UI file, Scene view through the canvas camera previews the active screen. See Menus, HUDs and audio.

Inspect components

Object Game panel showing RigidBody, Collider and CharacterController components with editable fields

A controllable character combines a kinematic body, capsule collision and a CharacterController. The values shown belong to the demo; they are not a list of engine defaults.

Select an object and open Properties > Object > Game. Add Component lists built-in and project-defined components. Fields become Blender controls based on the TypeScript schema: numbers, choices, checkboxes, vectors, object references or asset paths.

An object's component data describes what systems do with it. A Collider supplies a collision shape; it does not by itself implement a score or a victory condition. Project-specific systems give those data fields their behavior.

Read the Console

Game Console showing information, a warning, an error and project-relative TypeScript source locations

Use the All, Warnings and Errors filters to isolate a problem. The stack points to the code that produced it; this capture deliberately includes a demonstration exception.

Double-click a source-linked error to open it in the configured code editor. Start with the earliest relevant error after a clean restart: later failures may be consequences of the first. If opening a line fails, check Code editor preferences; a system-default editor may open the file without jumping to the line.

For a useful debugging loop, stop, clear old messages, press Play and reproduce one action. Note the object, input and result. This gives both you and an agent a precise case to investigate.

What updates live

With Live Link enabled, component values and transforms can reach the running game. Saving TypeScript systems hot-reloads them. Mesh and material changes can trigger a scene re-export when Live geometry reload is enabled.

A re-export is a larger change than a numeric field update. After changing scene structure or physics setup, restart and verify from the beginning. If you are editing level two while the running game is in level one, the edits are not applied to unrelated objects in the other level.

Save the Blender source separately. A correct live preview is not evidence that unsaved edits have been written to disk.

Your first game

Manual contents · Previous: The editor · Next: Projects and templates

This tutorial turns the Starter template into a small collection game named Garden Quest. You will move a pickup, change the player's speed, add a new collectible, edit a menu and make a web build. It uses existing template logic, so no new TypeScript is required.

Create Garden Quest

  1. Choose GameStudio > New Project.
  2. Enter Garden Quest, choose a project location and select Starter.
  3. Choose Create and finish runtime setup if prompted.
  4. Wait for the start level to open in the Game workspace.
  5. Press F5, click into the game and start from the title menu.

The Starter includes a player, follow camera, three pickups, sound effects, a HUD and menus. Walk through the level once before editing. Collecting the last item leads to the win screen. Restart to confirm that the pickups and score reset.

If Play opens a window rather than an embedded view, you can continue there or finish the game-browser setup. The content workflow is the same.

Move a pickup

  1. Release game input with Shift+Esc and stop with F8.
  2. Select one of the visible pickup objects in the level.
  3. Use Blender's G transform to move it to another reachable position on the lawn. Constrain the move to a horizontal axis if needed.
  4. Keep the pickup near the player's body height. The Starter checks proximity to collect an item.
  5. Save, play again and walk toward its new position.

Expected result: the pickup now appears where you placed it and disappears when collected. It still exists in Blender after stopping because the running game and authoring scene have separate state.

If the pickup cannot be reached, lower it and move it onto clear ground. A hovering pickup outside the collection distance is a placement problem, even if it looks attractive from the editor camera.

Tune the player

  1. Stop the game and select the player object that carries CharacterController.
  2. Open Properties > Object > Game.
  3. Find CharacterController > Speed, note its current value and increase it modestly, for example to 7.
  4. Press Play and compare how long it takes to cross the lawn.
  5. Return the value or adjust it until movement suits the level.

Keep RigidBody > Type set to Kinematic and keep the player's Collider. The controller moves the character; a dynamic body is a different physics setup. Increasing speed can make narrow jumps and obstacles harder, so tune against the actual level rather than a number alone.

Add a new collectible

The easiest way to retain the working setup is to duplicate a template pickup.

  1. Stop and select one of the existing collectible objects.
  2. Use Shift+D to duplicate it and place the copy on reachable ground.
  3. Give it a clear object name such as BonusPickup.
  4. In Object > Game, confirm that it has the project component Collectible.
  5. Set its points field to 5.
  6. Save and restart the game from its title screen.

Expected result: the new pickup adds five points, the other pickups retain their own values, and victory waits until all collectibles are gone. The Starter's CollectSystem discovers objects with the Collectible component rather than relying on the original count of three.

The Starter already spins collectibles in its collection system. Avoid adding another Spin component to these objects unless you deliberately want a second rotation contribution.

To make a collectible from a new mesh instead, create a small mesh, assign a material, place it in reach and add Collectible. This works with the Starter's proximity-based system; other templates may use sensors or different components, so do not assume that any object named Coin is automatically collectible.

Add a decorative rotating object

  1. Add a mesh away from the walking route, such as a cube on a pedestal.
  2. Name it GardenMarker and scale it to suit the scene.
  3. In Object > Game > Add Component, add the built-in Spin component.
  4. Set its speed to 1 and leave its runtime axis at [0, 1, 0] for a vertical spin.
  5. Save and play.

Expected result: the marker rotates during play. It is decoration, so it needs no physics body. Component vector fields use runtime coordinates; Blender's vertical transform axis is Z, whereas the runtime's vertical axis is Y. The gameplay chapter explains the conversion.

Change the title screen

  1. Stop the game and choose GameStudio > Edit Game UI. Save the level when prompted.
  2. Select the Title scene using Blender's scene selector.
  3. Select the title text in the viewport or Outliner.
  4. Edit its text in Blender to say Garden Quest if it does not already use the new project's name.
  5. Save ui/ui.blend.
  6. Choose GameStudio > Back to Level, then start the game again.

Expected result: the title screen displays your text and its original buttons still work. Edit the visible text body rather than renaming components or changing button actions while learning the layout.

You can also change HUD text from Score {score} to Points {score}. Keep {score} intact: it is the binding that displays the live score. If you use another language, also update its translation table as described in Translations.

Test the complete loop

Run from the title screen and check these behaviors in order:

  1. Start begins play and the player responds to movement.
  2. Every pickup is reachable and awards its intended points.
  3. The five-point bonus changes the HUD by five.
  4. The final pickup opens the win screen.
  5. Restart restores the starting state.
  6. Pause and options can be opened and closed without trapping input.

Inspect the Console after the test. If a change fails, reverse only that change and repeat the same steps so the cause stays clear.

Create a build

Save the level and UI. In Properties > Scene > Game Project, use Levels > Export All, then expand Build and choose Build Web. Inspect the build log and output folder. The static game is written to the project's dist/ directory.

Test that output through an HTTP server before uploading it; double-clicking index.html is not an equivalent test of a browser game that loads assets. Testing and web builds gives the full process.

You now have a repeatable editing loop: change source, inspect it in the game, save it, test from the beginning and build. Continue with templates for a larger starting point, or add your own data and logic in Components and game logic.

Projects and templates

Manual contents · Previous: Your first game · Next: Components and game logic

Project structure

garden-quest/
  gamestudio.json
  package.json
  index.html
  vite.config.ts
  scenes/
    main.blend
    main.scene.json
  ui/
    ui.blend
    locales/
      fr.json
  assets/
    props.blend
    fonts/
    sfx/
    ui/
  src/
    main.ts
    components/
    systems/
    shaders/
  AGENTS.md
  CLAUDE.md
  .mcp.json
  .claude/skills/
  .agents/skills/
  .gamestudio/
  dist/

Not every project needs every optional folder. New Project supplies the files required by the chosen template.

File or folder Role How to maintain it
gamestudio.json Project identity, start scene and optional runtime/export settings Edit deliberately and keep in version control
scenes/*.blend Editable levels Save and back up as source
scenes/*.scene.json Generated readable descriptions of levels Useful for reviewing changes; edit the Blender source instead
ui/ui.blend Screens, one Blender scene per canvas Save independently of the level file
ui/locales/ Translation tables Keep with the game's source
assets/ Libraries, textures, fonts, audio and UI art Use project-relative references
src/ TypeScript schemas, systems and shaders Review code changes and type-check
Agent instruction files Project conventions and workflows Keep project instructions; exclude local credentials and sessions
.gamestudio/ Generated exports, caches, logs and local connection data Do not hand-edit exports or publish the folder
node_modules/ Installed packages Regenerate through setup rather than treating it as authored content
dist/ Web build Regenerate before release

Keep the whole project when making a backup. A lone level file may depend on asset libraries, code, fonts and UI stored elsewhere in the project.

Project configuration

A minimal configuration can look like this:

{
  "name": "Garden Quest",
  "formatVersion": 1,
  "startScene": "main"
}

startScene is a level identifier, not the display text on a title screen. For the normal one-scene-per-file workflow, scenes/main.blend exports as main and scenes/cave.blend exports as cave. Preserve configuration fields created by the template when editing the name or start level.

Multiple levels

Keep one level per .blend file under scenes/. This makes opening, exporting and reviewing a level straightforward.

  1. Save the existing level before switching files.
  2. Create another level file under scenes/ using Blender's normal file tools.
  3. Confirm it appears in Game Project > Levels.
  4. Set the start scene in gamestudio.json if needed.
  5. Use Export All before building or testing transitions between levels.

Game code can call ctx.loadScene('cave') from a system or event handler to change levels. ctx.store can carry run state across that transition, and ctx.save can preserve selected values across browser reloads. See Runtime state.

UI files under ui/ are not levels. Naming a canvas Title does not make it a scene that ctx.loadScene('Title') can load.

Choose a template

There are five built-in choices, including Starter. Their folder IDs can differ from the labels in the picker.

Label ID Useful starting point
Starter starter Small collection game, player, camera, menus and a translated options example
Platformer platformer Jumps, coins, checkpoints, a moving platform and a goal
Arena Shooter shooter Top-down aiming, enemy waves, projectiles, health and score
Time Trial driving Arcade car handling, track gates, lap timing and chase camera
Endless Runner runner Three lanes, power-ups and track chunks spawned from prefabs

Platformer template showing floating islands, collectible coins and a character approaching a jump

Platformer demonstrates readable jumps, collectibles and a camera following the character.

Arena Shooter template showing enemy waves, health and score in a top-down arena

Arena Shooter demonstrates a combat loop with spawned enemies, aiming and a health display.

Time Trial template with an arcade car, checkpoint marker, lap counter and race timer

Time Trial provides a complete driving loop that can be adapted to another track.

Endless Runner template with a three-lane track, coins, crates, score and distance

Endless Runner is especially useful for studying streamed prefab chunks and seeded choices.

The screenshots show the templates in play. New Project copies a template into an independent project; experimenting there does not edit the bundled template.

Save your own template

  1. Bring the game to a useful starting state and test it from its title screen.
  2. Save all source files that should travel with it.
  3. Choose GameStudio > Save as Template.
  4. Enter a stable ID, a readable label and a short description.
  5. Leave Save the scene first enabled when the current level has changes you want to retain.
  6. Save, then open New Project and select your template to test a fresh copy.

A template can include project levels, code, assets, UI, instructions and custom agent skills. Generated exports, installed packages, local agent state and build outputs are excluded by the template workflow. The full inclusion rules are in Project templates.

A saved template is a starting point, not a complete archival backup: some top-level files are intentionally omitted. Keep a separate backup or repository for the original game.

New Project replaces supported project-name placeholders and updates marked game-title text in ui/ui.blend. It does not rewrite every arbitrary sentence or object name containing the old title. Review menus after making a new game from a custom template.

Collaborate and share source

Commit Blender source, code, configuration, asset files and useful instruction files together. Keep generated caches and private connection files out of the shared repository. Before sharing a template or project, review text, asset metadata, code comments, logs and embedded file paths for information that does not belong in the shared example.

Use project-relative asset locations and test a copy from a different folder. An absolute reference to a local texture can work on one machine while failing for a collaborator. Opening a received project may require explicit trust before its code runs; share the source and expected setup steps so the recipient can make that decision.

Components and game logic

Manual contents · Previous: Projects and templates · Next: Assets and rendering

Objects, entities, components and systems

A Blender object can become an entity in the exported game. Its components hold typed data, and systems act on entities with the components they need. For example, a pickup can have a points value, while a collection system detects the player, updates the score and removes the pickup from the running game.

Concept Example Where you edit it
Object A mesh named BonusPickup Blender
Component schema Collectible with a numeric points field src/components/collectible.ts
Component values points = 5 on this pickup Object Properties > Game
System The rule that collects nearby pickups src/systems/collect.ts
Runtime entity This pickup in the running game Through the engine API

GameStudio assigns stable entity IDs so references survive ordinary authoring changes. Prefer component queries and entity references over repeatedly finding objects by name in every frame.

Coordinates and units

Blender transforms use Z-up; runtime transforms and vector component fields use Y-up. For positions, the conversion is:

Blender (x, y, z)  ->  runtime (x, z, -y)
Blender (2, 3, 4)  ->  runtime (2, 4, -3)

An object's normal Blender Transform panel remains in Blender coordinates. A component's vector field, a ctx.spawn position or a TypeScript vector is in runtime coordinates. Distances use metres, time uses seconds and runtime angles use radians.

This distinction matters for a follow-camera offset, a gravity vector and a side-scroller's depth lock. A runtime vertical offset is [0, 2, 0]; a runtime depth lock is lockZ.

Built-in components

Component Purpose Typical placement
RigidBody Choose fixed, dynamic or kinematic physics Objects that participate in physics
Collider Collision or overlap shape Ground, obstacles, characters and triggers
CharacterController Built-in player movement A player with a kinematic body and capsule collider
FollowCamera Follow an entity with an offset The game camera
SideCamera Follow across a fixed screen plane Side-scroller or top-down camera
Spin Constant rotation Decorative objects and simple pickups
Animator Play clips or an animation graph A rig or animated object
Locomotion Pick gait clips from movement A character with suitable animation clips
AudioSource Attached or non-spatial sound playback An emitter or music object
ParticleEmitter Continuous or burst particles An effects object
PostEffects Bloom, vignette and grading settings Commonly the camera
NavMesh Configure walkable navigation One configuration object in a level
NavAgent Move along navigation paths An NPC with kinematic physics and a capsule collider

The Engine API lists every field, default and supported operation. Template components such as Collectible, Checkpoint or Car are project code, so their fields depend on the selected template.

Physics recipes

Object Setup Reason
Floor or wall Collider, with no RigidBody or a fixed RigidBody Remains stationary and blocks movement
Pushable crate Dynamic RigidBody and box or convex Collider Physics controls its motion
Player Kinematic RigidBody, capsule Collider, CharacterController Controller drives collision-aware movement
Trigger Collider with Sensor enabled Detects overlap without blocking
Moving platform Kinematic RigidBody and Collider, moved by a system Scripted motion can interact with dynamic objects

Dynamic bodies are owned by physics. Move them through impulses, forces or ctx.physics.teleport; changing their visual transform directly can be overwritten by the next simulation step. Kinematic objects follow their authored or scripted transforms.

Collider shapes are sized from geometry bounds and scale. A sphere encloses its bounds; a capsule is upright in runtime Y. A mesh collider is useful for stationary complex terrain; a dynamic mesh collider falls back to a convex hull. Keep a player's collision body simple even when its visual model is detailed.

To create an invisible collision proxy, put a Collider on a mesh and set Object Properties > Viewport Display > Display As to Wire or Bounds. The game uses the mesh for collision while omitting it from the visible scene. A sensor plus a system is a useful trigger; adding a sensor alone does not implement its gameplay reaction.

For a side-scroller, combine CharacterController.plane = side with a suitable camera and lock depth where required. For top-down movement, use plane = top. Axis locks are in runtime coordinates.

Create a custom component

The following complete example makes a Turntable component with configurable rotation. The engine already supplies Spin; this small example teaches how to create your own schema and system.

Create src/components/turntable.ts, or start with GameStudio > New Component and replace its generated schema:

import { defineComponent, field } from '@gamestudio/engine/schema';

export const Turntable = defineComponent('Turntable', {
  description: 'Rotates a decorative object around its local up axis.',
  category: 'Gameplay',
  fields: {
    speed: field.float(1, {
      min: -10,
      max: 10,
      description: 'Radians per second; negative reverses direction',
    }),
    active: field.bool(true),
  },
});

Component files are also evaluated by the registry builder in Node.js. Keep them limited to schema declarations and schema imports. Browser APIs, Three.js scene operations and game-side effects belong in system files.

Start the dev server or press Play, save the component, then use Game > Reload Components if the new entry has not appeared. Select a decorative mesh and add Turntable in Object Properties.

Add the system

Create src/systems/turntable.ts:

import { defineSystem } from '@gamestudio/engine';
import { Turntable } from '../components/turntable';

export default defineSystem({
  name: 'TurntableSystem',
  query: [Turntable],
  phase: 'update',

  update(ctx, entities) {
    for (const entity of entities) {
      const settings = entity.get(Turntable);
      if (settings.active) {
        entity.object3d.rotateY(settings.speed * ctx.dt);
      }
    }
  },
});

The supplied templates import files directly under src/components/, src/systems/ and src/shaders/ using eager glob imports in src/main.ts. If you place files in nested directories or change that bootstrap, adjust the imports accordingly.

Press Play. Changing Speed changes rotation, a negative value reverses it and disabling Active stops it. Multiplication by ctx.dt makes the value a rate per second rather than a rate per rendered frame. Test this on a decorative object without a dynamic physics body or another system that also rotates it.

System lifecycle

Hook or phase When it runs Suitable work
start(ctx) At system startup after a scene load/reset, and after hot reload Initialize run data or register UI handlers
onAdd(ctx, entity) When an entity starts matching the query Set up per-entity state
onRemove(ctx, entity) When an entity stops matching the query Release per-entity state; account for removed components
fixed Before fixed physics steps, normally at 60 Hz Physics-related game rules
update During each playing frame General gameplay, input and effects
late After update Camera follow and work that depends on final positions

Systems stop advancing while the game is stopped or paused. Menus can still draw and accept input. A query matches entities that have all the named components; omitting it creates a global system.

Module variables reset when a module hot-reloads. Store lasting gameplay state in components or ctx.store, and initialize it deliberately. start can run again, so avoid unintentionally adding duplicate listeners or resetting a score on every code save.

Runtime state and level changes

Use these APIs inside a system hook or a callback that receives ctx:

// Run state persists across level changes.
ctx.store.score = (ctx.store.score ?? 0) + 10;

// Persistent state survives page reloads in this game's browser storage.
ctx.save.set('bestScore', ctx.store.score);

// The destination must have been exported as a level.
await ctx.loadScene('cave');

The last line requires an async function. A transition can preserve named entities with a keep option, but decide which player and inventory state should transfer before using it. Restart clears the run store and reloads the start scene; it is different from loading another level.

Use ctx.after and ctx.every for game-time timers so they follow simulation pause. Use ctx.random for reproducible gameplay choices rather than Math.random when tests need the same sequence.

Animation and navigation

Author animation clips in Blender, export them and add Animator to the object carrying them. Select the clip, loop behavior, speed and fade. Locomotion can switch between appropriately named Idle, Walk, Run, Jump and Fall clips. For richer transitions, animation graphs are defined in TypeScript with defineAnimationGraph; see the animation section of the Engine API.

Navigation is built from solid fixed colliders when the level loads. Add NavMesh configuration, give each walking NPC a NavAgent with a kinematic RigidBody and capsule Collider, then drive destinations through the navigation API. A visible floor without a collider is not necessarily walkable navigation geometry. Test narrow passages against the configured agent radius.

Keep movement, animation and camera behavior coordinated: a respawn may need a physics teleport, the character's fall velocity reset and a camera cut. The Engine API provides characterMotion and snapCamera for that case.

Validate code changes

Run this inside the game project after dependencies are installed:

npm run typecheck

Then play the affected mechanic, inspect the Console and restart from the beginning. Type checking catches schema and API mistakes; only a playtest confirms the intended game behavior. Missing imports, misspelled component names and scripts placed outside the bootstrap's glob are common reasons for a component that appears to do nothing.

Assets and rendering

Manual contents · Previous: Components and game logic · Next: Menus, HUDs and audio

Author reusable art

Blender remains the source for meshes, UVs, materials, modifiers, rigs and clips. Start by blocking out the game at a consistent scale. Check it from the player's camera before adding detailed geometry: a beautiful prop that blocks a jump or hides the goal changes the game.

Use clear object names, separate visual detail from collision when appropriate, and keep texture and font files in the project. The game uses exported geometry and materials; it does not execute Blender's full node or simulation system in the browser.

Four rendered views of a crate with dimension lines, grid measurements and a reference figure

The render_views tool can produce front, side, top and isometric views with scale references. This is useful for checking proportions before putting a prop into a level.

Game Assets and libraries

Game Assets menu listing a barrel, boulder and oak with Place, Replace and library controls

The Game Assets popover exposes reusable project assets. The displayed props were created for the demonstration.

  1. Select the objects that form a reusable prop.
  2. Open Game Assets > Add Selected to Library.
  3. Save the asset into an appropriate project library, such as assets/props.blend.
  4. Use Place to insert it into a level, or Replace to swap a selected instance.
  5. Use Reload Libraries after changing a source library.

Linked instances are useful when many copies should share a single source. Use Make Instance Local only when you want a copy to diverge from that source. A local copy no longer receives the same library updates.

Library writes affect a separate file. GameStudio backs them up, and the asset-library restore workflow is separate from ordinary scene undo. Save the level as well as the source asset when a change affects both.

Runtime prefabs

A prefab is a collection exported for instantiation during play. Mark its collection with the gs_prefab custom property enabled in Collection Properties, or use the provided export/asset tools. The engine preserves hierarchy, components, clips and applicable physics in spawned instances.

For a collection exported as Crate, a system can create an instance with:

const crate = ctx.spawn('Crate', {
  position: [2, 1, -4],
  rotation: [0, Math.PI / 2, 0],
});

This snippet belongs inside a system hook or callback with ctx. Confirm the collection is exported before spawning it; ctx.prefabs lists available prefab names. An unknown name produces an error rather than an invisible placeholder.

Each instance gets its own entity identities and internal references. A prefab with several top-level objects gets a grouping root. Use descendants and marker components to find sockets inside an instance rather than searching globally for a repeated object name. The Endless Runner template demonstrates this for track chunks and attached objects.

Parametric kits

The agent tools offer parameterized kits for rocks, crates, barrels, trees, bushes, terrain, buildings, water, collectibles, characters and several multi-part assemblies. They provide a consistent starting point and remain editable in Blender.

Ask for scale and function along with appearance. For example: "Create a low-poly wooden crate one metre wide, suitable for stacking, and show it beside the player for scale." A useful asset review checks proportions, collision needs, material count and how the asset looks at normal gameplay distance.

Kits are different from procedural world builders. A kit makes an object or assembly; a procedural builder can distribute many objects or generate a road, river or building arrangement.

Procedural worldbuilding

GameStudio's geometry-nodes workflows cover scatter, roads, fences, rivers, cliffs, buildings and placement along curves. Keep path widths, slope and keep-out areas tied to gameplay requirements. Reusing meshes through instances can reduce rendering cost compared with many unique copies.

Procedural valley drawn by the game runtime with a village, river, road, bridge and forest

A procedural valley drawn by the game runtime. Compare silhouettes, material boundaries and lighting from similar viewpoints when evaluating export fidelity against your Blender scene.

Supported geometry-nodes scatters export as GPU instances. That can reduce draw calls, but the scene still has geometry, materials, shadows and collision to process. Use measured game statistics to decide whether a change helps performance.

Materials and the export boundary

Give materials a sensible Blender appearance for authoring. Supported glTF material properties travel to the game, while procedural materials can be baked to textures during export. Check export warnings for unsupported or incomplete inputs.

A static material bake and a game shader solve different problems. A baked texture captures a look; a game shader creates runtime behavior such as moving water, wind or a dissolve effect. Inspect the final result in Scene view or during play.

Assign a game shader

  1. Select the object and the intended material slot.
  2. Open Properties > Material > Game.
  3. Choose a Game Shader from the project or built-in library.
  4. Adjust its fields.
  5. Enable the game-rendered Scene view or press Play.
Example Screenshot Use
Water Water shader on a plane with animated-looking ripples and highlights Ponds and water surfaces
FoliageSway Foliage shader preview on a stylized tree Wind motion on suitable foliage geometry
Dissolve Dissolve shader preview with glowing edges around a disappearing object Disappearing objects and effects driven by game state

These are still captures of runtime shader previews. Animated effects need to be evaluated in the running game.

The shipped library contains 33 shaders grouped into Water, Nature, Magic & Sci-fi, Surfaces, Transformations, Gameplay and Style. Examples include shoreline foam, lava, snow, moss, holograms, shields, triplanar surfaces, car paint, outlines, toon shading, Shine and Gradient.

Most effects build on the material's existing color and textures; some supply a more complete surface appearance. Geometry matters: a wind shader needs geometry it can move, and a flag needs subdivisions. Patch-based library shaders use the default WebGL renderer. Check the shader library reference before switching renderer or relying on a costly effect across a large scene.

Game code can change shader fields through ctx.shaders. Keep visual effects driven by gameplay in systems, and keep material assignment in Blender. Custom shaders under src/shaders/ can hot-reload while the game runs.

Color management

The game exports the scene's view transform and exposure. The templates use Khronos PBR Neutral with no look. AgX and Standard also have runtime mappings; some Blender transforms use a fallback and export warns when a look cannot be reproduced.

Compare the same camera, exposure and lighting before trying to fix a mismatch with arbitrary material changes. Blender's solid viewport is not a reliable preview of game shaders or post effects. UI canvases use Standard and their own color rules, while 3D models inside a UI screen are lit and tone mapped like 3D content.

Bake lighting

Use lightmaps for static environments that benefit from soft indirect light, occlusion and bounce. An outdoor scene with simple sunlight may not need a bake.

  1. Settle the static geometry and main lighting.
  2. Open Properties > Scene > Game Project > Lighting.
  3. Choose Bake Preview while iterating.
  4. Inspect the game render and any reported skips or stale lightmaps.
  5. Choose Bake Final when the layout is ready.
  6. Re-export and test before building the game.

The Blender UI launches the bake from a saved copy in a background process. Generated lightmaps live under .gamestudio/, so they can be regenerated and are not part of the editable .blend source.

Moving bodies, animated objects and prefab instances do not receive static lightmaps. If your own system moves an otherwise static mesh, set its custom property gs_lightmap to False so the bake does not leave lighting attached to an obsolete position. Re-bake after moving static geometry or changing lights and the world.

Sun, point and spot lamps remain realtime by default; area lamps are baked. A lamp explicitly marked gs_lightmap = "baked" does not provide realtime direct light for a moving player. Check character lighting as well as the walls. The default WebGL path provides the intended lightmap combination; the Engine API documents WebGPU limitations.

Menus, HUDs and audio

Manual contents · Previous: Assets and rendering · Next: Working with coding agents

Screens are Blender scenes

Game UI lives in ui/ui.blend, with one Blender scene per screen, also called a canvas. Typical names are Title, HUD, Pause, Options and Win. A canvas contains text, art, controls and optional 3D models; the runtime draws it over the game.

Choose GameStudio > Edit Game UI. If the file does not exist, GameStudio creates a UI file with a menu canvas. Save the current level when prompted. Switch canvases with Blender's scene selector, and use GameStudio > Back to Level when you finish.

The template gameplay captures in Projects and templates show the resulting HUDs: counters, health, score, time and distance. Their editable source is the corresponding template's ui/ui.blend.

Canvas settings

Open Properties > Scene > Game UI Screen. This panel provides the design size, Frame Canvas, Show in Game and the camera's UiCanvas fields.

Setting Meaning Example
kind Menu or HUD A pause screen is menu; score is hud
open When the canvas opens manual, start or firstStart
pause Whether a menu pauses gameplay Enabled for an options menu
pauseMenu Designate the game's pause menu Enabled on Pause
back Back/Escape behavior Close, resume or return to the previous menu

New canvases use a 1920 × 1080 design size, an orthographic camera looking down at an XY layout and a scale of 100 design pixels per Blender unit. Higher Z values draw on top. Keep the generated canvas camera setup unless you understand the export requirements; a perspective or rotated canvas camera is not a substitute for a UI model view.

Menus take navigation focus and can pause the simulation. HUDs can stay visible while gameplay continues. Avoid configuring a score HUD as a pausing menu.

Add and position elements

In a UI file, use Shift+A > Game UI to add Text, Image, 3D Model, Panel, Button, Bar, Slider, Toggle or Group.

  1. Add an element and give it a descriptive name.
  2. Select it and open Properties > Object > Game > Layout.
  3. Set its design-pixel position and, where available, width and height.
  4. Parent related pieces to a group when they should move together.
  5. Add or adjust UiAnchor on top-level elements when you need explicit anchoring or stretch.

Design-pixel coordinates start at the top-left, with Y increasing downward. The Layout controls handle conversion into Blender's scene. Anchors keep an element's distance from an edge or the center as the viewport changes shape. Children follow their parent rather than taking independent top-level anchors.

Test at more than one aspect ratio. A centered title, corner score and full-screen background have different layout requirements. UiSlice supports nine-slice panels whose borders keep their appearance while the center stretches.

Edit text and fonts

Text objects use their text body, font and material color. Choose Font copies the font into assets/fonts/, and importing UI images copies external art into assets/ui/. This makes the project easier to move between computers.

UiText adds outline, shadow and fit settings. Fit needs a meaningful text box to shrink into. Use a font with glyph coverage for every language you plan to show, and test the longest translated label in the actual game.

Bind a score or timer

Text can include live values in braces. In a game whose systems update ctx.store.score, set a text body to:

Score {score}
Text or value path Reads
{score} The score value in the run store
{save.best} A persistent best value
{game.time:m:ss} Simulated time formatted as minutes and seconds
audio.music Music channel volume when used as a control's value path

Braces belong in text bindings. A slider, bar or visibility component uses a plain value path such as health or audio.music, without braces.

For a health bar, set UiBar's value path, maximum and fill element. For a row of hearts, use UiShow rules: the second heart can show while lives is at least 2. Your game still needs to set those run values; a label does not create a scoring or damage system.

Configure buttons

Use the UiButton fields on a button element. Built-in actions cover common navigation such as closing a menu, resuming, restarting or opening another canvas. The target field supplies the destination where the selected action requires one.

For a custom event, set the action to event, set its target to a name such as buy, and register a handler in a system's start hook. Validate the game's conditions inside that handler before spending currency or changing state.

Use descriptive labels and visible focus states. Test mouse, keyboard and gamepad navigation rather than relying only on pointer clicks. Back navigation should return to the expected previous menu without leaving gameplay unexpectedly paused.

Options controls

A newly added Slider controls audio.music. Use its UiSlider fields to set the value path, range, step, fill and optional handle. Set another slider to audio.sfx for sound effects. The runtime writes these channel values and keeps player settings.

A Toggle needs a value path and references to its on/off artwork. It can write a persistent setting such as save.showHints; a system or UI visibility rule must then use that setting to affect the game.

Controls remain interactive under a paused menu. Music can continue while the menu is open so the player hears a volume change immediately.

Preview and animated screens

Look through the canvas camera with Numpad 0, then enable the 3D View's Game toggle for a runtime preview. This displays fonts, bindings, nine-slice art, UI shaders and model views as the game draws them. Show in Game helps inspect the screen in the running game.

Screens can have open, close and loop animation segments authored with Blender timeline markers and supported element keyframes. Their detailed marker, timing and property rules are in Game UI. Start from the template transitions before building a complex sequence, and check that controls become available when the transition finishes.

UiModel displays its child objects as a lit 3D view inside the canvas, useful for a turning collectible or a character. Those children are 3D content rather than flattened UI elements. Shine and Gradient can decorate UI panels; ordinary world shaders are not all suitable for flat UI art.

Translations

Set the authored language with locale in gamestudio.json; it defaults to en. Additional languages are JSON tables under ui/locales/. The keys are the authored text bodies, including their bindings.

For example, ui/locales/fr.json can contain:

{
  "Play": "Jouer",
  "Score {score}": "Score {score}",
  "Options": "Options"
}

Preserve {score} and other binding tokens in the translated value. A text without a translation falls back to the authored text. If you change the authored wording, update the translation key too.

The runtime selects a saved language choice, otherwise a matching browser language, otherwise the authored language. A button with the locale action can cycle available languages or select a target language. Its label can use {ui.localeName}.

Translations are files rather than a dedicated Blender translation panel. Agents can use ui_strings and ui_translate to inspect and update them. Check wrapping, focus labels and glyph coverage after switching languages.

Sound and music

Use AudioSource for a sound attached to an entity. Choose a project-relative clip, volume, looping, spatial behavior and an appropriate channel. A non-spatial music source plays at a consistent level; a spatial source changes with the listener's distance.

Game systems can also call ctx.audio for one-shot effects. The templates show pickup, win and action sounds. Keep sound assets in the project and review their redistribution terms before including them in a published game.

Browsers commonly require player interaction before audio starts. Test from the title screen with a real click or key press before diagnosing silent autoplay as a missing file. Sound effects pause with gameplay, while music can continue under menus; UI sounds have their own channel.

Check a complete interface

Start at the title, enter play, pause, change a setting, return, win or lose, and restart. Confirm the HUD updates and the correct menu has input focus. Repeat at a narrow aspect ratio and in another language. Save ui/ui.blend and use Export All before the release build so the shipped screens match what you edited.

Working with coding agents

Manual contents · Previous: Menus, HUDs and audio · Next: Testing and web builds

What an agent does in GameStudio

Any coding agent that supports MCP can inspect the open Blender scene, create and change assets through GameStudio's MCP tools, edit project code, run the game and inspect screenshots or state. Claude Code and Codex have one-click setup in the GameStudio menu; other MCP clients connect to the same server by hand. You can continue to edit manually and use the same project files.

The agent bridge connects Blender to the project's MCP server. The MCP server also talks to the dev server and automated game browser. A connected bridge, a running dev server and a working browser are separate parts of the workflow; a failure in one does not necessarily mean the whole installation failed.

Agent-created tree, barrel and rock in the demo scene with a connected Claude indicator

An agent session can create ordinary Blender objects that you can inspect and edit. The indicator identifies the connected client; the scene remains your editable project.

Connect from the project

These steps use the one-click setup for Claude Code, the default, or Codex:

  1. Open the intended game project's level in Blender.
  2. Choose GameStudio > Open in Claude Code or GameStudio > Open in Codex.
  3. Follow the install prompt if the chosen agent is absent, and complete that agent's sign-in or project-trust flow when requested.
  4. Let GameStudio prepare missing project integration files and enable the bridge.
  5. Ask the agent to inspect the project and summarize the open scene before making changes.

The Coding agent preference (Claude Code unless you change it) chooses the default launcher and top-bar action. You can also start an already installed agent in the project folder yourself. GameStudio supplies .mcp.json for Claude Code and .codex/config.toml for Codex. Any other MCP client can start the same server over stdio from the project folder. See MCP setup for the exact project configuration and the command for other agents.

No authentication details are needed in a game brief or screenshot. Use the coding tool's own sign-in flow. Keep credentials out of project instructions, source code and shared diagnostics.

Instructions and reusable skills

New projects contain AGENTS.md for project conventions, shared by every agent: Codex reads it, CLAUDE.md imports it for Claude Code, and you can give it to any other agent as its instructions. Workflow skills live under .claude/skills/, with copies under .agents/skills/ for Codex; point other agents at .claude/skills/.

Workflow Useful request
New game from a brief Turn a small game idea into a playable first loop
Block out a level Establish player scale, route, obstacles and goal
Make a prop Create and inspect one reusable asset
Procedural world Build repeatable roads, scatter, rivers or structures
Add a mechanic Implement and test one gameplay rule
Animate a character Connect clips to movement or state
Playtest and fix Reproduce a problem, inspect it and verify a change
Stylize a scene Apply a consistent visual direction
Design UI Create menus and HUDs in the UI Blender file
Prepare for web Review performance and build readiness
Make a template Turn a reusable project into a New Project starting point

Keep instructions specific to the game: conventions, controls, goals, budgets and invariants. Avoid adding private account details, personal folders or access tokens. Edited custom skills are preserved by the project's skill-update mechanism; see Project templates for its exact rules.

Write an actionable brief

A good brief supplies an objective and observable results. For example:

Make a small third-person collection game on a garden island. The player must collect five gems, then reach a visible gate. Use the existing movement controls, keep every gem reachable without a precision jump, and show progress in the HUD. Build a simple blockout first. Playtest collection, the locked gate, victory and restart, and show screenshots from the player's camera.

For a targeted edit:

The player gets stuck on the first step beside the bridge. Inspect the player's collider and the step geometry. Reproduce the problem from a fresh start, make the smallest useful change and repeat the same movement test. Preserve the route and visual style.

State what should remain stable when that matters. Ask for evidence such as a screenshot, a game-state value or a repeated input sequence. "Make it work" does not identify what success means.

Use an inspect, change and test loop

  1. Inspect: summarize the scene, relevant components and current behavior.
  2. Plan a small change: define its scope and an observable outcome.
  3. Change source: edit Blender content, TypeScript or both.
  4. Look: inspect a render or runtime screenshot from a useful camera.
  5. Play: exercise the mechanic and check state, logs and controls.
  6. Review: keep the result, refine it or restore the previous state.

scene_twin gives a compact description, render_views checks asset proportions, and game_screenshot can inspect the game's renderer. A still image checks appearance; it does not establish that jumping, collision or victory works. Use playtests for those behaviors.

When you edit manually during a session, tell the agent what changed and ask it to re-inspect. This avoids reasoning from an older snapshot of the scene.

Inspect actions and recover

Agent popover showing Pause, Protect, recent actions, Select and Frame, Undo to Here and Open Activity Log

The Agent popover exposes the recent tool history and scene controls. The displayed operations built the demonstration props.

Click the agent button in the top bar. Use Select & Frame to locate an affected object, Undo to Here to move back through supported scene edits, and Open Activity Log for more detail. Pause suspends agent bridge activity; Protect marks selected objects that scene tools must not change.

Scene tools group changes into Blender undo steps. A checkpoint can preserve a useful scene milestone. Asset-library writes use backups because they modify another file. TypeScript changes are ordinary file changes: use version-control diffs and commits for a reliable code history.

These mechanisms cover different data. Undoing a Blender action is not a rollback of every file an external coding tool edited. Checkpoints and object protection are not a sandbox for arbitrary external code. Keep an ordinary project backup alongside the scene-level recovery tools.

Trust and tool permissions

GameStudio asks for trust before running code from an untrusted project. A request from an agent does not silently grant that trust. The bridge listens on loopback and uses a per-session token; its discovery files under .gamestudio/ are local connection data and should not be shared.

The project's agent permission configuration and the host coding tool determine approval behavior. Inspect those settings when changing which tools run automatically. run_python is full Blender Python execution, and deleting objects, opening another scene or restoring a checkpoint can replace work. Consider the concrete change when reviewing a request.

You can disable Agent bridge (MCP) in GameStudio preferences when you are not using the connection. The normal manual authoring workflow does not require an active agent.

The separate built-in assistant

GameStudio also has an optional assistant inside Blender. It is disabled by default and is distinct from the external coding-agent workflow above. It reads context and proposes edits for you to preview, apply or reject. Its Ask mode is read-only; proposal mode stages changes. It uses Claude through the Anthropic API by default, or any OpenAI-compatible server, including one on your computer such as Ollama or LM Studio.

The AI assistant guide explains configuration and proposal recovery. If using a provider key, prefer the documented environment-variable route to putting it in shared files. A key entered in Blender preferences is stored in that preferences file, so never include it in a screenshot or project attachment.

Useful review prompts

Use the MCP reference for exact tool names and parameters rather than inventing an interface in a prompt.

Testing and web builds

Manual contents · Previous: Working with coding agents · Next: Troubleshooting and reference

Test the whole game loop

A successful export confirms that files were produced. A useful playtest checks that a player can complete the intended loop. Test from a fresh start as well as from the middle of an editing session.

Area Check
Entry Title screen loads, Start works and input reaches the game
Movement Ground collision, slopes, jumps, obstacles and camera behavior
Objective Progress changes correctly and every required target is reachable
Failure Damage, falling, game over and recovery behave as intended
Completion Victory occurs once, at the right time
Pause Simulation stops while menu navigation remains available
Restart Objects and run state reset consistently
Levels Every destination loads with the intended player and state
UI Text fits, focus is visible and settings persist when intended
Audio Playback starts after interaction and volume controls affect the right channels
Browser The built game works at the intended resolution and on target hardware

Write down a short input sequence for a regression test. For example: start, collect the first pickup, pause, resume, collect the rest, win and restart. Repeat the same sequence after changing the relevant code.

Automated playtests

The MCP workflow can run input sequences in a controlled browser and return screenshots, state and logs. The engine also exposes a testing API for deterministic stepping. Use a fixed seed and explicit test setup for comparisons that need to reproduce.

A useful test asserts a state change as well as looking at a screenshot: score increased, health fell, a menu opened or a level changed. Tests use isolated saved state rather than changing the player's normal browser save. See MCP tools and the testing section of the Engine API for exact commands.

A headless browser is useful for repeatability, while a manual run remains necessary for the feel of movement, readable text, focus and audio. Do both before sharing a game widely.

Measure performance

Use game_stats through the agent workflow to inspect frame time, draw calls and triangles. Measure from a representative camera and a busy section of the game. A nearly empty title screen is not a representative benchmark for an enemy wave or a dense forest.

Symptom Inspect first Possible improvement
Many draw calls Unique meshes and materials Reuse materials and instances where appropriate
Heavy GPU load Shadow coverage, particles, expensive shaders, resolution Reduce the dominant visible cost and compare again
Slow load Texture sizes, unused assets, large scene files Reduce asset sizes and use supported compression
Physics slowdown Complex dynamic collision and many active bodies Use simpler colliders and fewer active simulations
Editor preview feels heavy Scene view frame rate and geometry re-export frequency Lower preview rate or temporarily disable live geometry reload

Change one meaningful variable at a time and repeat the same view or test. The best tradeoff is the one that preserves the game's visual and interaction requirements on its target devices.

Prepare source and exports

  1. Save every changed level, asset library and ui/ui.blend.
  2. Confirm gamestudio.json names the intended start scene.
  3. Export all levels and UI from Game Project > Levels > Export All.
  4. Re-bake any lighting that became stale after scene changes.
  5. Review export warnings and resolve missing assets or unsupported assumptions.
  6. Run the game's type check and its important playtests.

Generated exports can be stale even when a development game still appears to work from an earlier export. Building after a fresh Export All reduces that mismatch. A new clone may also need regenerated lightmaps because those files are not authored source.

Build from Blender or the terminal

In Blender, expand Properties > Scene > Game Project > Build and choose Build Web. Inspect the log if it fails and use the output-folder control when it finishes.

For an existing game project with dependencies set up, the terminal equivalent is:

npm run typecheck
npm run build

Run these commands in the game project's folder. The repository root has separate commands for developing the add-on. The project's build writes a static site to dist/, including game code, exported scenes, UI and required assets.

Test the built output locally

With Python available, run this from the game project's root:

python -m http.server 8080 --bind 127.0.0.1 --directory dist

Open http://127.0.0.1:8080 in a browser, play the complete loop, then stop the temporary server with Ctrl+C. On a system whose Python command is python3, use that command instead.

This serves the build that will be uploaded. It does not run Vite or rebuild source. Rebuild after changing source or exports. Opening dist/index.html directly as a local file is not an equivalent test because browser asset-loading behavior differs from HTTP.

Compression

Production builds compress copied scene geometry with meshopt by default. Development exports remain ordinary GLB files, keeping iteration straightforward. The engine decodes the compressed assets when the game loads.

WebP textures are an optional project setting. Merge this field into gamestudio.json, preserving the rest of the configuration:

{
  "compression": {
    "textures": "webp"
  }
}

Texture conversion happens during export, so export again after changing the setting. Color maps use the configured WebP quality, while data textures use lossless conversion. Check the visual result on representative materials and measure the actual build size.

Compression does not remove the need to choose sensible texture sizes, geometry density and asset counts. It reduces transfer size rather than making every expensive scene cheap to render.

Publish the static game

Upload the contents of the tested dist/ folder to a static host, preserving its relative file structure. Use the host's normal HTTPS setup and test the deployed URL from a fresh browser session. If deploying below a subpath, verify the project's Vite base configuration and test that actual subpath so assets do not resolve against the wrong location.

The shipped game does not need the Blender authoring application or the development MCP bridge. Do not upload the whole project as the playable build: .gamestudio/ can contain logs and local connection data, while source folders may contain material intended only for development.

Keep the generated THIRD-PARTY-NOTICES.md with the build. For the repository's license breakdown and template asset terms, consult LICENSE.md and the generated notices. Review separately any assets you added yourself.

Release notes and support evidence

Record the extension version, project revision and tested browser alongside the release. Summarize changes in terms a player can observe, such as a corrected collision or a new level.

For a bug report, supply reproduction steps, expected and actual behavior, a relevant screenshot and the smallest useful log excerpt. Use a neutral test project where possible. Remove personal names, account data, home-directory paths, tokens and unrelated terminal history before sharing the report.

Contributing to the add-on

The following commands are for the GameStudio repository, not a generated game:

Purpose Command
Install development dependencies npm install
Blender suites python tools/test_blender.py
Runtime and service tests npm test
Type checking npm run typecheck
Browser smoke checks npm run smoke
Runtime feature checks npm run features
Extension archive python tools/build_extension.py

The repository README describes environment setup and platform prerequisites. Run checks appropriate to the code you changed; a historical test count in an existing document is not a result for a new revision.

Troubleshooting and reference

Manual contents · Previous: Testing and web builds

Diagnose in a useful order

Identify which layer is failing: extension loading, project recognition, runtime setup, dev server, export, browser, game logic or agent connection. Read the first relevant message, make one targeted change and repeat the same action. This is more informative than reinstalling every dependency at once.

Setup and project problems

Symptom Likely cause or first check Action
No GameStudio menu Extension disabled, wrong archive or incompatible Blender version Verify Blender meets the manifest minimum and enable the built extension ZIP
No Game workspace Older file predates the workspace Choose GameStudio > Add Game Workspace
No recognized game project Open file is unsaved or outside a folder with gamestudio.json in its ancestry Open the project through GameStudio and save the level inside it
First-run setup asks to download files Required runtime packages or browser are absent Read the dialog, choose Set Up, then wait for completion
Setup fails during a download Connectivity, proxy, permissions or package-service failure Use Show Log, resolve the stated issue and Retry
New Project setup was interrupted Folder exists but setup did not finish Open its project folder again or create with the same name to resume setup
Newly created project does not replace the current file Unsaved work is awaiting a decision Use the pending Open action in the GameStudio menu and choose how to handle that file
Project scripts are refused The received project is untrusted Inspect the source and use Trust This Project if you choose to execute it
Project uses old runtime packages It has not refreshed after an extension update Reopen or play it, allow setup to refresh managed packages and inspect the setup log
macOS refuses access to Documents Blender lacks folder access Allow the relevant folder access in system privacy settings or choose another writable project location

Do not delete the project to fix a dependency problem. Its source files and generated package state serve different purposes.

Play and preview problems

Symptom Check Action
F5 appears to do nothing Function-key mode and status bar Try Fn+F5, use Game > Play and inspect setup/dev-server status
Play opens a browser window Display set to Window, or embedded browser unavailable Select Embedded or complete the offered game-browser setup
Player does not move Game has input, title menu closed, simulation playing Click the game, use Start/Resume and inspect CharacterController setup
Mouse and keys remain captured Embedded game owns input Press Shift+Esc
Editing view is replaced by the game Embedded display is active Use Scene in the area's Scene/Game selector or stop with F8
Pause and Stop controls unavailable No running game is connected Start the game and inspect the connection status
Scene view is slow Preview rate or expensive scene Lower Scene view frame rate and inspect rendering cost
Changes do not appear live Live Link off, wrong level, or live geometry reload off Enable the relevant setting, open the active level, export and restart if needed
An old scene appears after restart Source or export not updated Save the intended level, export it and verify the start-scene configuration

Stopping gameplay does not necessarily close the background browser or dev server. Use Stop Dev Server when you need to end that service, and use the idle-browser preference to control retention between play sessions.

Components and physics problems

Symptom Check Action
New component missing from Add Component File saved, registry built, schema valid Start the dev server and use Game > Reload Components; inspect schema errors
Component exists but does nothing Matching system imported and game playing Check src/main.ts, query names and Console errors
Custom component crashes registry generation Browser logic placed in a schema file Keep schema files limited to schema imports and declarations
Player falls through the ground Ground Collider and player physics setup Add a solid floor collider; use kinematic body and capsule collider for the built-in controller
Dynamic object ignores scripted transform Physics owns its position Use an impulse, force or physics teleport
Trigger blocks movement Collider Sensor is off Enable Sensor and implement the overlap reaction
Ground contact does not trigger an event Controller keeps a small skin gap Use a sensor or distance check for the intended gameplay trigger
Side-scroller drifts in depth Plane mode or axis lock uses the wrong coordinate Use runtime Y-up conventions; depth is runtime Z
Camera follows the wrong object Target reference or duplicate player setup Select the intended entity in the camera's component and restart
Animation does not play Missing clip, wrong owner, playback settings or pause Verify exported clip names and Animator on the object carrying the clips
Navigation ignores a floor Walkable geometry lacks a solid fixed collider Add appropriate collision and inspect navigation configuration

When debugging collision, simplify the visual model and collider relationship before adjusting many movement values. Check geometry size, scale, body type and sensor state separately.

Rendering and UI problems

Symptom Check Action
Game looks different from Solid view Different renderers and shading modes Compare Scene view or a game screenshot against an appropriate Blender render
Game shader appears static in Blender Blender's material preview does not run the shader Enable Scene view; check its Animate game shaders preference
Shader effect missing in game Shader defined, material assignment, renderer support Read the Console, verify the shader name and use the supported renderer
Light or shadow stays in an old location Stale static lightmap Re-bake after geometry, light or world changes
Moving object has baked lighting artifacts Custom movement was not excluded from the bake Set gs_lightmap to False for that object, then re-bake
UI screen absent Correct UI file, exported canvas, open rule Save the UI file, export all and check UiCanvas settings or the open call
Game unexpectedly paused A menu intentionally owns pause Close/resume the menu; ensure the HUD is configured as hud
Text shows no useful score Game never sets the bound value Initialize and update ctx.store.score, preserving {score} in text
UI layout changes badly with aspect ratio Anchor, stretch or text box unsuitable Adjust top-level anchors and test several window shapes
Translation is ignored Key does not exactly match authored text Update the JSON key, preserve binding tokens and check selected locale
Font looks wrong or misses glyphs Font asset or language coverage Use Choose Font to copy it into the project and inspect the runtime result
On Blender 5.3, Scene view, the game inside Blender or Blender's own viewport draws wrongly or not at all Blender 5.3 draws with Vulkan by default on Windows and Linux; 5.2 used OpenGL Update the graphics driver. If that does not help, set Edit > Preferences > System > Display Graphics > Backend to OpenGL and restart Blender, then report the problem with your graphics card and driver version
Sound is silent at page load Browser interaction not yet granted, muted channel or missing clip Click Start, check volume settings, path and Console

Agent and build problems

Symptom Check Action
Agent cannot find Blender Intended project open, bridge enabled, correct integration files Reopen through GameStudio's agent launcher, or restart another MCP client in the project folder, and ask for a scene inspection
Agent can read but edits fail Paused bridge, protected object or tool permissions Inspect the Agent panel and the concrete permission response
Playtests fail while manual editing works Dev server or automated browser setup Inspect their logs and finish game-browser setup
Build fails on TypeScript Type or import error Run the project's typecheck and fix the first relevant diagnostic
Build reports missing or stale levels Export incomplete Save and Export All, then rebuild
Built game fails when opened from disk Browser file-loading restrictions Serve dist/ over HTTP and test the served URL
Deployed game cannot load assets Missing files, wrong relative layout or deployment base Compare upload contents with dist/ and test the real deployment subpath
Build behaves differently from development Stale export, state or production-only path Test the rebuilt dist/ from a fresh browser session and inspect its Console

Preferences

Open GameStudio > Preferences. These are the main user-facing controls; defaults below refer to the documented 0.1.2 implementation.

Preference Default or behavior When to change it
Show launcher at startup Off You prefer choosing a game through the launcher each session
Game tab in the 3D View sidebar Off You want the older sidebar interface
Game display Embedded You prefer a separate game window
Close idle game after 15 minutes; 0 keeps it until a project change Balance fast restart against background resource use
Set up automatically Off You want needed runtime downloads to start without the setup question
npm command npm A custom environment needs another command
Open game window on Play On Control automatic opening for Window/fallback display
Use app-style window On Choose between a supported browser's app window and ordinary browser display
Live geometry reload On Large geometry edits cause expensive repeated exports
Scene view frame rate 30; range 5–60 Balance preview responsiveness and resource use
Animate game shaders in the Scene view On Freeze animated surfaces while inspecting them
Code editor Automatic selection Choose an editor or a custom launch command
Coding agent Claude Code; the other choice is Codex Change which agent the launcher, welcome and top bar open; the GameStudio menu keeps both Open in commands
Agent bridge (MCP) Enables the local agent connection Connect or disconnect external agent tools
Enable AI assistant Off Use the separate proposal-based assistant inside Blender
Play Shortcuts F5, F6, F7, F8 Resolve keyboard conflicts or accessibility needs

A custom code-editor command can use {file}, {line}, {column} and {project} placeholders. Quote paths when needed. Keep machine-specific commands in local preferences rather than copying them into shared project documentation.

Shortcut card

Shortcut Action
F5 Play
F6 Pause/resume
F7 Step
F8 Stop
Shift+Esc Release embedded game input
Shift+A > Game UI Add a UI element while editing a UI file
Numpad 0 Look through the active Blender camera, useful for UI preview
Ctrl+Z Undo a Blender edit on platforms/keymaps using that binding

Use Fn with function keys when your keyboard requires it. The extension's play keys can be rebound. Blender's normal navigation, transform and saving shortcuts follow your selected Blender keymap.

Glossary

Term Meaning
Asset library A Blender file containing reusable objects or collections
Canvas A UI screen authored as a Blender scene in a UI file
Component Typed data attached to an entity
Dev server Local service that runs the game and rebuilds development code
Entity Runtime handle for an exported or spawned object
Export Generated geometry and scene/UI data consumed by the runtime
Game view A running game, with simulation, input and the game's camera
Hot reload Updating code or supported data while a development game stays open
Lightmap Baked lighting texture for static geometry
Live Link Connection that carries supported Blender edits to a running game
MCP Tool protocol used by coding agents to work with GameStudio
Navmesh A representation of walkable areas used for pathfinding
Prefab A reusable collection that can be instantiated during play
Registry Generated component and shader definitions used by the editor
Scene twin Readable generated description of a Blender level
Scene view The game renderer applied to an editing viewport without playing
System Code that runs game behavior on matching entities or global state
Template Starting project copied by New Project

Collect useful diagnostics without personal data

Record the GameStudio and Blender versions, operating-system family, selected template or a neutral reproduction project, exact steps, expected result and observed result. Include the first relevant error and whether it occurs in development, a local build or deployment.

Review screenshots before sharing them: window titles, recent-project lists, preferences, file pickers and terminal output can reveal more than the game itself. Inspect image metadata as well as visible pixels. Share project-relative paths and short relevant log excerpts rather than raw session files. Never attach .gamestudio/blender.json, session tokens, API keys or authentication configuration as a debugging shortcut.

For deeper investigation, use the Engine API, MCP reference, Game UI reference and Architecture.