Hey, everyone. Spryke and I are alive and well, just working quietly as usual. Though it's been a long time since I posted an update, so I've popped my head up for one now.
I've tightened my focus this year and have focused on consolidating, streamlining and completing the various modules of Spryke's engine. Some of the previously-built parts were made for certain deadlines or milestones, such as a demo, a PAX show, or the kickstarter. As such, certain pieces of the engine were rushed, left unfinished, or were built to work in a standalone level or two but not yet properly integrated into the whole.
So I've been hard at work getting the Spryke engine shipshape and ready for the bigtime. I've simplified my internal level editor, consolidated the way levels are loaded and constructed, expanded the capability of my camera system to handle story sequences, vastly accelerated my graphics workflow, and other things like that. From now on, I'm also applying this ship-shape philosophy to anything new I add to the game. Everything I build from now on must be well integrated and must not create roadblocks or speedbumps down the line.
With that in mind, I've just finished a floating particle system for Spryke, which has been on my todo list for years. It's probably one of the most complicated things I've tackled thus far, as I had three vital yet conflicting criteria that needed to be kept in balance. Firstly, it needed to produce great-looking and believable particle effects of just about any type. Secondly, it needed to be super easy for me to use, so that once it's working I'll be able to add any particle effects I want without much time or effort. Thirdly, it had to be well-optimised for decent performance.
It was going to be complicated, and I knew that once it was done, I didn't want to ever have to deal with its intricate inner workings again. So it needed to be able to handle any particle type I could feasibly throw at it between now and Spryke's completion: dust, rain, leaves, snow, Matrix-like cyberdelic effects...
Particles had to be able to float gracefully, flutter unpredictably, or vibrate frenetically. Some must twirl in circles while others must create splashes on platforms. They had to be able to dynamically move if caught by the wind, Spryke whooshing past them, or a nearby explosion.
What's more, they must figure out a lot of stuff on their own. If they are twirling objects, they should twirl more often if there's a brisk wind. If they get knocked about by Spryke, they should seamlessly resume their original motion after a while. They must contribute visual depth to the game by spawning at various distances to the player, with those in the background being smaller, blurrier, fainter and more numerous. They need randomised variety in their movements - those which spin or move quickly must be redrawn more frequently, while those that are small, slow and/or distant should be recalculated only rarely, to optimise CPU performance.
I need to be able to control how and if their colors get randomised, so I can create just green leaves in Photoshop but still get brown, yellow, orange, and red ones for an autumn effect in-game. And if a level has a dark cave on one side and a bright light source on the other, I want a way for the particles' color and opacity to adjust accordingly. Finally, with so many parameters available to me, I needed to be able to tweak them rapidly and without confusion.
So the list of features I wanted was substantial, and I decided on an approach I hadn't fully utilised before: planning out the entire engine on paper first. For the most part, this worked excellently. While I filled up close to an entire notebook of diagrams and equations, I discovered and fixed many issues while still at the paper stage, and some 80% of the features I planned worked immediately as intended when I coded them into Fusion. I still see myself as essentially a non-programmer, so that was a delight to experience.
The final result is probably even better than I'd hoped. It does all the above-mentioned features and more, and the particles look really nice, to my eye. It won't be long before the engine's 200+ variables and numerous equations become totally opaque to me, but that shouldn't matter because the 'front end' that I'll be using is very straightforward. I just need to enter some simple parameters in an INI file, hit a single key on my macro keyboard, and see the changes reflected immediately in-game. I configured most of the effects in the GIF at the top in a matter of minutes.
Performance is good too. 100 leaves on-screen, each wobbling to its own rhythm, twirling, pivoting, shrinking in and out, colliding with Spryke and more, consume just 45 microseconds per frame. Simpler particles like raindrops consume far less. On just about any PC with a graphics card, the performance will be negligible even at max settings.
One more piece of the puzzle done.