Recently, a friend of mine, Micheál Keating, took some phenomenal photographs that captured me. Thousands of Starlings moving together in a dance, mad patterns that disappear as fast as they form. Nature being a powerful and unreal force. Some yoke!
It moved me to try and create an interactive scene inspired by the photographs. An experience where a person could sit into the photograph for a moment and see the birds moving around them.
I feel like its a nice scope of a project and has a few areas that I can try and learn a few things.
I am going to write the game in C, use the Boid Algorithm to simulate the flock of birds and try out some shader programming to try and create the feel of the photograph.
This video clip is a terrible quality visual of where I am at at the moment.
I have boids that are kinda boidish moving around the sky that I want to tune a little better. And I have a greyscale, film grain filter that is almost completely lost in that recording.
The code is available to look at and run here: My Github
I have been wanting to get a feel for using C for game development recently so this is a good candidate for testing out that in.
Some questions around C for game development that I have are:
So far, I am having a good time with it! It feels much more like programming without training wheels in comparison to using Rust or C#. The program will either not compile for a completely unreadable reason, or the program will compile and have strange behaviour because of some typo somewhere hidden in the code. Those are the two things that have tripped me up so far but combatted with the VS debugging tools or by popping errors into Mistral AI.
I have next to no shader experience! It's always been something that puzzles me. Creating something to try and replicate this photograph felt like a nice challenge.
So far I have made a super simple shader (Inspired by examples here) that takes the output from the camera, grey scales it and adds a little noise. This shader is then written to a texture and that texture is then displayed onto the screen.
It works but it doesn't really feel like the photograph so I will see how I can tune that.
As I mentioned in a previous post, I am using the Boids Algorithm to simulate the flock of Starlings. Its been quite a manageable process getting up and running with it and I now have some parameters that i can dial to tune the system. Im currently getting about 30FPS when processing about 500 boids so I will see if I can improve the performance of that with further iterations.