Gameplay Systems
Input that feels immediate, AI that reads as intelligent, audio that carries information, and UI that survives every screen.
Feel Is A System
The through-line is that players judge responsiveness and legibility, not correctness. An input that is technically registered but visibly acted on 120 ms later reads as broken. An enemy following a mathematically optimal path reads as cheating. These systems exist to manage perception.
Input & Game Feel
Reading a button is trivial. Making it feel right is not, because human timing is imprecise and unforgiving rules punish players for being human by a few frames.
| Technique | Fixes |
|---|---|
| Input buffering | A jump pressed just before landing still fires |
| Coyote time | A jump a few frames after leaving the ledge still works |
| Dead zones | Stick drift does not creep the character |
| Rebindable actions | Accessibility, and every non-QWERTY layout |
Buffering and coyote time are usually two or three frames — around 100 ms. Players never notice them, and removing them makes a game feel immediately worse without anyone being able to say why.
Feedback closes the loop. A hit that lands with a sound, a flash, a screen shake and a few frames of pause registers as impact; the same hit with none of it registers as a bug.
Game AI
Game AI is not machine learning. It is a small set of decision structures chosen so the behaviour is readable, debuggable and beatable — a player has to be able to work out what an enemy is doing in order to outplay it.
| Structure | Good for |
|---|---|
| Finite state machine | A few clear states — patrol, chase, attack, flee |
| Behaviour tree | Layered priorities that stay editable as they grow |
| Utility AI | Scoring competing options by context |
| Steering behaviours | Movement — seek, flee, avoid, flock |
State machines are the honest first answer and stay fine until transitions multiply; at that point every state needs to know about every other. Behaviour trees replace that with a priority-ordered tree evaluated from the top, so adding a new emergency behaviour does not mean touching every existing state.
Pathfinding is the other half, and it is A* over a navigation mesh — the same graph search from any algorithms course, with a heuristic to steer the frontier toward the goal. The path it returns is a set of waypoints; steering behaviours make following them look natural rather than robotic.
Audio
Audio carries information the screen cannot. Footsteps behind you, a reload, a low-health heartbeat — these are gameplay signals, and a mix that buries them makes the game harder in a way no one will attribute to sound.
| Concept | Why |
|---|---|
| 3D positioning | Direction and distance are gameplay information |
| Buses and ducking | Important cues cut through the mix automatically |
| Randomised variation | The same footstep clip repeated becomes grating fast |
| Adaptive layers | Music responds to tension without a hard cut |
| Voice limiting | Forty simultaneous impacts should not sound like static |
Separate volume sliders for music, effects and voice are the minimum. Players turn music off and keep effects — take that away and some of them stop playing.
UI & HUD
Game UI has to survive a phone, an ultrawide monitor and a television across the room, on a controller, a mouse and a touchscreen. Anchoring and scaling rules, decided early, are what make that possible; hard-coded pixel positions are what make it a rewrite.
Keep the HUD driven by events, not polling. A health bar that rebuilds itself every frame is wasted work and a common source of frame-time spikes; a health bar that updates when health changes costs nothing.
Accessibility is not optional here. Full controller navigation, remappable inputs, scalable text, subtitles on by default, and colour that is never the only signal — each of these is the difference between a playable game and an unplayable one for a real share of players.
Interview Questions
What is input buffering and why does it matter?
A press received slightly before the action is legal is remembered for a few frames and fires as soon as it becomes legal. Without it, players who press a frame early are punished for imprecision they cannot perceive.
What is coyote time?
A short window after leaving a ledge during which a jump still works. It matches what the player believes happened rather than what the collision said.
Behaviour tree or state machine?
A state machine is simpler and fine for a few states, but transitions grow combinatorially. A behaviour tree evaluates priorities from the top, so new behaviour can be added without rewiring existing states.
How does pathfinding work in practice?
A* over a navigation mesh returns a list of waypoints; steering behaviours then follow them with smoothing and avoidance so the movement does not look like it is on rails.
Why deliberately make AI imperfect?
Perfect reactions and aim read as cheating rather than skill. Delays and misses give the player a readable, beatable opponent, which is what makes the encounter fun.
Why should HUD updates be event-driven?
Rebuilding UI every frame burns frame time for nothing. Updating on the value change costs nothing when nothing changes, which is most frames.