099 - More Gameplay, More Quickly

December 27, 2020

This week I fixed a long standing issue with how skeletal animation worked within my engine.

Previously, my script that exports bone data from Blender would export the transforms in world space and did not export the bone hierarchy.

This was fine if you only ever played one animation on a character at a time, and if you didn't modify any bones at runtime.

But if, for example, the lower body was crouching and the upper body was punching, the upper body would not move downwards along with the lower body since none of the bones were parented to each other.

Similarly, an additive animation that bent the torso wouldn't transform any of its descendants in the bone hierarchy.

I now export bones keyframes from Blender in their local spaces, along with a bone hierarchy that points to the parent of each bone.

The engine's skeletal animation system uses the local space transforms and bone relationships in order to calculate each bone's world transformation at runtime.

This fixes issues such as separate upper and lower body animations creating strange deformations.

The upper body playing a fire bow animation while the lower body plays a walk animation.


This week I introduced the ability to aim at a different area depending on the enemy.

Here's an example of aiming at a snail on the ground vs. a flying swarm of moquitos.

Depending on the enemy that you are firing at you will aim your bow at a different height.

This boiled down to re-using the existing engine support for defining points on renderables, and then adding some support for being able to aim at one of these defined points.

Human Rig

If you look carefully in the video above, you'll notice the arms moving weirdly at around the 8 second mark as the player is moving while firing a bow.

This is due to the fact that the Rigify rig that I am using for the human does not have proper bone relationships set up between the deformation bones.

I've started working on my own rig in order to address some of these issues. I've even made my first IK-FK switch using Blender drivers.

I'm having fun with this.

When it's done I plan to at some point write a Blender addon to automate IK-FK snapping in a way that makes it re-usable for any armature.

So far I've only experimented with writing a basic Blender addon in Rust just to see if it was possible.

I'm expecting this to be my first serious Blender addon that I write in Rust.

Adding More Gameplay More Quickly

My mindset right now is to stay patient from week to week as I add in new functionality.

My mindset is that I am carefully setting a foundation now for being able to release gameplay features at break neck speed later.

Over the last two months of journal entries, almost everything that I wrote about while working on making the Bowman experience better were general purpose engine features that I needed to write. in order to power new gameplay

That is a big cost, but it will pay for itself as I add more game play and re-use these systems that took so much up front work.

With features such as separate animations for different bone groups, aiming via additive animation and attaching equipment and other objects to characters, the functionality around skeletons is at a place where I can easily do quite a bit.

There is still more skeletal animation related functionality that I will want over time, and a few broken aspects of animation that I need to patch, but by and large I am in a good position when it comes to things related to skeletons.

There are a few other key areas that I think need to fall into place before I can truly prototype and release fun game play at a pace that I am happy with.

  • Editor - Easy place and move and edit entities and scenery.

    • Placing scenery and placing enitites were introduced in 082 and 089, so I mainly just need to iterate a bit on making them fluid.
  • Editor - Easy to shape and texture terrain in the editor.

    • Sculpting and painting terrain were introduced in 084 and 085, so this is another one that just needs some polishing and cleanup iterations.
  • Editor - Easy to edit the ways that one or many game tiles can be traversed within in the editor.

    • This has not been started.
  • Asset Compilation - Automatically generating icons for all game items by rendering them to PNG files during asset compilation.

    • This has not been started.
  • Gameplay Systems - A general purpose crafting implementation that I can then leverage in different ways in order to power different skills under the hood.

    • I have an existing simple crafting system, but this will likely need to be built from the ground up based on what I have in mind functionality wise.
  • Gameplay Systems - Implementing dialogue and cut scenes support more robustly using things that I learned while implementing the coordinated sequence system in 092.

    • This will take elbow grease, but it should be more of a re-organization of existing concepts as opposed to a complete re-write.

I do not plan to work on all of these at once. I don't even plan to make any of them a main focus.

I am committed to having my focus from week to week be on improving the Akigi game play experience. Adding more and more fun things to do.

Any engine or tooling improvements that I work on from week to week need to tie back to the specific gameplay feature that I am working on at the time.

So, for example, when I'm looking to add in the models for the first village in the game I will in turn spend time improving the editor user experience for placing scenery.

By focusing on gameplay instead of tooling I will avoid the pitfall of getting blinded by my addiction of building tools and thereby delaying the day that I look forward to where I can release Akigi to excited players and see it become a sustainable project that I can focus on improving for them full time.

Other Notes / Progress

I continue to get more comfortable in the art realm as I practice daily. It will be nice to look back in a year or two or three as my skills grow.

Next Journal Entry

If you're attacking while moving your lower body walk animation stutters. I know the fix for that and it should take a couple of hours.

I also need to move the pose marker that controls when the bow recoils when you fire it, because it currently recoils too early.

Earlier in the month I mentioned having some ideas around a Voodoo skill. They are still on my mind, but I'm going to hold off on prototyping them.

I want to continue improving the experience around Bowman until it becomes an aspect of the game that feels fun and worth playing on its own.

Note that making the Bowman experience better will naturally lead me to introducing and improving other aspects of the game and its engine.

For example, this week I want to start working on ways for players to make a bow and arrow in Akigi. This will lead to the introduction of a couple of new skills.

Those skills will lead to the introduction of new systems and engine features that will make it easier to make and improve Akigi.

When this approach of focusing on trying to improve Bowman begins to give diminishing returns, I will turn my attention towards another aspect of the game.

Over time this approach should lead to more and more aspects of Akigi feeling fun enough to engage with on their own.

And by having everything that I work on tie back to some driving focus, it should help to make sure that different aspects of the game feel consistent and connected.

I will also be working on a new human mesh and armature now that I am ditching Rigify.

Technically making new meshes isn't necessary as I only need a new rig, but I want to benchmark myself artistically and this feels like a fun way for me to practice.

Last time I made the human model I followed along with a tutorial. This time I am planning to just keep a few reference images open but work in a more self directed fashion.

Cya next time!