Day -366: Nannou, helping L, and lots of noise #
Before I can explain this backstory I need to give a bit more context; some backstory for the backstory if you wish.
My friend, L, in her free time a while ago was interested in following Daniel Shiffman from The Coding Train through the Nature of Code 2 playlist. I introduced her to Shiffman a while back and we both love him very much. She showed interest in trying to do that in Rust, the language I have been selling to everyone for a few years now and let me tell you I am an amazing saleswoman, since she already had one successful project in it. So without hesitation I encouraged her to do so and I quickly linked her to Nannou, an open-source creative-coding framework for Rust, in other words Rust's Processing!
She started her journey and at the time I was quite swarmed with work and so although I was able to help here and there, some stuff I really wanted to help with were out of reach. Namely she was following Graphing 1D Perlin Noise and Nannou didn't have a built-in 1D Perlin Noise generator but looking at its code I felt like I could make one by inferring from, or interpolating I guess, the 3D and 2D implementation and just removing things from them. But I sadly didn't have the time. So I told her I will add this to my To-Do list and will get back to it as soon as possible.
Fast forward many many months, the day is 5th of November, a Friday, also Bonfire day or Guy Fawkes day as L explained to me, I have already quit work a couple of weeks prior and feel ready to get back to some fun side projects and so I tell L,
So wanna work on the noise stuff this weekend? [Followed by the peek emoji below]
I got an I guess?
6th of November, or as some might say, the birthday of Memory itself. I dived alongside L deep into the depths of Nannou, right into noise-rs, the library that Nannou uses for its noise primitives, I went ahead and implemented 1D Perlin Noise. After lots of trouble that relates to the lack of clarity in majority of libraries about what algorithm is actually running behind the scenes we realized we also probably need to implement 1D BasicMulti
. Long story short for the curious, Perlin noise is not actually THAT noisy...? Pure Perlin noise doesn't look very noisy...
We are still not sure if we missed something up or if this is just how things are, but I am decently certain this is just how things are. What libraries like Processing and P5.js do to generate their much more interesting noise is generate the above multiple times at different frequencies and octaves and add them together, hence the need for BasicMulti
which does just that.
We messed around some more with noise and then called it a day.
After that I decided I should start digging into some of the Nature of Code materials, I went through Coding Challenge #24: Perlin Noise Flow Field and found it fairly exciting but I missed the times when I used to watch Dan live, so after finishing it I hopped on Coding Train Live: Shaders which was one of the latest live streams available to watch and my game dev journey began for first time properly exploring shaders alongside Dan.
My previous exposure to shaders so far have been hearing their name when people discuss games and game development and that one time I was really curious and asked a bunch of MUCH more knowledgable friends and after they explained to me I reached the definition "A shader is any bunch of code that runs on the GPU" and thought their name was bad and I prefer the name "Gunctions" (GPU Functions). So seeing Dan stumble through them as we both tried to understand them together was a really nice enlightening experience.
Sleep eventually got the best of me and I decided I will finish the rest of the live stream tomorrow.