Skip to content

Instantly share code, notes, and snippets.

View Falconerd's full-sized avatar
⚙️
Crankin'

Dylan Falconer Falconerd

⚙️
Crankin'
View GitHub Profile
@Falconerd
Falconerd / ease.odin
Created April 13, 2026 06:52
ease-y animations
package ease
import "core:math"
Ease :: struct {
target: [^]f32,
start: [4]f32,
end: [4]f32,
count: int,
t: f32,
@Falconerd
Falconerd / handles_example.odin
Created April 13, 2026 06:43
handles example
package main
import "core:fmt"
import "core:math/rand"
import rl "vendor:raylib"
Entity :: struct {
name: cstring,
pos: [2]f32,
package main
import "core:math/linalg"
import rl "vendor:raylib"
Vec2 :: rl.Vector2
Rect :: rl.Rectangle
Color :: rl.Color
BG :: Color{0, 0, 0x1C, 0xFF}
package main
import rl "vendor:raylib"
Vec2 :: rl.Vector2
Rect :: rl.Rectangle
Color :: rl.Color
BG :: Color{0, 0, 0x1C, 0xFF}
FG :: Color{0, 0xDF, 0, 0xFF}
@Falconerd
Falconerd / falconerd.toml
Created February 7, 2026 10:23
Helix theme
inherits = "adwaita-dark"
"ui.background" = { bg = "bg" }
"ui.text" = { fg = "fg" }
"ui.selection" = { bg = "selection", underline = { style = "line" } }
"ui.cursor" = { fg = "bg", bg = "cursor" }
"ui.cursorline" = { bg = "#0a0a30" }
"ui.statusline" = { fg = "fg", bg = "statusbg" }
"ui.menu" = { fg = "fg", bg = "menu" }
"ui.menu.selected" = { fg = "bg", bg = "keyword" }
@Falconerd
Falconerd / README.md
Created October 7, 2025 04:55
Odin + Raylib Hot Reload

Build Instructions

Build Cradle

odin build main.odin -file -out:build/debug.exe -debug

Build Game (This one is the hot reload one)

odin build game.odin -file -build-mode:dll -out:build/game.dll -debug

USize AlignForward(USize p, USize alignment) {
USize mod;
if (0 == p % alignment) {
return p;
}
mod = p & (alignment - 1);
if (mod != 0) {
@Falconerd
Falconerd / sprite_animation_example.odin
Created March 12, 2025 05:05
A simple, yet effective way of handling sprite animations with (immediate) callbacks.
package main
import "core:fmt"
import rl "vendor:raylib"
Vec2 :: [2]f32
Rect :: rl.Rectangle
Sprite_Animation_Frame :: struct {
@Falconerd
Falconerd / arena.c
Last active July 24, 2024 05:39
Some game code stuff
#include "common.h"
uintptr_t align_forward(uintptr_t ptr, size_t alignment) {
uintptr_t p, a, modulo;
if (!is_power_of_two(alignment)) {
return 0;
}
p = ptr;
a = (uintptr_t)alignment;
@Falconerd
Falconerd / isq_ui.h
Created June 30, 2023 07:19
IMGUI with Flexbox layout
// Usage:
// ISQ_UI_RENDER_RECT(buffer, count)
// must be defined by the user.
// buffer: pointer to an array of rects
// count: number of rects in the array
// rect:
// vec4 min, max;
// vec4 color;