In a previous post I talked about how whole-body locomotion could be performed on void-sponge fractals using Mobius transformations. Since then I have made this Shadertoy game to try out how well the control techniques work.
Before getting into the control system I'll recap what is happening here. The controllable player is a 3D conformal-type. A conformal-type is the equivalence class of points under conformal symmetries, which in 3D are the 3D Mobius transformations. So unlike a shape, this is inherently non-rigid; it flexes.
The particular conformal-type in question is a void-sponge, built as the inversive limit set of 16 generating spheres in 4D centred on the vertices of an 8-cell and projected stereographically into 3D. You can use the vertices of other 4D polytopes too, like the 5-cell, 16-cell, 24-cell, 120-cell and 600-cell but the 8-cell is particularly convenient for keyboard control as it has right-angled symmetry.
All the forms of locomotion use only the arrow keys and A/Z for up/down. The main forms of locomotion by number of keys down are:
1 key: principle directions in screen space.
2 keys: steer the direction orthogonally as you go, or wheel shape for opposing keys.
3 keys: drill on long diagonals through ground
I'm trying this out across most traversable mediums, like air, ground and water. They each have their own nuances:
Ground
The ground motion uses a slight circulation of the sponge in the keyed direction, to bend the sponge to repeatedly tip in that direction. This is a sort of walking motion as it has gaps between ground contacts, allowing it to step over obstacles or holes. A small amount of vertical circulation is added on top for low speeds in order to help with getting the walk going. On smooth surfaces it is able to climb approximately 13% slopes.
You can press an orthogonal horizontal direction while your main direction is held to tilt the sponge, steering it in a circular path. It also supports the A/Z secondary direction, which tilts the circulation up and down. This can help in some cases such as getting started but is mainly there just for consistency.
You can see the simulated walking movement
here.
For smooth slopes a potentially faster way of moving is to roll. Pressing opposing horizontal keys adopts the wheel pose below.
A feedback controller to maintain balance and even steer such a wheel might be possible, but this is untested. The method just adopts a rigid wheel, so a large amount of skill/luck is needed to get a good roll.
The last form of ground control is just to crouch, which is key Z, circulating the sponge down slightly.
Water
This is performed as a circulation, which is the rotation around a circle whose normal is in the keyed direction of motion.
The secondary key steers the swim motion by adding a small circulation vector orthogonal to the direction of motion. For vertical swimming like the above animation a PD controller adjusts this orthogonal vector to maintain a tilt such as 20 degrees to the vertical. The same is the case with horizontal swimming with a vertical tilt.
For horizontal swimming with a horizontal tilt, the camera automatically turns to match the yaw of the sponge, consequently the sponge continues to turn making the secondary key a steering key, constantly turning the sponge as it pushes through the water.
The feedback controller works somewhat for surface swimming too. Normally the swim motion would pitch the sponge upwards when its top starts to be out of the water, but the feedback controller tries to correct for this, causing a bigger arc on the top and keeping the sponge near the surface. This is locomotion mode is undeveloped though, and surface swimming may be better achieved using the wheel pose (press A and Z) and a parabolic transformation of this.
Air
Flying is quite similar to swimming, but only uses the upwards A key as the primary direction. The motion is also faster to account for the lower drag of air compared to water. You can therefore press and hold A to begin circulating the sponge vertically, and then press the arrow keys to tilt the sponge and so fly in the respective lateral direction.
Due to reduced air pressure you eventually reach a maximum height and so move laterally even when holding A. You can only descend by letting go of A.
Underground
Digging is possible using parabolic transformations, a bit like this:
However the above is a 16-cell sponge, for the 8-cell the parabolic transformation directions are the eight long-diagonals. This is not as simple as digging in the principle directions, but has the advantage that you can use the 3-key combinations unambiguously.
This mode of locomotion is currently just a non-physical prototype, you can dig under ground in the different directions but resurface once you stop digging.
Summary
Unlike shapes, conformal-types are flexible and their range of motion allows for multiple forms of locomotion. For the 8-cell based sponge this seems to be particularly amenable to keyboard control where just the arrow keys plus A/Z allow a wide variety of motion and steering that is more-or-less the same regardless of medium: air, ground, water, underground. So this has plenty of potential as a game character or vehicle.
The main area that requires a bit more controller complexity would be the rolling locomotion, and perhaps trying different surface swimming options.