godot-main-scene

Create a persistent Godot main.tscn that loads and swaps level scenes.

8|3|Updated Jun 12, 2026
One-click install
npx skills add https://github.com/arthur0n/xenodot-forge --skill godot-main-scene
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: godot-main-scene
Source: https://github.com/arthur0n/xenodot-forge/tree/main/plugin/skills/godot-main-scene
Command: npx skills add https://github.com/arthur0n/xenodot-forge --skill godot-main-scene

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of structuring a Godot game so the main scene stays persistent while levels are loaded, swapped, and freed safely underneath it. It helps avoid scene-tree replacement mistakes that break UI, cameras, viewport rigs, or other long-lived systems.

Core Features & Use Cases

  • Persistent Main Scene: Defines a thin main.tscn entry point that owns the shell of the game and survives level swaps.
  • Safe Level Loading: Loads level scenes into a dedicated host node and frees old levels cleanly to prevent double cameras and rendering conflicts.
  • Paradigm-Aware Camera Layout: Supports top-down or isometric projects with a persistent camera in Main, and first-person or third-person projects where the camera stays with the Player inside the level.
  • Project Integration: Guides how to set run/main_scene, organize folders, and record conventions so the entry point remains consistent.
  • Use Case: When a project needs a reusable gameplay shell, this Skill helps create the startup scene, wire level swapping, and keep UI and global systems intact across scene transitions.

Quick Start

Ask for a Godot main scene setup that creates main.tscn, loads the first level under a LevelHost, and follows the correct camera ownership pattern for the project’s genre.

Frequently Asked Questions about godot-main-scene

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep UI persistent when loading new levels in Godot?

Persistent UI in Godot requires a dedicated main scene shell that hosts level scenes underneath. By instancing levels into a child node and freeing old levels safely, the parent UI and viewport rigs survive scene transitions without breaking.

What's the best way to set up a main scene for Godot level loading?

The best way to set up a Godot main scene is creating a thin entry point that owns the game shell and loads levels into a dedicated host node. Configure the project's run/main_scene setting to target this file for consistent startup.

Does Godot camera ownership change between top-down and first-person workflows?

Camera ownership in Godot changes based on perspective. Top-down and isometric projects keep a persistent camera in the main scene, while first-person and third-person projects place the camera inside the level with the player.

Why do I get double cameras when swapping levels in Godot?

Double cameras in Godot occur when old level scenes are not freed before loading new ones. Safe level loading requires instancing new levels into a dedicated host node and explicitly freeing previous levels to prevent rendering conflicts.

Can I use autoload data with a persistent main scene in Godot?

Autoload data works with a persistent Godot main scene by storing optional run-state data globally. This allows the main shell to maintain synchronized state across level swaps without losing progress or UI integrity.