Setup engine

From TraftG/opencode-game-studio · View interactive version

Setup engine is an AI agent skill from the GitHub repository TraftG/opencode-game-studio. Configure the project's game engine and version. Pins the engine in OPENCODE.md, detects knowledge gaps, and populates engine reference docs via WebSearch when the version is beyond the LLM's training data.

How to use this skill

Skill file

When this skill is invoked:

1. Parse Arguments

Three modes:


2. Guided Mode (No Arguments)

If no engine is specified, run an interactive engine selection process:

Check for existing game concept

targets, art style, team size, and any engine recommendation from /brainstorm

> "No game concept found. Consider running /brainstorm first to discover what

> you want to build — it will also recommend an engine. Or tell me about your

> game and I can help you pick."

If the user wants to pick without a concept, ask:

  1. What kind of game? (2D, 3D, or both?)
  2. What platforms? (PC, mobile, console, web?)
  3. Team size and experience? (solo beginner, solo experienced, small team?)
  4. Any strong language preferences? (GDScript, C#, C++, GML, visual scripting?)
  5. Budget for engine licensing? (free only, or commercial licenses OK?)

Produce a recommendation

Use this decision matrix:

| Factor | Godot 4 | Unity | Unreal Engine 5 | GameMaker Studio 2 |

|--------|---------|-------|-----------------|-------------------|

| Best for | 2D games, small 3D, solo/small teams | Mobile, mid-scope 3D, cross-platform | AAA 3D, photorealism, large teams | 2D games, pixel art, indie/small teams, rapid iteration |

| Language | GDScript (+ C#, C++ via extensions) | C# | C++ / Blueprint | GML (JavaScript-like) |

| Cost | Free, MIT license | Free under revenue threshold | Free under revenue threshold, 5% royalty | $99/year (Professional), $499/year (Studio) |

| Learning curve | Gentle | Moderate | Steep | Very gentle |

| 2D support | Excellent (native) | Good (but 3D-first engine) | Possible but not ideal | Best-in-class (purpose-built) |

| 3D support | Limited | Very good | Best-in-class | Limited (not recommended) |

| Web export | Yes (native) | Yes (limited) | No | Yes (HTML5) |

| Console export | Via third-party | Yes (with license) | Yes | Yes (Switch, PlayStation, Xbox) |

| Marketplace | Growing ecosystem | Massive | Massive | Moderate but focused on 2D |

| Prototyping speed | Fast | Moderate | Slow | Very fast |

Present the top 1-2 recommendations with reasoning tied to the user's answers.

Let the user choose — never force a recommendation.


3. Look Up Current Version

Once the engine is chosen:


4. Update OPENCODE.md Technology Stack

Read OPENCODE.md and update the Technology Stack section. Replace the

[CHOOSE] placeholders with the actual values:

For Godot:

- **Engine**: Godot [version]
- **Language**: GDScript (primary), C++ via GDExtension (performance-critical)
- **Build System**: SCons (engine), Godot Export Templates
- **Asset Pipeline**: Godot Import System + custom resource pipeline

For Unity:

- **Engine**: Unity [version]
- **Language**: C#
- **Build System**: Unity Build Pipeline
- **Asset Pipeline**: Unity Asset Import Pipeline + Addressables

For Unreal:

- **Engine**: Unreal Engine [version]
- **Language**: C++ (primary), Blueprint (gameplay prototyping)
- **Build System**: Unreal Build Tool (UBT)
- **Asset Pipeline**: Unreal Content Pipeline

For GameMaker Studio 2:

- **Engine**: GameMaker Studio [version]
- **Language**: GML (GameMaker Language)
- **Build System**: GameMaker Build Pipeline (runners: VM / YYC)
- **Asset Pipeline**: GameMaker Asset Pipeline (sprites, sounds, rooms, objects, shaders)

5. Populate Technical Preferences

After updating OPENCODE.md, create or update .opencode/docs/technical-preferences.md with

engine-appropriate defaults. Read the existing template first, then fill in:

Engine & Language Section

Naming Conventions (engine defaults)

For Godot (GDScript):

For Unity (C#):

For Unreal (C++):

For GameMaker Studio 2 (GML):

Remaining Sections

> "Typical targets: 60fps / 16.6ms frame budget. Want to set these now?"

Collaborative Step

Present the filled-in preferences to the user:

"Here are the default technical preferences for [engine]. Want to customize

any of these, or shall I save the defaults?"

Wait for approval before writing the file.


6. Determine Knowledge Gap

Check whether the engine version is likely beyond the LLM's training data.

Known approximate coverage (update this as models change):

Compare the user's chosen version against these baselines:

Inform the user which category they're in and why.


7. Populate Engine Reference Docs

If WITHIN training data (LOW RISK):

Create a minimal docs/engine-reference/<engine>/VERSION.md:

# [Engine] — Version Reference

| Field | Value |
|-------|-------|
| **Engine Version** | [version] |
| **Project Pinned** | [today's date] |
| **LLM Knowledge Cutoff** | May 2025 |
| **Risk Level** | LOW — version is within LLM training data |

## Note

This engine version is within the LLM's training data. Engine reference
docs are optional but can be added later if agents suggest incorrect APIs.

Run `/setup-engine refresh` to populate full reference docs at any time.

Do NOT create breaking-changes.md, deprecated-apis.md, etc. — they would

add context cost with minimal value.

If BEYOND training data (MEDIUM or HIGH RISK):

Create the full reference doc set by searching the web:

  1. Search for the official migration/upgrade guide:
  1. Fetch and extract from official documentation:
  1. Create the full reference directory:

```

docs/engine-reference/<engine>/

├── VERSION.md # Version pin + knowledge gap analysis

├── breaking-changes.md # Version-by-version breaking changes

├── deprecated-apis.md # "Don't use X → Use Y" tables

├── current-best-practices.md # New practices since training cutoff

└── modules/ # Per-subsystem references (create as needed)

```

  1. Populate each file using real data from the web searches, following

the format established in existing reference docs. Every file must have

a "Last verified: [date]" header.

  1. For module files: Only create modules for subsystems where significant

changes occurred. Don't create empty or minimal module files.


8. Update OPENCODE.md Import

Update the @ import under "Engine Version Reference" to point to the

correct engine:

## Engine Version Reference

@docs/engine-reference/<engine>/VERSION.md

If the previous import pointed to a different engine (e.g., switching from

Godot to Unity), update it.


9. Update Agent Instructions

For the chosen engine's specialist agents, verify they have a

"Version Awareness" section. If not, add one following the pattern in

the existing Godot specialist agents.

The section should instruct the agent to:

  1. Read docs/engine-reference/<engine>/VERSION.md
  2. Check deprecated APIs before suggesting code
  3. Check breaking changes for relevant version transitions
  4. Use WebSearch to verify uncertain APIs

10. Refresh Subcommand

If invoked as /setup-engine refresh:

  1. Read the existing docs/engine-reference/<engine>/VERSION.md to get

the current engine and version

  1. Use WebSearch to check for:
  1. Update all reference docs with new findings
  2. Update "Last verified" dates on all modified files
  3. Report what changed

11. Output Summary

After setup is complete, output:

Engine Setup Complete
=====================
Engine:          [name] [version]
Knowledge Risk:  [LOW/MEDIUM/HIGH]
Reference Docs:  [created/skipped]
OPENCODE.md:       [updated]
Tech Prefs:      [created/updated]
Agent Config:    [verified]

Next Steps:
1. Review docs/engine-reference/<engine>/VERSION.md
2. [If from /brainstorm] Run /map-systems to decompose your concept into individual systems
3. [If from /brainstorm] Run /design-system to author per-system GDDs (guided, section-by-section)
4. [If from /brainstorm] Run /prototype [core-mechanic] to test the core loop
5. [If fresh start] Run /brainstorm to discover your game concept
6. Create your first milestone: /sprint-plan new

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.