Skip to content

Projects and scenes

A project is the whole game. A scene is one screen, level, menu, room, or test area inside that game. Most editor work is scene-local, but the project decides which scenes exist, which scene starts first, and which shared systems are available everywhere.

Project contents

An Opal project stores:

PartPurpose
Scene listOrdered scenes that make up the game
Start sceneThe scene loaded first in Play mode and exported builds
GameState variablesGlobal typed values (number / bool / text) such as score, lives, quest text
Project componentsCustom components authored in the Components workspace
ScriptsProject JavaScript helpers / behavior scripts
Asset libraryShared images, audio, prefabs, characters, .ssb bundles
Art Canvas graphPersisted Art workspace board (artGraph)
Sound Canvas graphPersisted Sound workspace board (soundGraph)
Publishing metadataArcade slug / remix settings on the hosted portal

Projects are selected from the Project picker in the top bar. Use separate projects for separate games, not for separate levels of the same game.

Scene contents

Each scene stores:

PartExamples
Object hierarchySprites, groups, UI roots, spawners, cameras
Inspector dataNames, transforms, visibility, interaction flags, object variables
ComponentsHealth, Collider 2D, Rigid Body 2D, Inventory, custom components
Object FlowPer-object rules such as On Tap or On Collision
Scene FlowScene-wide rules such as On Scene Start or Go To Scene
Animation dataMotion clips, skeleton references, state machines
Runtime settingsBackground, camera, physics options, scene music (scene.audio)
UI documentIn-game HUD / menu tree for that scene

Think of a scene as a self-contained playable composition. Objects in the scene can reference shared project assets, but the scene owns their placement, settings, components, and graph rules.

Creating scenes

Open the Scene picker in the top bar.

ActionUse when
New sceneYou need a blank level, menu, or screen
Duplicate sceneYou want a variant of an existing level
RenameThe scene name should describe its role clearly
ReorderThe project scene list should match the game flow
DeleteThe scene is no longer needed

Use names that remain clear in graphs: Main Menu, Level 1, Battle Test, Credits, Win Screen.

Choosing a start scene

The start scene is the entry point for:

  • Play mode
  • Fullscreen play
  • Exported game bundles
  • Static player builds

Set the start scene from the project or scene controls. For most games, the start scene should be a menu or boot scene that initializes GameState and routes the player to the correct level.

Scene transitions

Scene transitions are usually handled in Scene Flow:

  1. Open the Scene Flow workspace.
  2. Add an event such as On Scene Start, On Custom Event, or a win condition.
  3. Wire it to a Go To Scene action.
  4. Select the target scene.

Use Scene Flow for global navigation. Use Object Flow when a specific object triggers navigation, such as a button, door, portal, or pickup.

Scene renames are reference-safe: when you rename a scene, Opal updates Go To Scene actions in every project scene, including the open scene's latest unsaved Flow edits. Project Health also reports empty, missing, or ambiguous transition destinations before export or publishing. Click a transition problem to open its scene and focus the exact Flow node.

GameState variables

GameState variables belong to the project, not to a single scene. They are useful for values that must survive scene changes.

Good GameState variables:

VariableTypePurpose
scoreNumberShared score across levels
livesNumberPlayer lives
hasKeyBoolUnlock state used by multiple scenes
currentQuestTextSimple quest or state label

Prefer object variables for values that only matter to one object instance. Prefer component fields for values already modeled by a component, such as Health hp.

Autosave and storage

Opal autosaves scene and project data as you edit.

ModeWhere data goes
Hosted portalAccount-backed server storage
Local dev serverServer data folder (.opal-data/) via the /api — LAN devices can share it
No server APIBrowser IndexedDB fallback per origin / profile

IndexedDB storage is real, but local to that browser. Export .opal backups before clearing site data or switching machines.

For small games:

text
Main Menu
Level 1
Level 2
Win Screen
Lose Screen

For larger games:

text
Boot
Main Menu
World Map
Level 01 - Meadow
Level 02 - Cave
Combat Test
Credits

Keep experiment scenes in the same project while you are building. Rename or remove them before publishing so scene pickers and graphs stay easy to read.

Opal Engine — MIT licensed