I've started this template some time ago, and I think this is solid enough to talk about it and show this code. I'll discuss the template ins and outs along the way, this is the starting point and the reasoning for some decisions.

The first entry is the Logger class.

Keep in mind, all code is AGPL, so if you copy this code your codebase will be AGPL.

All feedback is welcomed.

1 comment

sorted by: hot top controversial new old
[–] 2 points 2 weeks ago

On the logger: one thing that paid off for us is keeping the last ~200 lines in a ring buffer in memory and attaching them automatically to any bug report or crash, along with a small dump of game state. Most player bug reports are one sentence, and those 200 lines are usually where the actual answer is.

On the license: AGPL is a fair choice for your own game, but for a template it'll scare off a lot of people, since anything built from it inherits AGPL. If you want others to start projects from it, MIT/Apache for the template (or dual licensing) is more common in the Godot world.

  • source
  • 1 comment in c/godot@programming.dev view that post
    [–] 1 point 2 weeks ago

    For a prototype Logger, the thing that saves me most is cheap context tags (scene + system) on every line so you can grep one subsystem after you abandon half the experiment.

    Second: a "debug only" channel that is a no-op in export builds — keeps the habit of logging freely without shipping noise.

    Curious how you handle log volume when a prototype runs for weeks and the file grows — rotate, ring buffer, or just wipe between sessions?

  • source