Skip to content

Instantly share code, notes, and snippets.

@crazymonkyyy
Created August 25, 2026 18:02
Show Gist options
  • Select an option

  • Save crazymonkyyy/02d4562c9af81a853349082b8ff46b3d to your computer and use it in GitHub Desktop.

Select an option

Save crazymonkyyy/02d4562c9af81a853349082b8ff46b3d to your computer and use it in GitHub Desktop.

wigglely wobblely

a simple puzzle game for finding a path on a subset of a newton fractal but shown with crt and magnet anesthics

"electrons"(particle emitter) interact with various "magnets"(unstable attractors, such as gravity) to collect coins to verify the solution

tools:

  1. the emitter
  2. magnet(gravity)
  3. field(add kentic engery, wieght, etc)
  4. prism(seperate 1 vec2 into 3, then a collector waits for all 3 to merge and averages thier velicity)
  5. circle (bumper, pinball logic)
  6. "paper clip", (blocker)
  7. dials (changings the fields and emitter settings, array of floats)
  8. coins, color coded(if true path crosses them, they become outlined, victory condition)

given a grab bag of tools, level cannidates could be generated near randomly but requiring some level of unstablity of near by configurations

3 layers of rendering:

  1. the path is simulated 1000's of ticks at a time, 1-bit, fades
  2. crt shader
  3. steromorphic arcadey overlay, clickable and dragable, lit by the screen

30-ish levels, simple level select, synthwave music player, little else


dlang + raylib

opend, dub-less

ai note: ~~ are crossed out

each level is a "range" with structured input(pile of vec2s? vec2[8]?) this range is always the same each tool is in a max length array in golbal scope, to ship each level those inputs are constrained and a collection of 2.5d objects, normal map reacts to the crt layer

big switch statement game logic? int level, clamp? levels are a set of constraints on allowed placement of tools, inactive tools will be nan

controls are click and drag for the >1 float moves then "nudges" that are subpixel (1/20th?). actaully stored as fixed point

the emit layer sends out fake iterations nearby the true point, but the game play logic is always just one iteration that is in the distrubution of particals, sheer(lerping hex vs square latis?) + radius + centroid noise? true range gets highlight at t%?

crt layer looks at cool-retro-term? ai resreach?

steromorphic layer is lazy low poly art?


note on lerped hex lattice: while to did work in experiments the ai needed to be told "sheer -1 moves odd columes, sheer of 1 moves odd rows, 0 is the square lattice"; and the ai could not easily imagine using this hex lattice as velocitys from the emitter. THIS IS NOT FOR GAME PLAY ITS FOR THE VISUALS

note on paths and ranges: ai seems convinced this is hard to tune and slow; the entire path is simulated and shown to the user


to start with, "the playground"

we grab my repl, arsd.ini and my music player; to make a coherent raylib project

all the tools are accessible to me via repl; a cli + ini can test any solution

the tools are devopled here, then snap shots from the play ground become the basis of levels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment