An AI assistant builds what your prompt names. Learn the techniques behind games that feel good, see each one live, and copy a line that asks for it precisely.
12 concepts9 2D and 3 3D demosCopyable prompt lines
01Watch the demoEach card shows the technique at work, next to a version without it or with a switch to compare. Change the numbers while it runs.
02Learn the nameA precise term gets a precise result. “Coyote time” says more than “make jumping feel better”.
03Paste the prompt lineCopy the line into your AI coding assistant, then tune the values on the term's page.
Chapter
Impact
What happens in the frames after a hit lands: the pause, the flash, the push and the debris that make it read as solid.
Hits that connect without any pause read as a swish through the air. Hit stop fixes that by holding the two fighters still for an instant at the moment of contact, typically 40 to 160 ms depending on how hard the blow is. That's too brief to notice as a pause, but long enough for the eye to register the impact. Strike with it on and off, and watch the blade's path go flat during the hold.
Prompt line
My melee hits feel weightless. Give each attack a hitStopMs value (about 50 for jabs, up to about 150 for heavy blows) and, on contact, start a per-character timer on both fighters that stops their animators and movement until it runs out. Queue attack presses made meanwhile.
For a few frames after taking damage, the target is drawn in one bright colour, usually white. It's the cheapest hit confirmation there is (a single shader value), and it reads even when the target is tiny, distant or surrounded by effects. Strike with it on and off: the health bar moves either way, but only the flash makes the hit obvious.
Prompt line
Add a damage flash: give character materials a flash amount (0–1) and colour, set the amount to 1 when damage is applied and back to 0 after about 60 ms, and blend the flat colour over the sprite or mesh while keeping its alpha.
Knockback shoves the target away from whatever hit it, then lets friction stop the slide. The distance tells the player how strong the blow was and where it came from, and the gap it opens gives both sides room to reset. With it off, the target soaks the hit in place; with it on, it skids back and settles.
Prompt line
On hit, set the target's velocity along the line from attacker to target, scaled by the attack's knockback force over the target's weight, lock out its own movement input for about 0.2 s, and let friction slow it rather than moving it a fixed distance.
A handful of sparks, chips or dust thrown out at the point of contact. They pin down exactly where a hit landed and which way it travelled, which matters most when the screen is busy. Keep them quick: a cone of particles that arcs under gravity and is gone in under half a second.
Prompt line
Add a hit burst: from a pooled emitter at the contact point, fire 10–20 particles in a cone around the hit direction with randomised speeds, under gravity and air drag; each lives 0.2–0.5 s, shrinking and fading as it dies.
A camera that jumps to a random spot each frame after an impact looks like a glitch. A convincing shake sways, and scales with how hard the hit was. One well-known recipe treats shake as damage the camera absorbs: impacts pile up a trauma value, time bleeds it away, and the camera is offset by smooth noise scaled by the square of that value. Try a small and a big hit, and compare the trauma line with its square, which drives the camera.
Prompt line
Explosions and big hits need more punch. Each frame, offset the camera's position and roll by smooth noise (Perlin or simplex, sampled at about 20 Hz) scaled by trauma² and a maximum offset. Keep trauma between 0 and 1: take off roughly 1.2 × dt every frame, and add 0.2–0.7 on each impact, by its size.
A camera glued to the player passes every stop and dash on to the whole screen. Smoothing lets it close only part of the gap each frame, so it trails slightly and settles. Look-ahead aims a little in front of where the player is heading, so more of what's coming is in view. The ring on the floor marks the camera's aim; turn and dash to see it trail behind and lead ahead.
Prompt line
Smooth the follow camera and add look-ahead: aim at the player position plus velocity × 0.3 s (that offset itself smoothed over 0.3 s), and each frame move the aim point toward it by 1 − exp(−dt / 0.2) of the gap rather than snapping to the player.
Instead of jumping straight to full speed, the character gains speed at a steady rate while the input is held and loses it to friction when it's released. A short ramp gives movement weight and momentum; a long one makes it feel like ice. Hold Left or Right and compare the dashed stick input with the speed that follows it.
Prompt line
Movement feels twitchy because velocity snaps straight to the stick. Make it change at a rate, with dt in every step: give reversals extra braking so turns stay sharp, use gentler rates in mid-air, and aim for about 0.1 s from standing to top speed and a little less to stop.
Ease-out starts fast and glides in; ease-in-out builds up and brakes; back runs slightly past the end and settles. These are the curves to name when a move lasts a set time between two fixed points, such as a menu panel or a door. For something that keeps chasing a moving target, like a camera, reach for smoothing instead. Pick a curve and play the move; switch easing off to see the same panel at constant speed.
Prompt line
UI and scripted moves look robotic because they're linear. Write a reusable tween that takes a duration and an easing curve, defaulting to ease-out cubic for things arriving (about a quarter of a second in menus). Also offer ease-in-out cubic for moves between two resting points, and ease-out back for a playful bounce past the end.
Squash and stretch is the cartoon rule that a body keeps its volume while its shape follows the motion: tall and thin at speed, short and wide at the moment of impact. In 3D, when height scales by s, scale width and depth by 1/√s; a 30% stretch makes the capsule about 12% narrower each way. Without that volume rule, the object seems to inflate instead of deform.
Prompt line
Landings feel stiff. Deform only the character's visible mesh, from a pivot at its feet: flatten it on touchdown (to about 0.75 of its height, recovering in roughly 0.1 s) and lengthen it while it falls fast (capped near 1.25). For a height scale s, set width and depth to 1/√s so the volume holds; leave the collider alone.
Forgiving rules around the jump button, so the game does what the player meant rather than what the frame counter says.
3 concepts
with coyote timeauto
2D
under the hood · time off the ground
120 ms
Press Jump, or press on the scene, to play. If the scripted runner has already pressed, or a round has just ended, your first press starts a fresh round for you.
Coyote time keeps “can jump” true for 80 to 150 ms after the feet leave the floor, as long as the character walked off rather than jumped. It exists because people judge an edge by eye, and their press regularly arrives just after the last grounded frame. The bar under the scene shows the time since the feet left the ground; a press inside the shaded window still jumps.
Prompt line
Players fall when they press jump a moment after leaving a ledge. Fix it with coyote time: for 0.1 s after the character steps off without jumping, still accept a jump press, and mark the grace period spent once that jump starts.
Press Jump, or press on the scene, to play. If the scripted runner has already pressed, or a round has just ended, your first press starts a fresh round for you.
The wall in the demo stands just past the landing spot, so the runner has to take off again the instant it touches down. A player aiming for that presses slightly early, while still in the air. Without a buffer, that press simply vanishes. With one, the game holds on to it and jumps as soon as the runner is grounded, or inside its coyote window.
Prompt line
Early jump presses just before landing are being lost. Store each press with a timestamp and treat it as live for about 0.12 s; on any frame where the character is allowed to jump (grounded or in coyote time), consume a live press and jump. Consuming it clears the timestamp.
Hold Jump, or press and hold on the scene, for a high jump; tap it for a low one. If the scripted runner has already pressed, or a round has just ended, your first press starts a fresh round for you.
The longer jump is held, the higher the character goes. Letting go while still rising cuts the upward speed, so a quick tap gives a small hop and a full hold gives the whole arc, all from one button. The runner alternates a tap and a hold; switch the technique off and both come out the same height. Hold Jump to try it.
Prompt line
Make jump height depend on how long jump is held: if the button is released while the character is still rising, multiply its upward velocity by 0.5 one time. A tap then gives a low hop and a hold the full jump; falling speed is never touched.