Daniel and I are crunching a little bit this week in order to meet an internal deadline. (“El Dorado”, named after the mystical city that doesn’t really exist and has never been found; we only chose that codename because “Titanic” was apparently used for a Microsoft product.) We try to avoid it as a general rule – after Dredmor, which was released after we crunched for about three months, non-stop, the old batteries need time to recharge – and were more or less successful doing this for the Dredmor expansion packs; however, we’re a little bit behind where we want to be and we need to do a little sprinting until the end of June in order to get everything back on track.
Daniel is hard at work on aurochs this week – killing them, and butchering them for their meat. This led to twenty-five homicidal aurochs immediately rampaging your settlement and killing everybody before you have a chance to collect your firearm. He has subdued them… for now.
It also turns out that the singular form of “aurochs” is, actually, “aurochs”. Who knew? David, apparently.
You may recall me mentioning back in May, or so, that I’d started work on a particle system and editor for Clockwork Empires. At the end of last week, I had some of the particle system done but very little editor functionality, having promised that I’d “get to it, yes” – and then ending up doing things like, say, combat or more work on dynamics lines or any of the things that I would rather spend my time doing other than a particle system.
Finally, David started holding things hostage. FINE. Particle system. Right. Good. Editor? Writing? Blech.
Monday morning, I fixed the improperly placed oven issue noted in last week’s blog post and started in on the particle system editor in earnest. First order of business: figure out what the artists needed. This requirements document came in the form of a bunch of whiteboard work from Mr. Triolo, which was promptly turned into a JIRA ticket. The most important thing that everybody wanted, seemingly, was a curve editor that could control parameters over time. Other than that, I was given a large list of demands for emitter types, various things to control, and told to start writing.
Two days of frenetic hacking later, here we are.
Properties for particle systems are controlled by the curve controller in the lower right hand corner of the window. The X axis of the curve controller specifies time, the Y axis of the curve controller controls the value of the property (ranging from MinY to MaxY and MinX to MaxX, specified in the two boxes above the window.) You can add new nodes by clicking, and delete nodes by right-clicking. Some handy functions for setting the curve to obvious things (all zero, all one) are placed in the bottom right hand corner of the screen.
Complicated curves can be applied to things like velocities over the course of the particle system’s life span:
Here you can see some particle spray from when the system swung about. We can also support multiple emitters, and various boolean per-emitter settings including emitter type (point, sphere, cone, field, etc.), whether blending is multiplicative or additive, and whether or not particle sprites should rotate. All of the properties are modular, meaning that I can add new properties to the editor for new types of particle effects any time I choose with a minimum number of new lines of code.
Here is a multi-emitter fireball particle system featuring two emitters layered on top of each other. The first emitter provides the fire, the second emitter provides the smoke. Note, of course, that these are Programmer Particle Systems and so anything the art team makes will look much better.
Furthermore, since the importer and the particle editor run on top of the same windowing system which we use for all our windows (in-game and in tools), you can have them both open at once. The goal here is to be able to preview how particle effects will look on models and during animations.
I still have a large list of things to do before we can check off “particle systems” on the TODO list. We need things like attractors and repulsors, as well as more types of things that are ‘sort of’ particle systems (tracers and beams, for rifle fire and electrical current respectively), and we need the ability to tie particles onto key frames and key locations of a character’s animation cycle or a factory’s work. Still, it’s getting there.