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
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;
@bruchmann
bruchmann / read-json.gd
Last active April 6, 2021 18:45
Read a JSON file in GDScript
func read_json_file(path: String):
var file = File.new()
file.open(path, File.READ)
var json_result = JSON.parse(file.get_as_text())
if not json_result.error == OK:
return {} # Silently fail
return json_result.result
@bruchmann
bruchmann / ttt.cfg
Created August 28, 2019 16:57
Advanced config file for GMod TTT Servers.
// NB: This does not contain every cvar available for TTT. I created this config
// for my server, and my needs. Feel free to use/modify/republish this.
// Please see the license at the bottom of the file, and
// http://ttt.badking.net/config-and-commands/convars for more convars.
// Make sure Terrorists can't hear Traitor radio
sv_alltalk "0"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Preparation and post-round
@bruchmann
bruchmann / lmms_samples.rb
Last active October 14, 2018 22:56
Load bundled LMMS samples in Sonic Pi on Windows
lmms_basedir = "C:/Program Files (x86)/LMMS/data/samples/"
lmms_dirnames = [ "basses", "bassloops", "beats", "drums", "effetcs", "instruments", "latin", "misc", "stringsnpads" ]
lmms_dirnames.each do |dir|
load_samples (lmms_basedir + dir)
end
lmms_basses = lmms_basedir + "basses"
lmms_bassloops = lmms_basedir + "bassloops"
lmms_beats = lmms_basedir + "beats"