Game Design Deep Dive: Creating Falcon Age's feathered companion

Sept. 17, 2018
Game Design Deep Dive: Creating Falcon Age's feathered companion
Game Developer logo in a gray background | Game Developer

Outerloop Games is a Seattle-based independent video game studio currently making Falcon Age for PlayStation VR and PS4. 

We recently announced Falcon Age, a game about nurturing a falcon from a baby, bonding with them, and together resisting the forces that colonize your planet. Falcon Age will be out in 2019 for PS4 and PS VR.

We showed off the game at PAX last week, got a great response, especially on the falcon. Let’s do a deep dive of the design of the falcon, animation and rig setup, AI and navigation, feather tech, and raptor sounds.

Falcon Design

Chandana Ekanayake and Darran Hurlbut

Our falcon design combines multiple raptor types. She is big as a golden eagle, fights like a hawk, has some eagle-hawk resemblance, some owl-like tufts, and falcon tendencies. She’s one of the last of her kind left in our world and we wanted to make her unique visually for the story and also visually stand out during gameplay against the sky and desert like environments.

image
image

One of the early inspirations for Falcon Age came from videos of golden eagles hunting large mountain goats. That led to some research on falconry and the idea of having a falcon as a pet and designing mechanics and gameplay around that core idea. We made a rough prototype early on to test out the ideas. The first time we successfully whistled for the bird in VR and saw the scale change from it approaching from a distance to landing on our hand, we knew we were on to something that could serve as the core of a unique game.  

Animation and Rig

Aung Zaw Oo

image

FALCON FEET TRACKING

There are lots of animation options out there, but none of them would easily solve our specific falcon feet tracking needs. Inverse kinematic setups, root motion and other complex plugins could do the job if we had a bigger team and more time to dedicate to it. We wanted a more predictable outcome so we went with a multiple pose based solution made in 3ds Max.  

However, the biggest reason for not using IK, is that this is the best way I could come up within a couple of days. We were building the prototype so fast back at the beginning of the project that we didn’t have time to look at what other solutions are available. This is the most reliable and least ugly way I found and we’ve stuck with it since. If it’s not broken, don’t fix it.

Here is how I imagined the bird claws blending IRL. The ball is the fist that is attached to the VR motion controls.There are limits to this method. The claws needs to be able to wrap around a fair chunk of the fist and the fist pose needs to be as spherical as possible.

image
image

Note that head and legs are siblings of the pelvis. This makes the bone masking and making separate blend trees easier. Ignore the word ‘eagle’ in the naming. That was just a temp asset name before we figured out the bird design.

image

Short version of how its done; the fist is a ball and the bird’s feet rotate around the ball using 30 blend poses and shuffle animation to get the feet back to center when the ball(motion hand) has rotated too far. 

30 Blend Poses on a ball

image

A shuffle animation let feet recenter

image

And the the blends start again after that quick shuffle animation from the new rotation of the hand. According to our programmer Justin, he is doing some regular old quaternion and linear algebra math. And I’m using 3 float values that he’s giving me and feeding them into those anim blend states.

For baby bird, the 2nd knuckle on the index finger is treated like a ball. 

image

The one edge case where the ball concept doesn’t work is when the glove is pointed directly down. Pictured below.

image

We had several ways we could’ve dealt with that case. One solution was to have a collider on the forearm part of the glove and have the bird fly away if bird’s collision intersects with it. Ultimately we decided to let it be as is. It’s more player friendly that way since it lets you scratch your left hip while in VR without having the bird leave you. Also most people would never have their hands positioned that way in normal play. 

Unless they’re playing in a headstand for some reason. All kinds of animation features would look wrong or broken in a headstand.

image

FALCON HEAD TRACKING

Short version of how its done; the head (bone_Head) is a direct child of the highest object in the bird skeletal hierarchy ( bone_Root ).

Bone_Root’s position(not rotation) follows the position of the motion controller and bone_Head counters that motion. Basically a 2-object hierarchy where a positional blend is used to counter motion of the parent object to keep the child object in same global position. The rest of the bird body uses a blend of 27 poses to try its best to keep the bird looking natural.

image

With the size of the adult bird we have, a 12 cm translation in all axis(24x24x24 cube) seemed ideal for getting the stabilizer effect without stretching the neck too much. The head will also move at the edge of that range and when the motion hand stops moving, that new position is now the new center and another 24cm cube is formed there.  Math wise, headlock is mostly just a vector transform with a lot of extra ‘fluff’ for limiting speed, transitioning in and out, and moving the lock point when it gets too far from the body but the bird is still in the area.

image

Justin LaLone

BIRD BOREDOM

For the most part, the falcon obeys Ara’s commands and follows her around.  If you stand around long enough in one area while the bird is just circling or if you launch her with no orders, she will start looking for something else in the area to do - usually hunting or landing on a point of interest.  She will also take some initiative when perched on Ara if anything else tries to grab her (she’s possessive like that), and likes to help lead Ara to the next hole in lightning golf.

SUN BLINDING PREY

Some of the prey, such as the rabbits, are very skittish and as soon as they notice a falcon diving towards them they will take off for the nearest bolthole.  They have a more difficult time seeing Ara’s bird if she approaches with the sun behind her, so paying attention to where the light is coming from and sending the bird from that direction can make catching prey easier and more reliable.  On the other hand, simply diving from higher up can be good too, as the bird can pick up more speed before being noticed, giving her prey less time to dodge out of the way.

image

Coming in fast and and from the sun, for a guaranteed hit.

FALCON 3D NAVIGATION

Getting a flying animal to reliably traverse a 3D space in a somewhat natural looking way isn’t something you typically find out of the box in a game engine.  We have roughly three levels of bird-navigation logic going on to get the bird from point A to point B without running into too many things or getting stuck in a corner.

image

For high-level navigation to find its way through the world, we build a 3D navigation graph and use A* to find a path.  What’s probably somewhat unique in our implementation is that we are using the fairly new Unity job system to do all our A* pathfinding, giving us fast searches that stay off the main thread, allowing more time for other AI, physics, and more stuff in general.  Most of the graph is generated automatically, with manually placed connections for flying through narrow gaps like windows that are small or require an approach from a good angle.

image

The purple line is a rough path for it to follow to get around the big rocks in between where the falcon started and where Ara is standing.  The bird doesn’t try to follow this line very closely; it would be trying to make some pretty strange and sharp turns if it tried, so as soon as it has a clear shot to the next part of the path it heads there instead.

image

Sometimes smaller objects or moving objects can get in the way.  The falcon looks ahead and goes over or around these objects.  This rock is actually just big enough that it would normally navigate around it with A*, but I forced it to "forget" about that for now.  Here, it’s turning left to go around the rock - the red lines show where it has been looking for the past few frames.  It usually won’t try to go under things in this way, but the A* navigation can direct it to go under arches or walkways.

The last level of bird flight logic is the actual maneuvering logic, or how the bird decides how fast it wants to go, how much to ascend or descend, how quickly to turn, and how it applies physics accelerations, limited by what it is allowed to do, to get there.  This feeds into the animation system telling it how hard the bird is working, what sort of pose it should be in, if it should be banking, etc.  The object avoidance is tied in somewhat strongly with this, but all the A* navigation is completely separate.  It is also a big pile of math and logic.

Feathers and Rendering

Ben Golus

The small body feathers, or contour feathers, on our birds flutter in the wind, and react to the player’s hands brushing against them to give a greater sense of tactile interactivity. The way this was done for the PAX demo is a bit of a hack which I hope to replace before we ship. (This of course means it’s the solution that will ship with the game.) The short description is each small feather on the bird is a treated like many grass or vegetation shaders. Several overlapping sine waves are used to calculate some simple noise used to flutter the feathers and give them some life. Their timing is offset by a random value per feather stored in the vertex color, and the flutter movement is scaled also using the vertex color. This means the base of the feathers don’t move, but the tips do. It also means longer feathers move more than shorter ones.

image

Unlike most grass shaders, we need the feathers to not move in random directions, so we can’t use world or local space directions. Plus this is on a skinned mesh which makes the direction even more dynamic. Instead I use a combination of the feather’s vertex normal and tangent so the feathers flutter in and out and side to side relative to their orientation. This isn’t strictly accurate, but for small movements like this it won’t be obviously wrong.

To handle hand interactions, the player’s hand has a script which tracks the bones and creates a list of capsules that follow the shape of each finger, and a sphere for the palm. If the hand is in range, the vertex shader iterates over the list of capsules to find closest distance to one and softly scales down the flutter if a capsule one is overlapping it. The feathers are also squished down towards the body. The capsules are oversized as the overlapping tests are soft, so this isn’t an instant on-off, but a gradual change. It’s roughly tuned so that once the visible finger is touching the feather it has stopped moving entirely and will push down.

image

Here’s an early test of this system in action. You can see how the feathers react to the sphere before it actually touches it, but the interaction is still convincing.

image
Tags:

No tags.

JikGuard.com, a high-tech security service provider focusing on game protection and anti-cheat, is committed to helping game companies solve the problem of cheats and hacks, and providing deeply integrated encryption protection solutions for games.

Explore Features>>