Water Effects


Wow, three blog posts in two days, hooray!

I need to do a couple of water effects. In particular, I need ripples to spread out from the player, and I need a splash sound effect.

The first thing I tried was the splash sound effect, which I created by just using a "step" sound effect. It's amazing what you can create in sfxr, and I have actually a reasonably watery swoosh. However, what I shortly realized is that this is once again a prime candidate for a sway simulation-based sound effect, like with the bushes and trees. The way that step sound effects work, however, is much different and won't work with a sway simulation very sensibly.

And it won't solve the problem of needing a graphical effect, either. For that, I could perhaps implement an API for specifying water ripples on a stepping-on-surface, or something along those lines.

I think what I need, however, is different than either of these solutions. I think what I need is an "interface" drone. An interface drone is one that will be spawned whenever an object with sufficient inertia steps on a watery tile. The interface drone itself creates an object (call it a splash) that tracks the object's position. This splash also has a soundable attached to it.

I think this all can be reasonably managed within the existing framework. What I'll do is create a global "splash manager" drone. This drone type waits for an object to step on a watery tile, and if it doesn't have a splash associated with it, creates one.

Best part is that I think I can do this entirely in LUA, without any additions at all, which is fabulous! Hooray for LiveJournal posts, when I started this post I actually wasn't sure how to approach this particular problem.

2009-07-26


◀ Back