Nora Kinetics - SFX (Driven Spatially by GPU)

Hi folks! I've made more progress on Nora Kinetics - a physics engine / sandbox that I've been working on for about a year.

I finally finished a song and I've got the SFX working in the way I've been envisioning. I'm hoping you all will have some feedback for it as I continue to tune. It sounds best with headphones!

Under the hood, the little interactive segments are all communicating their position, collision force, etc via compute shaders on the GPU (they are byproducts of the solver).

Basically, the position and collision force of every single segment is known every frame. Another compute shader comes through and quickly sorts them into a priority queue based on how close they are to the camera and how fast their collisions are. This gives a decent balance between letting the player hear lots of movement farther away, but then also hearing collisions closer to the camera. The overall effect is something close to ASMR (I'm hoping) and processing time is about 140μs with 250,000 segments.

The system is highly tunable, so in this video (recorded on my Mac), the segments are sharing a ring buffer with 48 different voices and up to 1000 segments can be making noise per frame. On iPhone, I knock that down to 24 voices and 500 segments to get a good balance of performance and sound.

I'll be posting more videos on my channel here soon! I'm working on a full gameplay walkthrough as well as a "making of" video, showing how the game has changed over the last year.

Thanks for watching!

https://www.youtube.com/@NoraKinetics

u/CodeSamurai — 3 days ago

My Current Daily Driver

Snowsky Echo Nano and Symphonium Meteors!

The sound is great, it's pleasing aesthetically and the whole setup fits right into a little case. It's perfect when I want to go phone-less and pack light which is most of the time these days. I know the Meteors are better driven with a dedicated DAC, but I'm currently enjoying this setup just as much as my full setup. The Echo Nano is no slouch!

u/CodeSamurai — 12 days ago

Nora Kinetics // Fluid Dynamics

Here's a short video showing how Nora Kinetics can simulate fluid dynamics in real time, letting the user interact with both solid and fluid materials at the same time.

Under the hood, it is using the same efficient stable Cosserat rod simulation, but treating specific segments as a point cloud and using a marching cubes algorithm to render water instead of the rod segments. It's a work in progress, but the results so far are promising!

Because it uses the stable Cosserat rod system, changing material properties lets you simulate anything from water to jelly to more of a solid jello type substance. You can mix it up too, so the sky is the limit!

You can also see a glimpse at some of the glue mechanics here too. Glued structures can be anywhere from completely solid to completely relaxed and interact with the environment and projectiles in fun ways.

Thanks for watching! I'll be putting out more small videos in the coming weeks as I get ready for open beta! Please DM me if you are interested in being a part of that!

youtube.com
u/CodeSamurai — 24 days ago
▲ 23 r/claude

Claude Code & Fable 5 - The Experience So Far

Hi folks! I wanted to share my Fable 5 success story from yesterday.

I've been building a passion project for about 8 months called Nora Kinetics, a fully custom GPU driven physics engine and renderer. Most of it is hand-written, with AI used along the way to help plan features, think through some math that is beyond me, and to help me learn about compute shaders, which was a goal from the start.

About 5 months ago I added glue mechanics that let glued segment structures hold their shape (example pictured above), and a bug arrived with that. Energy was leaking into the system somewhere, and small clusters of glued segments would twitch and drift oddly instead of coming to rest. I revisited it for months, with and without AI help, and could not find it.

When Fable 5 came out, I handed it the problem along with months of notes, failed experiments, and 2am theories. It dug in for about 15 minutes and came back with a diagnosis that sounded flat-out wrong to me. It pointed at one of the most foundational pieces of the simulation, code I had written, tested and trusted since the beginning.

It was right. The culprit was a holdover from the project's original Python prototype that survived the port to Apple Metal: a GPU reduction that accumulated physics quantities using fixed-point integer math. For small clusters, the rounding noise was actually larger than the signal being measured. The solver's targets were jumping randomly every substep, and those tiny random kicks bubbled up into big visible movements in glued structures.

No amount of tuning downstream could have fixed it, because the solver was being fed noise. That's why it eluded me for months. Fable 5 found the root cause in 15 minutes and I spent the rest of the day rebuilding it, and now the simulation has never been more stable!

I have a love-hate relationship with AI, but this is the first time I've been truly excited about it as a long-time-programmer. I feel like I learned so much yesterday!

u/CodeSamurai — 27 days ago

Nora Kinetics // Trailer

The Short Version

Hi everyone! I wanted to introduce my project: Nora Kinetics!

It is a physics sandbox capable of simulating hundreds of thousands of little pieces that can interact individually or connect together like yarn.

It handles modifiers like glue, magnetism, fire, material property changes, full environment control (gravity, friction, etc) and more! The physics and rendering are 100% custom and homegrown and represent about 8 months of learning compute shaders.

This is the first trailer, and it doesn't show everything the engine can do! I'll post more clips on my channel here showing different features!

Looking for internal beta testers. Mac-only for now (M1 or newer required). If you'd like, DM me your specs and why you're interested and I'll reach out in the next week or so!

Thanks for watching!

Full Overview

This is a fully custom physics engine and renderer built on Apple Metal.

There is no AI and it uses no external libraries. It's just good old fashioned physics and rendering.

I originally started this project to learn compute shaders after reading this paper. I have a some experience in high performance computing and this seemed like a fun and interesting challenge.

The power and flexibility of compute shaders naturally drove the physics architecture, leading to a design philosophy I've been calling "Everything is Compute Shaders" (EiCS). If it can be a compute shader, it is! Physics, gravity, collisions, fire propagation, magnetism, glue constraints, all run on the GPU. The CPU acts only as a lightweight coordinator for managing buffers and driving the UI.

The renderer is built completely from scratch using Metal's render and ray tracing pipelines, sitting on top of the same GPU-first foundation.

During simulation, the CPU only runs at about 8% and stays in low-power mode.

At its core, the compute engine simulates Cosserat rods (flexible segments that stretch, bend, collide, connect, and break). The segment count scales directly with GPU power. On my M5 Max, I get about 200k-250k segments and my iPhone can handle around 30k. All of this runs at interactive frame rates.

The Cosserat solver sits at the center and other systems either feed into it directly (gravity, glue, magnetism, projectiles) or consume its outputs (collisions, positions, distances).

The renderer leverages Metal's render and ray tracing pipelines to bring the simulation to life. It features:

  • HDR with bloom and lens flares
  • PCSS shadow mapping
  • Volumetric clouds and god rays
  • An ocean system with foam and Fresnel reflections
  • Ray-traced glass spheres that can reflect or refract (or both!)
  • GPU-driven LOD, alongside frustum and occlusion culling

You get a full suite of tools to play with the simulation. You can:

  • Pull, cut, and fling segments around.
  • Ignite segments and watch fire dynamically spread and burn through materials.
  • Change material properties to create emergent behaviors like kinetic sand, water, jelly, etc.
  • Magnetize segments or glue structures together.
  • Place gravity orbs that attract, repel, pulse, swirl, or even drive standing-wave cymatics.
  • Build destructible sculptures, kinetic art, Chladni patterns, or anything else you can dream up.

Some of the patterns in the game come from here: https://www.cemyuksel.com/research/yarnmodels/

youtube.com
u/CodeSamurai — 1 month ago