I'm working on this template for some time. This is what I use to quickly start a game prototype and explore an idea. After this is ready I can polish this better and make it the next step in this. Right now I'm discussing the Logger class that I use across my prototypes.

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
[–] 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
  • 2 comments in c/gamedev@lemmy.world view that post
    [–] 4 points 2 weeks ago (1 child)

    Getting a logger into the template early is a good call, probably the bit I'd leave till way too late. Nice of you to share it

  • source
  • hideshow 1 child comment
  • [–] [S] 2 points 2 weeks ago

    To be honest, this wasn't the first Singleton I added... But it's the entry point for my template at least. Since this is important when you have prototypes from 2 years ago that I want to pick something else. And the engine updated, and I don't know what to do.

    But yeah, agree the earlier the Log exists, better it is.

  • source
  • parent
  • 1 comment in c/gamedev@programming.dev view that post
    [–] 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