🗂️Project Structure
A well-structured project is one where you and the AI can find anything in seconds. Poor structure does not cause immediate problems. It accumulates them: sessions where the AI reads the wrong files, features built in the wrong place, assets that cannot be found, and a codebase that becomes harder to navigate as it grows. Setting the structure up correctly at the start costs almost nothing. Fixing it mid-project costs significantly more.
The Core Explanation
Start with Git: before anything else
Before you write a line of code or place an asset, initialise a Git repository. Git is your undo button for the whole project. Not just individual files, the entire project, at any point in time. Every time you complete a working feature, commit it. That commit becomes a checkpoint you can return to if the next session goes wrong.
This matters more in AI-assisted development than anywhere else. The AI can make sweeping changes across multiple files in a single session. Without version control, a session that goes wrong can leave the project in a state that is difficult to manually reverse. With it, you roll back to the last known-good commit and try again.
Your project ships with a .gitignore the SDK maintains. Do not rewrite it. It already excludes everything regenerable:
node_modules/,.dist/,.editor/,.engine/— restored bypnpm installor the next build.cursor/mcp.json— Cursor's local MCP connection file; never commit it
Everything else is committed, including your scene files and prefabs. assets/ is the heart of your project — if it is not in Git, your levels are not backed up.
How a project is organised
Every Sandbox Studio project has the same skeleton. You will spend nearly all your time in two folders:
src/
Your TypeScript game code
assets/
Scenes, prefabs, materials, textures, models, sounds
The rest is managed for you:
YourProject.genesys-project
Project settings: default scene, engine version
Leave it alone unless you know why
src/auto-imports.ts
Generated list registering your game classes
Never edit — regenerated on every build
src/game-data.ts
Generated editor metadata for your classes
Never edit
.engine/
A read-only copy of the engine source, for reference
Read it, never change it
.dist/, .editor/, node_modules/
Build output and dependencies
Ignore entirely
Organising your code
Group src/ by what things are in your game, not by engine type. A layout that scales well:
Naming conventions: make the type readable from the name
Names should tell you what something is without opening the file.
Scene node classes
PascalCase, named for the thing
HealthPickup, PatrolDrone
Reusable behaviours
PascalCase + Node or a clear role
CameraShakeNode
UI classes
PascalCase + UI or widget name
ScoreboardUI
Every class you place in a scene needs the registration decorator:
Custom classes always use @ENGINE.GameClass() — never EngineClass, which is reserved for the engine itself.
Asset structure: organised by type, not by feature
Assets live in assets/ and should be separated by type. This is the convention the engine expects and what the AI will search when looking for existing assets.
Name assets descriptively and consistently. A texture called T_GrassGround_Albedo.webp tells you its type (texture), subject (grass ground), and map type (albedo). A file called grassbumpmap.png tells you less. The naming does not have to be elaborate, but it has to be consistent, because inconsistent asset names are the most common reason the AI pulls in the wrong file.
Editor organisation: naming what lives in the scene
The scene editor is where your game world is assembled. Nodes placed in the scene should follow the same naming conventions as their classes. An instance of HealthPickup placed in the scene should be named HealthPickup or HealthPickup_[purpose] if multiple variants exist, not left as the default generated name.
Group related nodes in the scene hierarchy under labelled folders or parent nodes. A scene with a flat list of two hundred unnamed objects is one that neither you nor the AI can navigate efficiently. A scene with logical groupings (Environment, Enemies, Spawnpoints, Triggers, Audio) is one where finding anything takes seconds.
Configuration and project-level files
Keep project configuration at the root, not buried in subdirectories. Your package.json, .gitignore, and <ProjectName>.genesys-project file live at the root. .cursor/rules/ is Cursor's rules folder and keeps that assistant's behaviour consistent across the project. Your .agents/ folder holds the skill files any agent can use for the engine and your project conventions.
Do not create configuration files inside src/. Configuration belongs at the root level where it is immediately visible and where build tools expect to find it. Do not edit src/auto-imports.ts or src/game-data.ts.
Practical Guidance
Initialise Git before writing any code. Commit every verified feature as a checkpoint.
Spend your time in
src/andassets/. Leave generated files and.engine/alone.Group
src/by what things are in the game (Characters/,Gameplay/,Behaviours/,UI/,Core/). Keepgame.tsat the root ofsrc/.Name scene node classes for the thing they are (
HealthPickup). Register them with@ENGINE.GameClass().Separate assets by type in
assets/:models/,materials/,textures/,sounds/,UI/,VFX/, andprefabs/. Keep scene files (.genesys-scene) at the root ofassets/.Use asset prefixes
T_,M_,SM_,SK_,SFX_, andUI_as a team convention.Name scene objects in the editor the same way you name their classes. Leave no object with a default generated name.
Group scene objects in the editor hierarchy by logical category: environment, enemies, spawnpoints, triggers, audio.
Keep configuration at the project root. Nothing belongs in
src/unless it is game logic, except the generatedauto-imports.tsandgame-data.tsfiles you never edit.When creating a new file, decide its folder and name before opening your agent. Consistent structure means the AI always finds the right reference files without searching broadly.
Common Mistakes
Starting the project without Git
Initialise a repository first; committing after each working feature is your only reliable undo
Naming files generically (helper.ts, utils2.ts)
Name every file after what it specifically does; generic names make the codebase unsearchable
Editing auto-imports.ts or using deprecated class names
Use @ENGINE.GameClass() on a SceneNode; never edit generated files
Leaving scene objects with default editor-generated names
Name every placed node in the scene to match its class name
Storing all assets in a flat folder with no sub-structure
Separate by type from the start; reorganising assets mid-project is disruptive and breaks references
Committing broken or incomplete work
Commits are checkpoints; only commit a working state
Committing .cursor/mcp.json or rewriting .gitignore
Leave the SDK ignore list in place; keep connection details off Git
Structure is not organisation for its own sake; it is the thing that keeps AI assistance accurate as the project grows. The AI finds the right file because it is in the right folder with the right name. The right commit is easy to return to because commits represent working states. The scene is navigable because objects are named and grouped. Set this up at the start and it maintains itself. Ignore it and every session gets slower as the project gets larger.
Last updated
Was this helpful?

