|Gaeel Bradshaw-Rodriguez c9af29e991||1 month ago|
|cglm @ 2bf576c2cd||2 months ago|
|glfw @ 0a49ef0a00||2 months ago|
|res||1 month ago|
|src||1 month ago|
|stb @ f54acd4e13||2 months ago|
|.gitignore||2 months ago|
|.gitmodules||2 months ago|
|CMakeLists.txt||2 months ago|
|readme.md||2 months ago|
I made a 3D particle life system based on Jeffrey Ventrella’s “Clusters” idea. And I built it with Unity3D.
Unity3D is a lovely program to use to make games, simulations, and graphical toys, it’s responsible for a large part of my professional and hobby activity. It has lowered the barrier to entry for realtime graphics and game programming to unprecedented levels.
The original implementation of this project took me around two and a half hours, including talking to the people who tuned in to watch, and some time spent staring at some of the results.
You can watch a replay of me doing so here: Replay on YouTube
Or alternately, watch a clip where I marvel at one of the organisms that the program generated: “A real treat” on YouTube
All that said though, Unity3D is a big program, and the default data model is very hierarchical, which is great in some circumstances, but is poorly optimised for running simulations on big collections of identically-structured elements. Unity has recently introduced a bunch of tools enabling users to use a “Data-Oriented Tech Stack”, including an “Entity Component Systems” model. This allows Unity3D to generate code that compiles down to simple
for loops over tightly packed data. There’s also the “burst compiler” that further optimises this model by parallelising these tasks and spreading them over multiple threads.
I started learning how to use this, but it wasn’t fun. Trying to properly structure data and use a weird API is not what I enjoy about Unity3D, and in this case, the entire program is just a big
for loop that munches on some simple data, and then map that to a bunch of quads with a shader slapped on.
A big for loop on simple data...
You know, the kind of thing C is good at.
A bunch of quads with a shader slapped on...
You know, the kind of thing OpenGL is good at.
So here I am, spending hours and days, re-learning C and OpenGL, and it’s a nice and fun way to spend my time in confinement...
It’s sunny outside, my cat is being an asshole, the town is quiet, and I’m learning C and OpenGL again ❤️