Skip to content

Instantly share code, notes, and snippets.

View tabularelf's full-sized avatar
🐈‍⬛

TabularElf tabularelf

🐈‍⬛
View GitHub Profile
@WuffMakesGames
WuffMakesGames / gc.gml
Last active July 16, 2026 11:55
Collection of garbage collection functions for GameMaker
/// Returns a binding for a specific variable name inside a struct
/// @arg {Struct} struct
/// @arg {String} name
/// @return {Struct.GCBinding}
function gc_bind(_struct, _name) {
if (!is_struct(_struct)) show_error($"Invalid type: {typeof(_struct)}. Expecting string", true)
if (!is_string(_name)) show_error($"Invalid type: {typeof(_name)}. Expecting string", true)
return new GCBinding(_struct, _name)
}
@nkrapivin
nkrapivin / rerand.gml
Created October 4, 2022 14:38
RERand - 100% correct GML runtime RNG implementation.... in pure GML!
function rerand() constructor {
state = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
g_nRandSeed = 0;
g_RndIndex = 0;
s_nRandomPoly = $DA442D24;
RND_MAX = $FFFFFFFF;
s_nStateAndMask = RND_MAX;
InitRandom = function(/*uint*/ _seed) {
var uVar3 = _seed;
@pgtwitter
pgtwitter / file.frag
Last active June 15, 2025 21:00
audio visualizer on glsl-livecoder( https://atom.io/packages/glsl-livecoder )
//audio visualizer on glsl-livecoder ( https://atom.io/packages/glsl-livecoder )
precision mediump float;
uniform float time;
uniform vec2 resolution;
uniform sampler2D spectrum;
uniform sampler2D samples;
uniform float volume;
uniform sampler2D backbuffer;
float PI = 3.14159265359;