Skip to content

Instantly share code, notes, and snippets.

View bruchmann's full-sized avatar
🏠
Pining for the Fjords

Steffen Bruchmann bruchmann

🏠
Pining for the Fjords
View GitHub Profile
@bruchmann
bruchmann / idle_intent.gd
Last active November 9, 2025 19:36
Intent system for Godot. (WIP)
class_name IdleIntent
extends Intent
# /root/src/core/autoloads/game.gd
extends Node
################################################################################
# SIGNALS #
################################################################################
signal focus_changed(has_focus: bool)
signal input_method_changed(new_input_method: InputMethod)
@bruchmann
bruchmann / model.gd
Created August 29, 2025 17:56
GDScript comment banner
@tool
class_name ActorModel extends Node
################################################################################
# SIGNALS #
################################################################################
signal state_changed(new_state: ActorState)
################################################################################
@bruchmann
bruchmann / criterion.gd
Created June 9, 2025 12:59
Rule / Criterion in Godot (A simplified, pseudo-code example)
class_name Criterion extends Resource
@export var ID: StringName
@export var display_label: String
@export_multiline var expression: String
func test(game_context: Dictionary) -> Dictionary:
var expression_context: Dictionary = _make_expression_context(game_context)
var exp: Expression = Expression.new()
class_name Damage extends Resource
enum Type {
MAGICAL,
PHYSICAL,
}
@export
@bruchmann
bruchmann / chatgpt.md
Last active March 1, 2024 18:59
Stats vs Attributes

What's the difference between "stats" and "attributes" in gamedev?

In game development, "stats" and "attributes" are often related but can have slightly different meanings depending on the context of the game.

Stats (Statistics)

Stats generally refer to numerical values that represent specific abilities or characteristics of a character, unit, or object within the game. These can include attributes such as health points (HP), mana points (MP), strength, agility, intelligence, speed, defense, etc. Stats are typically used to quantify a character's capabilities and determine their performance in various aspects of the game, such as combat effectiveness, movement speed, or resource management.

Attributes

@bruchmann
bruchmann / LIESMICH.md
Created February 21, 2024 17:03
Paragrimm Brainstorming
  1. Actor betritt den ersten Block mit in-water-Modifier
  • on_enter wird getriggert
  • Actor bekommt Property occupied_blocks: Array auf [water_block] gesetzt
  1. Actor betritt den nächsten Block mit in-water-Modifier
  • on_entered vom neuen Block wird getriggert
  • Actor bekommt keinen neuen Modifier
  • on_exited vom alten Block wird getriggert
  • Actor prüft JETZT in welchem Block er sich befindet
  • Wenn er sich nicht mehr in einem water_block befindet, DANN wird der Modifier entfernt
@bruchmann
bruchmann / 00-response-mapping.ts
Last active February 11, 2024 09:44
Generics Explainer (an experiment)
function createResponseMapper(responseType: string) {
return (response) => {
switch (responseType) {
case "Game":
return …;
case "Post":
return …;
default:
@bruchmann
bruchmann / 01_README.md
Last active January 12, 2024 21:34
Setting up Neovim LSP for Godot

Setting up Neovim LSP for Godot

Godot

Go to Editor > Editor Settings… > Text Editor > External.

Use the following settings

  • Use External Editor
  • Exec Path: nvim
@bruchmann
bruchmann / player.gd
Created October 31, 2022 10:56
GDScript Save-Game Example
extends CharacterBody2D
class_name Player
# […]
func compute_save_state() -> Dictionary:
var save_state: Dictionary = {};
save_state["equipped_gun"] = self.equipped_gun;