new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Godot 4 Patterns · all subjects

class_name/autoload

3 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

class_name vs autoload decision table

Use class_name for data types (Intent, ActionResult), RefCounted helpers, pure logic with no scene needed, and when multiple instances are OK. Use autoload for global state (GameState, Player), signal hubs (GameSignals), scene-spanning services (Audio, Save), and when a single instance is needed for the whole game.

Don't use class_name on autoload scripts

Never add class_name to an autoload script because autoload IS the global symbol. Adding class_name causes a 'name conflict' error.

Singleton count limit for production games

Limit autoloads to 4-5 maximum: GameSignals (signal hub), ContentDB (data loader), SettingsStore (user prefs), SaveSystem (save/load), and optionally SteamClient (external service). Everything else should either be dependency-injected into nodes or instantiated per-scene. More than 5 autoloads is singleton sprawl and creates hidden dependencies.

Give your agent this brain