Weekly Update - Skills, Special FX, Projectiles

Over the past few weeks I've been working on the Skills, Client Special Effects, and Projectile systems - and those systems are finally starting to work well in concert together.

Work to add combat to Antilia is continuing along, with AI Behaviors and creature spawning now mostly complete (there are still a lot of AI behavior nodes to add and probably some surprises still lurking). Lately my attention has turned more toward the game's Skill system, combat mechanics, visual effects, and getting projectiles to work.

Skills System

While the Skill Grid was added to Antilia quite some time ago now, there haven't been a lot of skills added to it since then. It is good to finally see all the pieces I need coming together and I am excited to put them to use soon. Skills are now capable of triggering effects and launching projectiles, projectiles are flying around on the client, and those can trigger more effects when they hit something.

Note:I don't have any suitable effects designed yet for the iichii to attack with. What you see in today's screen captures include a variety of ClientEffects (see heading below) being tested. The  iichii may eventually get a 'spit acid' attack - but they won't be shooting magic crystals at you like you see in some of the images below. Magic crystals were a handy way to test that projectiles orient correctly and were easier to see than using arrows. And those explosions? Those are pearls with a bit of animation. :))

All the parts are coming together, now I just need to arrange them into a working combat system. The response time of the multi-threaded server does have me a little concerned about how combat will play and feel, but after a bit of discussion a couple weeks back I think I've got some good ideas for that.

AI Behaviors can now invoke characters and creatures to use combat skills against hostile targets.

Special FX (ClientEffects)

The effect system isn't only useful for combat - in just a couple weeks of development it's become one of my favorite new tools. I wish I could have implemented it sooner as it provides features that would have made developing systems like fishing a fair bit easier (I plan to go back and clean up that code to use effects for things like casting and hooking fish.) I expect this system to see a lot of use in the future as I polish things up more. I can trigger an effect in response to anything - running, jumping, landing... Passive skills like double-jump might trigger an alternate effect to play at the character's feet when used to jump mid-air. Eating food or drinking a potion could trigger an effect (with the effect resource file being specified by the food or potion).. I don't know if it's coming across in this writing, but I am super excited by the new effects system and I am spotting use cases for it everywhere.

A snippet of what an effects file looks like. It's probably more exciting for me than anyone else, but oh boy is it exciting!

A great thing about the effects system is that once I build up a library of effect files to use, playing them only requires a single line of code from the client or server like playEffect(effect_filename, target_id) or playEffect(effect_filename, world_position).

Effect Animation System

One thing I discovered quickly is that effects frequently need a bit of simple animation. Initially I started out with a few layer types offering animations on key properties (such as adding a setting to lights that causes them to fade in or out after being activated), but as I continued to add effect layer types I realized there was a better way. The Toi Engine features an ancient practically forgotten system for animation that I haven't been making good use of. I decided to reacquaint myself with it and in just a few hours of development I had a very robust system of animation working for all current and future effect layers.

I don't have an editor for these files, but I was able to come up with a straightforward way of describing animation in the json file. (If these effects get too complicated I may consider an editor later on down the road.) It is a full-fledged animation system in that it provides support for multiple channels, keyframes, seamless looping, different keyframe interpolation types (trigger, linear, or spline) as well as simple ease-in/ease-out options. All of the advanced animation features are now supported in the json file, although for simple animations you typically don't need to specify them.

Adding animation to an effect layer is as simple as adding an "animation" section to the json file and listing keyframe values indexed by time for the layer properties that change.

Effect Layers

So what can an effect file do? A lot! Here are the layer types I have currently have working (the "bread and butter" effect layers):

  • Audio - Play an audio file at a location. Gain and Pitch can be animated.
  • Light - Add a point light to a location. Light color, range, and intensity can be animated.
  • Mesh - Display a mesh at a location. I can't yet animate individual material parameters but I plan to look into adding support for that soon.
  • Particle Field - Displays a particle field. Most parameters that go into the particle system can be animated.
  • Chat Bubble - Used mostly for testing/debugging, but it might have other uses.

And here are some more effects I'd like to add soon:

  • Damage Indicator - Add a damage indicator in front of a target to indicate damage or a status effect has been inflicted.
  • Play Animations - Cue an animation to play on a creature or character after a fixed delay. Use of this might have some caveats if two effects try to play an animation on the same character at once, so I'm still brainstorming this a bit.
  • Camera Shake - Shake the camera around in response to events or as part of the "footstep" effect for larger creatures.
  • Projected Texture - Project a texture onto static world geometry. (For impact marks, footprints, etc.)
  • Environment Settings - Temporarily override environmental settings like fog and global lighting in a local region.
  • Post Effects - Temporarily add a post effect filter on the camera.


As you've already seen in the screenshots above projectiles have been added as well. There is an action layer that can be added to Skills called LaunchProjetileAction that will launch one or more projectiles, and it can be used multiple times with different settings to create complex patterns of projectiles launching in different directions. Projectiles have settings for air resistance and gravity, and use the effect system to play an effect at launch, for the flying projectiles themselves, and upon impact.

There are a few more things I'd still like to add to projectiles, such as homing projectiles and better control over the collision boxes.

That's all for this week, thanks for reading!