Thanks very much
Thanks very much
Most of the work I've been doing recently has been under the hood stuff, by which I mean that I've been working hard, but have nothing actually to 'show' for it. I've been improving my internal level editor, performance, loading times, particle engine, and other stuff. I'm also almost finished converting Spryke's code into a fully one-frame MFA, where any level can be loaded at any time from within the same frame - no frame jumping necessary. This will greatly speed up loading times, will prevent FRAPS from stopping recording after each level, and will also make it quicker for me to work and test things
But I've finally got some nice eye-candy to show, as I've been doing some work on water effects over the past few days.
The water in Spryke's cave levels already looked pretty good, I thought, but I knew that I could do better. I always knew that the rippling movement wasn't quite right, and it could use some more dynamism and nicer coloring. This is what it used to look like:
This is what it looks like now. It's still not quite there yet, I don't think, but I'm very pleased with how it's turning out. Looks very pretty in my opinion.
There must be some 10-15 different elements going on there. The water itself is comprised of a few layers: a graphic layer, a shader reflection layer, and a distortion layer. Then there's the organic stone island and its reflection, which have to be positioned over the top of it (but a copy of the shadowed reflection must be secretly placed behind the water layer, so that it will be caught and reflected by the reflection layer - you can see its wobbly reflection below the island, but you can't actually see the source layer itself - it's 'visible' but is carefully hidden behind the actual island itself).
Then there are about 5 different groups of sparkle/shimmer elements, some of which are below the distortion layer (so they get distorted as if they are reflections), and some of which are on top (they remain circular dots or blurs). I control the alpha, scale, and positioning of them all programatically, using a library of various trigonometry presets that I made.
Finally, the position of the camera itself affects various elements, including the graphic layer of the lake itself, and the alpha and size of the various shimmer elements. This is what makes the water look like it goes from a calm, dark, blue when the camera is at left, to a bright, warm, highly reflective yellow when it's at the right. All of the elements are the same in each case, but their parameters change depending on the X position of the camera.
And even though there's more going on, it's actually significantly more performant than before! The cave levels used to bring performance to a halt on integrated graphics laptops, and the water was a major culprit. But hopefully it should be a lot better now.
I thought the first one looked great, but the second image looks amazing - great work there!
OK, I think I'm done with these for now. Here's what the final version looks like. Not much different than before, really. Some of the sparkles are less overt, but most of the work I did since the last GIF was optimisation work. On the event side of things (which includes all the maths, repositioning, calculating alpha, etc., but not the actual GPU sprite drawing) the whole effect clocks in at about 50μs per frame on average (games must fall under 16667μs per frame to maintain 60fps). I guess that's relatively expensive for a cosmetic element, but I think it's pretty good for a large and complex effect like this with so many moving parts, and one which will be easy to make optional for low end PCs.
My next stop is making a foreground particle system - you know, for things that float/fall all around the the screen in front of the character, like rain, snow, dust, falling leaves, etc. Those always seem to have a huge impact on how alive and enjoyable a game world feels. Can anyone suggest a game that does this stuff particularly well, that I can look at for inspiration and ideas? Ori and the Blind Forest already comes to mind - but I'm looking for other suggestions too! Also, what sort of particles do you think would make sense in a large cave world like this one?
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 camera system to handle story sequences and other things, 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 parallaxed 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 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 in-game for an autumn effect. 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.
I also made use of a library of prebuilt rhythms that I added to Spryke's engine earlier this year. Using these readymade rhythms I can easily add variety and specific behaviours to the way particles move, scale, or fade:
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 particle engine's 200+ variables*, 400+ events 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 - I still got 120fps when I tested 1000 raindrops on-screen (way more raindrops than I'll actually use). On just about any PC with a graphics card, the performance should be negligible even at max settings.
* My particle objects contain 96 alterable values while my main particle engine object contains 110. I honestly don't think I could have done this particle engine before 2.5+ and its expanded altVal limit. It was complicated enough as it is - if I had had to divide up each particle object into 4 separate objects holding 26 altVals each, or use unnamed altVals, I just don't think I could have done it. Performance would have suffered, and more to the point, my brain would have exploded in despairing protest.
Wow what a professional outcome, just amazing
Wow is the only word I can think of too! Such determination and attention to detail!!! Well done for achieving all that!!!
and there's me standing on my bed & looking to the sky, thinking I'm "elite" after performing 2 find commands on a string
you continue to inspire me with your fusion skills Volnaiskra. keep up the great work
Just absolutely stunning. A beautiful example of what can be achieved with talent and commitment.
fnkycoldmadeanr >= Impressed
Set fnkycoldmadeanr to Medium+Bounce Clap
Very nice Vol that rhythm system is interesting. Also you must be Officeworks no. 1 customer