Skip to content

Instantly share code, notes, and snippets.

View GCodergr's full-sized avatar
🎯
Focusing

Dimitris Evgenidis GCodergr

🎯
Focusing
View GitHub Profile
@jakubtomsu
jakubtomsu / poly_obb.odin
Created August 2, 2025 13:54
A demo app showing how to compute tightest possible oriented bounding box of a 2D polygon
// A demo app showing how to compute tightest possible oriented bounding box/rectangle of a convex polygon.
// The order of edges matters, so the points should be in order. In case of convex polygons you can just radially sort them.
//
// By Jakub Tomšů
package poly_obb_demo
import "core:fmt"
import "core:math/linalg"
import rl "vendor:raylib"
@randyprime
randyprime / entity_structure.odin
Last active December 18, 2025 03:05
ENTITY MEGASTRUCT
// the tl;dr -> https://storage.randy.gg/entity%20midwit.png
/*
ENTITY MEGASTRUCT
by randy.gg
This is an extremely simple and flexible entity structure for video games that doesn't make you want to
die when you're 20k lines deep in a project.
@jakubtomsu
jakubtomsu / curves.odin
Created September 14, 2024 17:00
Curves based on Freya's video
package curves
Curve_Kind :: enum u8 {
Linear,
Bezier,
Hermite,
Catmull_Rom,
B_Spline,
}
#include <stdio.h>
#include <stdlib.h>
#define da_append(xs, x) \
do { \
if ((xs)->count >= (xs)->capacity) { \
if ((xs)->capacity == 0) (xs)->capacity = 256; \
else (xs)->capacity *= 2; \
(xs)->items = realloc((xs)->items, (xs)->capacity*sizeof(*(xs)->items)); \
} \
@jakubtomsu
jakubtomsu / collision_3d.odin
Last active October 31, 2025 16:20
Simple raylib example of 3d FPS player movement with triangle collision
package main
import "core:fmt"
import "core:math"
import "core:math/linalg"
import rl "vendor:raylib"
main :: proc() {
rl.SetConfigFlags({.VSYNC_HINT, .WINDOW_RESIZABLE, .MSAA_4X_HINT})
rl.InitWindow(800, 600, "collision")
@alexanderameye
alexanderameye / CircularMenu.cs
Last active December 18, 2025 14:17
Circular menu for the Unity Editor
/*
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@xezrunner
xezrunner / pre-commit-nocheckin
Last active September 2, 2025 17:24
nocheckin pre-commit hook for Git
#!/bin/bash
# Author: xezrunner (github.com/xezrunner)
# Inspired by Jonathan Blow's nocheckin setup with SVN (twitch.tv/j_blow) (youtube.com/@jblow888)
# Credits to DustinGadal on r/Jai: reddit.com/r/Jai/comments/jp0vjy/nocheckin_behavior_in_gitsourcetree/gbfhzd1
# gist.github.com/xezrunner/e6dbafcc21fcbc976c93bdee0f371a08
# This pre-commit hook checks for the keyword "$NOCHECKIN_KEYWORD" in staged files,then aborts the commit
# if any matches were found, with output of file path, line number and match preview.
@bkaradzic
bkaradzic / orthodoxc++.md
Last active December 16, 2025 11:18
Orthodox C++

Orthodox C++

This article has been updated and is available here.