Freedom of Motion Alpha 4

by Taylor Hadden | 0:01

A Refinement Update

It’s been seven months since Alpha 3. A bit long, but we’ve been keeping busy.

The advent of the fully-featured Personal Edition of Unity 5 let us integrate the Mecanim inverse kinematic solution. The motion and behavior of this system was dramatically different from our previous home-brewed solution, and that meant that we had to edit nearly every part of the climbing code, sometimes significantly. We also spent a lot of time looking for and ironing out jerky transitions between motions. The result is a feature set that isn’t all that different from the last alpha, but we hope those behind-the-scenes changes make the gameplay as a whole more enjoyable.

We did add a few new features though: falling damage, death, and checkpoints. Simply put, landing from too high a height will kill you, though you can hold crouch to roll when you land and cushion your fall considerably. This makes high places feel particularly precipitous and lends a new dimension to levels. We also made movement over half meter blocks and stairs much smoother, and you no longer stutter-fall down them.

Included in this release are three levels: Pillars, The Pit, and Tower. Their alphabetical order is also their order of difficulty (and Tower is very difficult). They all assume that you’re familiar with the controls, so check the readme included in the download.

An incomplete changelist, in no particular order:

  • Added a couple new textures
  • Added the ability to generate levels with a different starting texture
  • Entity and player data can be arbitrarily stored in a level (supporting custom player information per level)
  • The player now saves the last spawn point it touched and will spawn there upon death
  • Integrated the Unity 5 IK system
  • Sprinting has different maximum values depending on which direction you are going
  • Ledges now track obtuse corners
  • Ledge information is used to facilitate going up and down half-meter blocks and stairs
  • Moving into a ledge hang or cling now uses spring dynamics to preserve momentum and provide a smoother transition
  • Made it so hands must be a minimum distance from one another
  • Hands moving on a ledge accelerate out of a standstill
  • Feet transition between ledge positions more smoothly
  • Fixed several cases where you could mount a ledge at inappropriate times (such as through walls or behind you)
  • Fixed an issue where when moving laterally between ledges you sometimes moved too far
  • Added back the ability to edit blocks on the octree grid by holding Alt
  • Added the ability to climb up and vault into gaps that are at least 1m high (previously only allowed for 2m gaps)
  • Added falling damage
  • Added damage from going too fast (allows for death by bottomless pits)
  • Pulling up onto a ledge first separates your hands to an appropriate distance. Which hand is chosen by which direction you are trying to move.
  • Holding the high profile button (sprint) speeds up all ledge movements
  • Added a threshold where if you are going too fast when you grab a ledge, you take damage. If you are damaged past a certain threshold, you cannot hold onto ledges and will fall.
  • Made it so that you can vault up 1 meter ledges without holding high profile
  • Some motions require that the player has settled somewhat into a static ledge hang before they can activate
  • Fixed a bug where settings weren’t being reverted and applied correctly in the Options menu
  • Restricted the player’s head while hanging from a ledge so that you can’t clip the camera into the wall
  • Fixed an issue where if you transitioned from a slide to a crouch in a 1m high tunnel the camera would clip into the ceiling
  • Fixed an issue where going around a ledge was blocked if the ledge was .5m wide and next to a wall
  • Added a soft-targeting system to ledge jumps where the jump will try to sent you in the appropriate trajectory to land on the ledge you are looking at.

Future Plans

For the next release, we will be focusing on improving the editing tools. This will include a new tool for editing voxel data, an interface for selecting what blocks you have selected, and an interface for browsing and placing entities like lights, text, and spawn points. We also have a custom material editor in the works that will let us quickly create new block types. We’re trying to keep the scope of this cycle a little more controlled, as it took a little too long to get this update out the door. As with the previous alpha, you can follow our progress on Trello.

Freedom of Motion Alpha 3

by Taylor Hadden | 19:03

The Climbing Update

The time has finally come for a new release! Alpha 3 brings a host of changes, but the centerpiece is the new climbing system lightly discussed in this post. In short, you can climb on any ledges found in the voxel data surrounding the player, dramatically opening up the movement possibilities within a world. As always, this is very early software, and all assets are placeholder “programmer art.”

An incomplete changelist:

  • Support for climbing on ledges, including
    • Individual control over grabbing a ledge with your left and right hands
    • Pulling up from ledges
    • Moving between ledges and around corners
    • Jumping from ledges
    • Vaulting over ledges now uses the hand button inputs
    • Drop to hanging from a ledge from above from a crouch or slide
    • Full network support
  • Block editing is no longer constrained to the internal octree grid.
  • An air “woosh” sound was added when moving and falling quickly
  • Arm and leg IK algorithm was made more consistent and reliable
  • Separated editing features into a distinct editing mode
  • Added flying when in editing mode
  • Greatly reduced the chance of the camera clipping into world geometry when crouch-walking into a 1-meter gap
  • Pausing the game actually pauses player movement and behaviors

Future Plans

The the focus for the next release will be on polishing the movement system and making it feel more like you are controlling a living creature. This will involve slowing many interactions, such as climbing along and between ledges, and smoothing any elements that are still rough around the edges, such as moving up and down stairs. Additionally, falling damage (and death) and level checkpoint mechanisms will be implemented. Along with that, we will also be developing more levels for you to explore, and we hope you do to! As with the previous alpha, you can follow our progress on Trello.

Update: Climbing Ledges

by Taylor Hadden | 16:12

I have a bad habit of not posting updates here on anything like a regular schedule. This should change going forward, and I plan on having new blog post at least once a month if not more. The next alpha is not quite ready to go, but I do want to give you a little peak into the new climbing features I’ve been working on.

Tracking Ledges

To my knowledge, there are two common ways of determining what is climbable in a game. The first involves constantly checking the surrounding collision looking for something that the system considers to be a “ledge” or other climbable object. This has the advantage of theoretically working for any terrain, but can be difficult and computationally expensive to implement. The other – and I think more common – approach relies on hand-placed logical nodes that tell the system that a certain surface or ledge is climbable. This is often more reliable, as ledge traversal code can ask very specific questions to tailor-made objects, but it has the disadvantage of requiring a human to mark all of the objects that the player can climb on.

Freedom of Motion now features a hybridized version of those two approaches. The game analyzes the immediate area around the player, using the voxel data of the world to discover ledges. It builds a collection of Ledge objects that keep track of how wide and how deep the ledge is, as well as the distance to the ground from the ledge and a few other pieces of relevant information. With this map of the immediate area, the climbing code can make simple queries against a relatively stable set of information.

Ledge Debug View

Here you can see a debug view of the ledge data around the player, with the discovered ledges highlighted in green. The green wire box denotes the search area for the system. Ledges are built and recycled as their terrain enters and leaves the search area. Since this information is cached, we avoid expensive physics-based computation such as the ray casts and capsule casts that powered the previous vaulting functionality.

Using Ledges

In theme with my previous post concerning code dependencies, the code that generates the ledges and the code that uses them are separated from each other. The state machine that manages all of the ledge-related movements expects a simple interface injection (ILedgeCollection) and knows nothing about the underlying voxels. A separate object (FoGLedgeCollection) implements ILedgeCollection and handles traversing the voxel octrees and responding to data changes. This separation of two very complex concerns means that the movement code isn’t tied to a particular data source; it doesn’t care how the ledges got there, just that it can read them.

Currently, the system supports vaulting over ledges, hanging from ledges with one or two hands, leaping from ledges, climbing up ledges, climbing between ledges, and dropping to a ledge from a side or crouch. Still to be added before Alpha 3 is network support for the climbing code so that remote players appear to be performing the correct actions.

In addition to climbing, this data can be used in other ways. For example, the current core movement system has severe trouble with standard steps. Eventually, the ledge data will be leveraged to allow the player to move smoothly up and down half-meter gaps. As always, you can follow my development via the release’s Trello board.

Freedom of Motion Alpha 2

by Taylor Hadden | 1:19

The primary feature of this release is multiplayer support. You can start up a server running a world on your local machine and others can join you in building and running around in an infinite world. Unfortunately, this build doesn’t support worlds from Alpha 1, but any worlds created in Alpha 2 will be supported in all future updates.

An incomplete change list:

  • User-defined settings for control preferences and input
  • Spawn points
  • Light nodes
  • Text nodes
  • Infinite worlds
  • Multiplayer support
  • Ability to change player color and name
  • Faster chunk mesh generation
  • Improved accuracy for detecting ledges
  • Improved handling of sliding
  • Smoother transitions out of jump landings
  • Balanced wall running distances and height

Once again, this is very early software. All models, textures, sounds, animations, UI, and many implementations are placeholder. While I’ve endeavored to make it as stable as possible, things may break with no warning and data may suddenly become corrupt. It shouldn’t melt your computer, but use at your own risk.

Download Links

Freedom of Motion Alpha 2 — Windows

Freedom of Motion Alpha 2 — Mac

(Note that Safari has issues with Mega. Here’s an alternative Mac link)

Future Plans

Sharing a disturbing amount of details about a project’s development seems to be in vogue these days, and I want to run an experiment. I’m going to open up the Trello boards I’m using to manage development to the public so you can see exactly what I’m planning to finish for the next release and how those features are progressing.

For Alpha 3, I am focussing on exploiting the wealth of voxel data in order to inform the movement systems. This should let me fully develop the climbing system to include hanging on and moving along ledges and climbing from one ledge to another. Additionally, the system should eventually allow me to fix the issues the current system has with stairs, doorways, and small gaps.