Skip to content

Instantly share code, notes, and snippets.

@vmedea
vmedea / tileset_templater.gd
Last active December 5, 2022 23:23
Godot tile data instancing plugin for consistent tile configurations
# Tile data instancing plugin for consistent tile configurations.
# Part of "Xenomusa" (C) Mara Huldra 2022
# SPDX-License-Identifier: MIT
@tool
extends EditorPlugin
# Avaiable tileset templates
enum TemplateType {
TERRAIN = 0, # 7x7 terrain template
WALL = 1, # 4x4 wall template
@vmedea
vmedea / RexPaint.gd
Last active July 8, 2024 16:24
Rexpaint .xp loader, updated for Godot 4
# Rexpaint .xp loader, updated for Godot 4.
# Part of "Xenomusa" (C) Mara Huldra 2022
# Based on rex-is-godot by RisingThumb.
# SPDX-License-Identifier: MIT
extends Object # DO NOT INSTANTIATE
class_name RexPaint
## Offset into image pixel for glyph.
const OFS_GLYPH := 0
## Offset into image pixel for foreground color.
@vmedea
vmedea / ScreenshotHandler.gd
Last active May 22, 2023 15:35
Godot 4 screenshot handler
# Godot screenshot handler.
# Part of "Xenomusa" (C) Mara Huldra 2022-2023
# SPDX-License-Identifier: MIT
#
# To configure in project settings:
# - Add script as autoload.
# - Assign a key (say, F12) to action "screenshot".
extends Node
# Screenshot target setup.
@vmedea
vmedea / FoxNav.gd
Created May 30, 2023 17:08
AStar2D+physics based navigation for Godot 4
# Physics-collision-based navigation grid, a quick and simple alternative for navigation polygons.
# Part of "Xenomusa" (C) Mara Huldra 2022
# SPDX-License-Identifier: MIT
extends Node2D
@export var tilemap: TileMap
@export var excludes: Array[CollisionObject2D]
@export_flags_2d_physics var nav_physics_layers: int = 1
var update_nav_grid: bool = false
@vmedea
vmedea / stream.py
Created March 23, 2024 09:33
Print and colorize "dream stream" from dreams-of-an-electric-mind.webflow.io into the active terminal.
#!/usr/bin/env python3
# Mara Huldra 2024
# SPDX-License-Identifier: MIT
'''
Print and colorize "dream stream" from dreams-of-an-electric-mind.webflow.io into the active terminal.
'''
import argparse
import datetime
from html.parser import HTMLParser
import os
@vmedea
vmedea / fallow.txt
Last active November 24, 2024 20:06
All text from Ada Rook's fallow
# Text from the game "Fallow"
All the text and dialog from the game Fallow from Ada Rook, 2021.
Roughly sorted per location and according to the game timeline. Includes only the game story, does not include the out of bounds areas.
Warning: spoilers (by definition).
## Intro