Indie Tooling

Godot scenes are text, so read them

A text scene only helps if you look at the diff. A few habits keep a solo Godot project understandable, even with one author.

By

2 min read

A git diff of a Godot .tscn file next to the matching scene tree, with a renamed camera node.
Illustration: Indie Tooling

Godot’s text scenes are easy to waste. A .tscn file is a scene you can open in the editor, and it is also a diff you can read. That second fact matters the first time a change you do not remember lands in a file you did not mean to save.

Prefer text resources over binary .res for anything you might review later. Binary is a reasonable place for an imported cache. It is a bad place to keep a scene you wrote. Save when you mean to. An editor that writes the scene every time the window loses focus will fill your history with accidents.

Name nodes as if you will search for them, because you will. Camera2D is a type. IntroCamera is a name. Renaming later changes the scene and every path that pointed at the old node, so rename early, before animations and scripts have memorised the placeholder.

Open a .tscn in a text editor once. Each node is a header line with its name, type and parent, such as [node name="IntroCamera" type="Camera2D" parent="."], followed by the properties that differ from the defaults. External files are listed at the top as ext_resource lines. Once you can read that, a renamed node is one changed header and a swapped texture is one changed path.

Keep scenes small enough to diff. A level that is one file with hundreds of nodes shows a wall of changes when you move a torch. A level built from instanced rooms shows you the torch. Instancing is how Tuesday’s edit stays visible.

Exported script values land in the scene as data, which is what you wanted, and they show up in the diff as data. A magic number buried in _process shows up as code, and you will misread it at midnight.

When an import setting changes — filter, repeat, a sprite region — Godot writes that beside the asset. Commit those import files with the asset they describe, or the next machine will guess. Leave the editor cache out of the repository.

Once a week, read a diff before you commit, even if you are alone. You are looking for accidental churn: a moved camera, a duplicated node, a path that escaped to an absolute disk location, the kind of thing that also breaks an export preset. Text scenes make that visible.

You nudge one platform, and the diff shows forty changed lines. Now you know the file changed for a reason you did not choose, and you can revert it before it becomes history.

All Engines