What it does
How a game responds to the stick is much of how it feels. A ship that keeps drifting after a tap of thrust plays nothing like a walker that stops dead, and a crosshair on a trackball plays nothing like one on the keys. This pack holds those differences as five small objects, each with its numbers exposed, so you choose the feel and tune it instead of writing the maths again.
The profiles never read input. Each frame the game passes a plain state, such as { left, right, thrust } for the ship
or { gas, brake, shiftUp } for the car, or a pointer delta for the spinner and trackball. That keeps the profiles
headless and testable, and it means a replay, an AI pilot or an on-screen touch pad drives them exactly as the keyboard
does. You map the keys yourself, or take them from controls-2d.
Presets carry values tuned by hand in the gallery's arcade tributes, named for the games whose feel they recall. Spread one into a profile and override what differs.
Features
- Inertial ship —
inertialShipturns the nose, thrusts along it and drifts with drag per second, with an optional speed ceiling and reverse thrust;thrustingtells you when to draw the plume, andmuzzlegives a shot's start and velocity, optionally inheriting the ship's own. - Direct mover —
directMovewalks eight ways with no momentum, diagonals no faster than the straights, and keeps itsheadingafter the stick centres, so the player fires the way they last walked. - Spinner —
spinneraccumulates relative input from a mouse, a dial or held keys, wrapping into a range when you set one. - Trackball —
trackballrolls from pointer deltas and carries on with drag after the hand lets go, with a speed ceiling and bounds that stop it at the edge. - Road car —
roadCarhas gears with a top speed each, gas, brake, coasting, steering scaled by speed, an optional automatic gearbox,revsfrom 0 to 1 for the engine note andcrash()to stop dead in first. - Presets —
SHIP_FEELS(asteroids,starCastle,mineStorm,mineStorm3d,solarQuest,ripOff,webWars),WALK_FEELS.cosmicChasm,TRACKBALL_FEELS.quantumandCAR_FEELS.polePosition.
Good for
- Inertial space shooters, a rock-blasting ship in the style of Asteroids, with brisk turns and heavy drag.
- Gravity and orbit games, where a ship with little drag is carried by the pull of a well.
- Eight-way maze and room shooters, with a walker that stops dead and fires the way it last faced.
- Tube and rim shooters driven by a spinner, as in Tempest, from keys or a mouse.
- Crosshair and missile-defence games, with a trackball cursor that rolls on after a flick.
- Behind-the-car road racers with gears and an engine note, in the style of Pole Position.
Make it yours
Every number is an option: the ship's thrust, turn rate, drag, top speed and reverse; the mover's speed and whether it snaps to eight directions; the spinner's key rate, sensitivity and wrap; the trackball's start position, drag, sensitivity, speed ceiling and bounds; and the car's gear speeds, acceleration, braking, coasting, steering and gearbox. A preset is a starting point, and you change only what differs.
Two quite different uses: a slippery ship for an open space arena, from SHIP_FEELS.mineStorm with a speed ceiling
added; and a five-gear road car with an automatic gearbox, whose revs drive the engine sound and whose drift feeds
the car's position across the road.
A quick look
A ship from a preset, with one value changed, driven by held keys and firing from its nose:
import { inertialShip, SHIP_FEELS } from '@phaser-ae/control-feels';
const ship = inertialShip({ ...SHIP_FEELS.solarQuest, maxSpeed: 500 }); // a preset, then what differs
game.step('ship', dt => {
ship.update(player, { left: keys.left, right: keys.right, thrust: keys.up }, dt);
if (keys.fire) spawnShot(ship.muzzle(player, 12, 420));
});
Works with
controls-2d— maps keys, pads and touch to the held state the profiles take.actors— the profiles move itsMoverobjects, and the ship drifts by its integration step.thrust-craft— for a ship with fuel, gravity and landing gear.vehicle-handling— for a car with grip, skids and surfaces.arena— gravity wells that bend a mover's path.
Good to know
- Each profile moves one player: there is no collision, fuel or gravity in this pack.
- The road car is a gearbox and a steering rate, not a vehicle model;
vehicle-handlinghas grip and skids. - A trackball's bounds stop the cursor at the edge and zero its roll; it does not bounce.
- The presets were tuned by hand, not measured from the original machines.






