KICKBACK: when the gun is how you move
· 5 min read
KICKBACK is a small pixel-art shooter set on six floors of an unfinished tower over the harbour, with downtown across the water. You carry a sawed-off shotgun with two shells in it, and the shells are your legs. This post is about how that idea works in numbers, and about three bugs that made the fights feel wrong for reasons nobody could see.
The gun is the movement system
Fire the gun and you get pushed the opposite way from where you aimed. In the code the kick is a single impulse of 10.8 against gravity of 27, applied directly against the aim. Shoot at the floor and you go up, about half a storey for one barrel. Fire both barrels quickly and you reach 27 metres a second, which clears a whole floor through the stairwell. Fire into a wall beside you and a muzzle-to-wall check adds up to 5 more, so a diagonal shot into concrete is a real wall jump rather than a nudge.
Two rules keep that feeling good. First, walking never fights the recoil. Holding a direction can only push you up to walking pace, which is 4.2, so a shot that threw you across the room keeps you thrown. Second, and this is the asymmetry the whole game rests on: the people in the building carry the same gun and get none of the kick. They out-shoot you; you out-move them. The moment you run dry you are just a man standing on a floor.
Making the enemies fair to fight
The first version of the enemies swung a barrel round and fired the instant it lined up. That is not a duel, it is a hazard: you cannot see it coming, so the best play is to stand still and trade shots. Five rules fixed it:
- They wind up. Feet plant and a red bracket closes over the head. It lasts three-quarters of a second on the first floor and shrinks floor by floor to a third.
- The aim is locked when the wind-up starts. Anything you do afterwards beats it, and the only thing that moves you far enough in half a second is the gun. That rule turns recoil into your defence.
- One at a time. Each floor hands out a single firing token. Four men firing at once is not four times as hard, it is a coin flip, and you can no longer tell which one is about to shoot.
- Being hit cancels it. Shooting first wins the exchange.
- Reloading is the opening. An empty enemy stands there for two seconds with two dots over his head.
Those three marks, a yellow bang when he sees you, the closing red bracket and the two dots, are the entire combat interface. At 480 by 270 pixels you cannot read a pose from across a floor, so what somebody is doing has to be written above him.
Three bugs you could not see
By September the game looked right and felt wrong. Shots that should have landed did nothing, and enemies barely fought back. All three causes were invisible in a screenshot, which is exactly why they had shipped.
The columns ate every shot
In a 3D building you walk round a pillar. In 2D there is no round, so a full-height column between you and the stairs made a floor impossible to cross. We had fixed that by letting you walk through columns. But the columns still stopped bullets, and there was one every 4.4 metres across a 44-metre floor. Any level shot fired along a floor died on concrete, yours and theirs, and because you walk straight through a column nothing on screen explained it. Columns now carry a second flag that tells bullets to ignore them. We now treat this as a class of bug: anything made walk-through has to be checked against bullets separately.
The barricades were taller than the barrel
The gun fires from 0.75 metres off the floor. The brick barricades were 0.95 metres tall, so seven pellets in ten hit the barricade at any range past four metres. They were also too tall to step over, so the only way past was to spend a shell. They are 0.62 metres now with a step height of 0.7, so you shoot over them standing and walk up onto them.
Nothing said you had hit anybody
There is now a hit marker on the crosshair, white for a hit and red for a kill.
The enemies' line of sight used the same ray as bullets, so they had been half-blind too. Once that was fixed they started landing shots for the first time, and their damage had to come down from 38 a hit to 29. The crate at the top of each stair now heals 45, because six floors on one health bar was a coin flip rather than a run.
The range has to live on the screen
The view is 480 pixels at 32 pixels to the metre, which is fifteen metres across. The gun reached eighteen, and its damage stayed flat for the first half of that range, so everything you could actually see was a plateau. Point blank and the edge of the screen did the same damage. A shotgun that gives you no reason to get close is not a shotgun.
The range is thirteen metres now. Damage is 74 at two metres, 65 at four, 52 at six, 29 at eight, 16 at ten and 7 at thirteen, then nothing. A first-floor thug has 48 health and a sixth-floor one has 93, so the same man is one shell at arm's length and four across the room. Enemies reach eleven metres, which means a man who can shoot you is always a man you can see.
An upgrade called Choke tightens the spread. Two of them used to turn 16 damage at twelve metres into 38 for free, which is not a choice, it is the right answer. Choke now costs kick, the thing you travel on.
Faces at seventeen pixels
The last fix this round was the faces. The heads are seventeen pixels across and used to tilt, with every feature rotated, so eyes came out as three stripes and the jaw shadow read as a beard. Heads no longer rotate, every feature sits on whole pixels, and the pupils follow the aim instead. The game's own test suite now has checks for the three invisible bugs above, so they cannot quietly come back.