Skip to content

Instantly share code, notes, and snippets.

View kalsprite's full-sized avatar

kalsprite kalsprite

View GitHub Profile
@Memresable
Memresable / randy_gaul_obb.md
Last active December 23, 2024 13:58
A look at Randy Gaul's 3D OBB-OBB collision detection & resolution

UPDATE

The article seems to have a really bad tune, it was back then me writing this and i learned a whole lot later on, i don't find this to be a decent article to follow through and i wouldn't recommend it anymore per se, i'm thinking of doing a complete rewrite of this with my own simplified implementation of it (which isn't perfect and contains errors, but would be quite good for understanding), it still contains some useful information however in case you're interested.

And the little rant has been removed since I've found it to be distracting and not helpful, i've learned that they have a good use for some other things, I still don't recommend the GJK + EPA combination however, but they have some useful uses.

Some helpful resources for the time being:

Dirk Gregorius, The Seperating Axis Test

@jakubtomsu
jakubtomsu / realtime_collision_detection.odin
Last active April 13, 2026 17:59
Port of some functions from 'Real Time Collision Detection' book by Christer Ericson to Odin
// Port of some collision functions to Odin by Jakub Tomšů.
//
// from Real-Time Collision Detection by Christer Ericson, published by Morgan Kaufmann Publishers, © 2005 Elsevier Inc
//
// This should serve as an reference implementation for common collision queries for games.
// The goal is good numerical robustness, handling edge cases and optimized math equations.
// The code isn't necessarily very optimized.
//
// There are a few cases you don't want to use the procedures below directly, but instead manually inline the math and adapt it to your needs.
// In my experience this method is clearer when writing complex level queries where I need to handle edge cases differently etc.
Complete stuff:
https://xmonader.github.io/letsbuildacompiler-pretty/
Lexers + DFAs:
https://gist.github.com/pervognsen/218ea17743e1442e59bb60d29b1aa725
Parsing:
https://eli.thegreenplace.net/2012/08/02/parsing-expressions-by-precedence-climbing
Backend:
@cshenton
cshenton / block_allocator.odin
Last active September 25, 2025 09:04
Allocator based on Sebastian Aaltonen's Offset Allocator, for suballocating GPU heaps
package block_allocator
// Allocator based on Sebastian Aaltonen's Offset Allocator:
// https://github.com/sebbbi/OffsetAllocator/blob/main/offsetAllocator.cpp
import "core:fmt"
import "core:math/bits"
import "core:math/rand"
assert_allocator_layout_good :: proc(allocator: ^Block_Allocator) {
@d7samurai
d7samurai / .readme.md
Last active May 2, 2026 08:25
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++ / OOP or (other) obscuring cruft. View on YouTube

hollowcube

Other gists in this series: