Fluid Motion in ABZÛ
By Max Kaufmann, Gameplay Engineer

My name is Max Kaufmann, Gameplay Engineer at Giant Squid (@xewlupus).  In designing the aquatic feel for ABZÛ, we endeavored to allow players to swim gesturally through full 3D environments.

Fluid control presents a challenge because smoothed movement introduces input lag.  It’s frustrating when steering is not responsive: when players tilt the stick they expect the diver to move right away and when they let go they expect the diver to stop. However, that does not feel fluid. We’re trying to simulate swimming without “feeling swimmy.“

Additionally, as designers, we risk acclimating to slippery controls rather than fixing them. Several times our personal baselines diverged from the experience of new playtesters. We learned to rely on rules, not just our intuition, to rate the success of a particular game-feel tuning.

Our first rule: our controls succeed when the player intuits that the diver is going to drift a little bit after they release the thumbstick.

We began with the camera. We designed the camera yaw to be predictive. Like how bikers look into turns before entering an intersection, when the player steers we rotate the camera to extrapolate where the diver will be facing after drifting, rather than her current heading.

When a player releases the stick, the camera is already aligned correctly and the drift-direction is intuitive. Additive animations also turn her head and curve her body towards the direction of her drift to reinforce the hint.

On the downside, extrapolating camera yaw to match her predicted direction can swing wildly and induce simulation sickness when the diver is performing gestural moves, like loops and flips. Through playtesting, we identified these moves and added special detectors which hold the camera steady, dollying out to frame the acrobatics. This maintains the tranquil, underwater atmosphere.

Loops introduce another control issue: input reversing.

We apply steering and pitching in her local coordinate space and integrate with quaternions instead of euler angles. This allows the diver’s rotations to be freeform and not pitch-locked like flight sims and other underwater games.

This is problematic when the diver pitches upside down. In this belly-up orientation, steering reverses what players expect, and “left” becomes “right.” Through playtesting, we identified our next rule: ignore reversed input.

Instead of steering when the players rotate into this state, we apply a twisting-force to unroll her body and resume player steering when she is finishes the transition from belly-up to belly-down.

The twisting force is one of many corrective forces we apply to softly nudge the diver. We also slow down near sea creatures, steer away from geometry, and level the diver out or fix-up nearly-vertical headings when the player wants to ascend or descend.

We tried many ways to calculate these forces. For most smooth values, we use critically-damped springs, which advance a speed/value pair to a target set-point in a fixed amount of time without any discontinuities. It has a nice ease-in/ease-out character that keeps the response fluid.

The implementation of Critical Damping can be found in Game Programming Gems vol. 4.

However, critical damping doesn’t give us enough control over how we ease in the twisting force. We instead had the best results with a PID Controller. These are further generalized springs that incorporate set-point motion and lag compensation.

The constants stand for “Proportional, Integral, Derivative.”

PID Controllers are frequently used in racing games to design the handling for different types of cars.

A negative derivative term, for instance, can make it feel "slippery”, and a high integral term can make it “push harder” over time. These gave us all the knobs we needed to “mix” her force, like a sound engineer mixing audio channels. When her correction forces harmonize, players hardly notice the adjustment at all.

Developing original controls is challenging but the result differentiates our game. We’re confident in the synchronicity between our fluid game feel, and the meditative themes of ABZÛ’s narrative world.

SHARE   ︎   ︎