Klaus: Tabula Rasa
A hand drawn 2D adventure. Rebuilt the player as a state machine over component nodes, then added the moves the art had already been drawn for: climbing, vaulting, ladders, crouching, a stomp attack, and a worm that hunts you.

- Client
- Fiverr (@shadetail)
- Role
- Gameplay Programmer
- Platforms
- PC
- Year
- 2026
Klaus is the client's own game, an adventure drawn entirely by hand in a loose ink style. I came in with a working prototype and a folder of animation the character had been drawn performing but could not yet do, and my job was the gameplay layer underneath: make Arthur move the way the art says he moves, and give the world enough furniture that a level designer can build with it.
The player was one 352 line script when I started. I took it apart in stages that were each safe on their own: fix the outright bugs first, then restructure without changing a single behaviour, then split the file into component nodes, and only then hang a LimboAI state machine over the top. By the end there is one state per control mode, sitting, walking, frozen for a cutscene, climbing, vaulting, on a ladder, crouched, mid stomp, and the rule that only the locomotion state moves the body, so every other state freezes Arthur simply by not doing that.
The hardest part was not the states, it was the art. The climb and vault clips were each drawn on their own canvas, against whatever obstacle the artist had in mind, with the character wandering around inside the frame. None of that lines up with a real fence in a real level. So I wrote ArtMotion: it measures the drawing's own translation, cancels it frame by frame with a sprite offset, and hands the movement back to the state to reapply against the actual obstacle. The artist's timing and shape survive; the distances come from the level. It also runs the playhead itself rather than letting AnimatedSprite2D do it, because a sprite that advances on the render frame is a coin toss when you read it from physics, and every mismatch is a visible twitch.
The rest is level furniture, written so a designer can place it and walk away: a ladder that is only a collision shape, a fence that also swaps its own art in front of and behind Arthur as he goes over it, a floor that breaks under a pushed object but not under a man, a camera that a level can borrow for an establishing shot or a bounded zone and always gets handed back exactly as it was.
What I built
- Rebuilt the player in four reviewable steps: fixed group resolution, animation and physics bugs; restructured the script with no behaviour change; split it into component nodes (input reader, animator, movement, drop through); then layered a LimboAI hierarchical state machine over the result
- Wrote nine player states, one per control mode, on the rule that only locomotion moves the body, so a cutscene or a scripted move freezes Arthur by omission rather than by a flag every other system has to respect
- Built ArtMotion, which measures the translation baked into a hand drawn clip, cancels it with a per frame sprite offset, and returns it to the caller to apply against the real obstacle, so one climb animation works on a fence, a dumpster or anything else of any height
- Ran the animation playhead from physics rather than leaving it to AnimatedSprite2D, because a sprite advancing on the render frame reads back as the wrong frame half the time and every disagreement shows as a twitch
- Wrote the climb and vault as separate moves off the same jump: a climb ends standing on the obstacle, a vault ends past it on the far side, so each aims at a different point on the collider
- Added a crouch that swaps to a short collider and refuses to stand up while there is something overhead, which is what makes a low gap a gap rather than somewhere to get wedged
- Added ladders, one way platform drop through, and a stomp attack that commits for the length of its animation and deals damage on the frame the foot lands rather than on area entry
- Built the cosmic worm on a LimboAI behaviour tree with tasks for patrol, find player, chase, face, range check and attack, keeping the worm script a body that knows how to walk and take a hit but never decides anything
- Wrote the fence as a scene that is both collider and depth swap: crossing it reorders the art around Arthur, including anything leaning against it, so he is in front on one side and behind on the other in a project where everything is drawn at z zero
- Built a breakable floor that gives way under a pushed object but never under Arthur, splinters for a per floor number of frames before the collider goes, and stays broken across a scene reload and a restart
- Added CameraRig framings a level can borrow: a parked establishing shot that holds on a building until the player walks, and a bounded camera zone that frames a whole room, both restoring zoom, position, limits and smoothing exactly on release and then switching themselves off
- Wrote WorldState, a small static store mirrored to disk for the handful of facts the world has to remember between loads, shaped so it folds into a real save system when one arrives
Gallery






Breakdown

A climb and a vault are the same input off the same jump and differ only in where they end. The climb finishes standing on the obstacle, so it aims at the obstacle's own surface; the vault finishes past it, so it aims at the collider's far edge and at the height the jump started from. Both run with gravity off and the body placed outright, because a solid fence would otherwise stop the move dead half way through.

Nothing in the levels says what is in front of what: everything is drawn at z zero and sorted by tree order. So the fence moves the art around Arthur instead of moving him. The art is what shifts rather than the player, so nothing follows him out of the scene, and more than one node can be listed because a wall is rarely one sprite and the bin bags leaning on it have to cross with it.
The player rebuild was deliberately four commits rather than one. Bugs first, then a restructure with no behaviour change, then the split into components, then the state machine on top. Each step was reviewable on its own, and if the client had stopped after any of them they would still have had a working game, which is not true of a single rewrite.

The breakable floor does not snap. The boards splinter for a per floor number of frames while the object still rests on them, and only then does the collider go. That beat is the whole reason it reads as timber failing rather than a trapdoor opening, and it stays broken across a reload, because a way down Arthur opened should not become scenery that resets behind him.
What the client said
Will definitely recommend been an amazing process working with!
Been a pleasure working with and always exceeds my expectations!
Can not recommend enough professional at what he does and the final project always turns out amazing thank you loads!! ^^
Credits
- Gameplay programming
- Bilal AhmadThe player rebuild and state machine, ArtMotion, the enemy behaviour tree, and the level furniture described on this page.
- Klaus: Tabula Rasa, the game itself
- The clientThe game, its characters, hand drawn art, animation and level design are the client's. The key art on the card is theirs. I was hired for the gameplay layer under it.
- Engine addons
- LimboAI, Spine RuntimesThird party addons used for the state machines, behaviour trees and skeletal animation, not written by me.
Built with
- Godot 4.7
- GDScript
- LimboAI (HSM and behaviour trees)
- Spine 2D
- AnimatedSprite2D
- CharacterBody2D
- Component node architecture