Opens this plan in Hirezen, where one click makes it a position.
Game Developer interview questionsCoding — the dash that changes with frame rate round
A 60 min interview plan with a time-boxed script, what each question is for, and the signals to score against. Key skills: Gameplay programming in a live coding round: making a dash cover the same distance, cooldown and damage at 30, 60 and 144 fps and through a hitch, keeping it from tunnelling through walls once the frame-rate bug is fixed, finding what the component costs when forty AI characters dash at once, and moving its tuning into data a designer can change without a programmer..
The ticket and the file
What this section is for
Purpose
Runs over one gameplay file, a harness and a designer's ticket, prepared in the language your team writes gameplay code in; if candidates may choose, prepare the same logic in each. Build `dash_ability` to this specification, about 120 lines. `Update(frameDelta)` advances a dash timer by `frameDelta` and ends the dash at 0.2 seconds — correct — but moves the character a constant `DASH_STEP = 0.5` metres per update, so the dash covers 6 m at 60 fps, 3 m at 30 and about 14 m at 144. The cooldown is `cooldownFrames = 90`, decremented once per update. Each update while dashing, the code calls `world.FindAllWithTag(targetTag)` — a scene-wide walk that returns a new array every call — and applies `DASH_DAMAGE = 10` to every target within `HIT_RADIUS = 1.0` m, with no record of who has been hit, so a target standing in the path takes four hits today. The new position is kept only if `world.IsBlocked(newPosition)` is false — a point test at the destination, no sweep — and the level's walls are 0.6 m thick, which a 0.5 m step cannot skip but a longer one can. A log line formats the position on every update in every build. Two things are deliberately right: a dash pressed up to 0.1 s before the cooldown ends is buffered and timed with `frameDelta`, and a neutral stick falls back to the facing direction. The distance check uses a square root; that is the red herring. The harness takes a list of frame times and prints position, damage dealt and cooldown per update; it asserts nothing. The ticket, verbatim: "Dash is only half as long on the handheld build (30 fps). It has to be 6 m everywhere, and the cooldown feels too long there as well. Each of the four characters needs its own distance, duration and cooldown, I don't want to wait for a build to try numbers, and I need to see where a dash ends when I'm placing gaps." Hold 70 minutes; the conversation at the end runs past the 60.
I'm [YOUR_NAME], and I write gameplay code at [COMPANY_NAME]. This is a coding round, but not a puzzle: you get one component a designer is unhappy with, a harness that runs it at any frame rate you give it, and the designer's ticket. Run the harness as often as you like, look anything up, and talk while you work.
What this section is for
Purpose
Sets the round as work on existing gameplay code rather than an algorithm from scratch, and makes running the code the expected way to find things out.
Read the ticket first, then the file. I'll give you a few minutes before I ask anything.
What this section is for
Purpose
Puts the ticket ahead of the code, so the question of what the designer asked for is in the candidate's head before the code's style is.
Tell me which lines cause what the designer reported, what else is wrong that nobody has reported yet, and what in this file is fine as it is.
What this question is for, and what to listen for
Purpose
Separates candidates who read gameplay code against the behaviour a designer asked for from those who review it for style. The ticket is the specification, and half the defects in the file are ones the designer has not found.
Signals to score
- Reads the ticket before the file and restates the requirement in numbers — 6 m, a cooldown in seconds, per character
- Finds that the dash's duration is timed in seconds while its movement is a fixed step per update, and works out the distance at 30 and at 144 fps
- Finds the cooldown counted in updates and says what 90 of them is at each frame rate
- Notices damage applied on every update a target is in range, with no record of who was hit
- Notices the wall check tests only the destination point, and asks how thick the walls are
- Predicts what the designer will report next once the reported bug is fixed
- Names what is correct — the input buffer timed with `frameDelta`, the facing fallback — and leaves it alone
- Spends no time on the square root in the distance check
- Asks whether 6 m is meant to be exact at every frame rate or is the result of a speed, before choosing a fix
Follow-up questions
- The designer tuned 6 m on a 60 fps PC. How far does it go on the handheld, and on a 144 Hz monitor?
- How long is the cooldown at 30 fps?
- A target stands in the middle of the dash path. How much damage does it take?
- Is anything in this file correct?
- What will the designer's next ticket say?
Six metres at any frame rate
What this section is for
Purpose
The load-bearing exercise. The naive fix for the reported bug creates two new ones, and the section is scored on whether the candidate finds what their own fix broke — with the harness, not by being told.
The designer confirms: six metres in exactly 0.2 seconds, at any frame rate and through a hitch, cooldown 1.5 seconds. The harness can play back any frame times — try 33 ms frames, 7 ms frames, and 16 ms frames with a single 250 ms frame in the middle of a dash.
What this section is for
Purpose
Fixes the specification so the section is about the code, and hands over the three frame-time cases that expose the second-order bugs without naming them.
Rewrite the update so the dash covers six metres in 0.2 seconds, hits each target once, stops at walls and cools down for 1.5 seconds at 30 fps, at 144 fps and through the 250 ms frame — then make the harness prove it.
What this question is for, and what to listen for
Purpose
Tests whether the candidate writes simulation code whose result does not depend on how time was sliced into frames, and checks it with a test rather than by watching numbers scroll.
Signals to score
- Moves the dash by elapsed time — speed times the frame's delta, or position computed from progress through the 0.2 s — and says which and why
- Clamps the final update so the dash ends at exactly six metres instead of overshooting on a long frame
- Decides what the 250 ms frame does — clamp the delta the ability sees, split it into sub-steps, or treat the move as a path — and says what the player sees in each case
- Replaces the destination point test with a sweep along each step, so a long step stops at the first wall
- Records the targets this dash has hit and damages each once, or finds them along the swept segment
- Converts the cooldown to seconds and checks the input buffer still lines up with it
- Makes the harness assert distance, duration, hits and cooldown at 30 fps, 144 fps and through the hitch
- Runs the harness before changing the code and after, and reads a failure back
- Notes that the same frame times in give the same result out, and why that matters for replays and networked play
Follow-up questions
- At 30 fps, where does the last update of the dash leave the character?
- One frame takes 250 ms. How far does the character move in that update, and through what?
- A target is in range for ten updates at 144 fps. How much damage does it take after your fix?
- How does the harness tell you it's fixed without you reading the output?
- Would you step the dash at a fixed rate instead? What does that cost?
Forty dashes in every frame
What this section is for
Purpose
Moves from correctness to cost on the code the candidate has just written, so any speed-up has to keep the harness green. Have the per-function numbers ready and give them only when asked: the tag lookup is 2.2 of the 2.6 ms and about 96 KB of the allocation — forty arrays of 300 references a frame — the log line most of the rest, and the distance checks too small to register.
Design liked the dash enough that AI characters on both sides use the same component now, each aimed at the other side. In the arena test — two sides of 300 characters, about forty of them mid-dash in any frame — a capture on the minimum-spec PC shows this component at 2.6 ms of the game thread and about 100 KB allocated per frame.
What this section is for
Purpose
Gives a total cost without the breakdown, so asking for the breakdown before editing is the candidate's move.
Find where the 2.6 milliseconds and the allocations come from, fix the biggest part, and tell me how you knew it was the biggest before you touched anything.
What this question is for, and what to listen for
Purpose
Reads frame-budget judgment at the size of one component: measuring before optimizing, recognising the expensive call rather than the expensive-looking one, and keeping the behaviour the tests prove.
Signals to score
- Asks for the per-function breakdown, or says how they would get it, before changing code
- Identifies the scene-wide tag lookup, made by each dashing character on every update, as the cost and the source of the arrays
- Replaces it with a query of the spatial structure the game already keeps — the physics broadphase or a gameplay grid — near the swept segment, written into a buffer the component reuses
- Weighs querying once along the whole path when the dash starts against querying every update, and says what the single query misses
- Removes the log formatting from shipping builds, or makes it cost nothing while logging is off
- Leaves the square root alone and says why it is not the cost
- Keeps hit-once and the wall sweep passing in the harness, and adds an allocation check where the language allows one
- States a budget for the component at forty dashers and confirms it with a second capture on the same machine
Follow-up questions
- Where would you look first — the code or the capture?
- Is the square root worth removing?
- You query once when the dash starts. A target steps into the path halfway through. What happens?
- How will you know next month's change hasn't put the allocation back?
The designer's half of the ticket
What this section is for
Purpose
Returns to the part of the ticket that is not a bug. Gameplay code has a second user — the designer who tunes it — and this section reads whether the candidate writes for that user as deliberately as for the player.
The designer wants each of the four characters to have its own distance, duration and cooldown, to try numbers without waiting for a build, and to see where a dash will end while placing gaps. Change the code so they can — and tell me what you would refuse to let them set.
What this question is for, and what to listen for
Purpose
Tests whether tuning becomes data the designer owns, validated where it is authored, visible in the level and changeable while the game runs — and whether the candidate can say which values are feel and which are correctness.
Signals to score
- Moves distance, duration and cooldown into a per-character data asset or table, with units in the field names
- Validates values where they are edited — no zero or negative duration, a warning past the level's gap metrics — rather than failing at runtime
- Makes values reload while the game runs, and says what happens to a dash already in flight when they change
- Draws the swept path and end point in the editor or a debug view, stopping at walls with the same sweep the real dash uses
- Derives speed from distance and duration instead of storing it, so no two fields can disagree
- Keeps correctness out of the data — the sweep radius tied to collision, the hit-once rule — and says what the designer gets instead
- Gives a character with no data a visible default rather than a silent zero
- Asks the designer how they tune in practice before building an interface
Follow-up questions
- A designer sets duration to zero. What happens, and where do they find out?
- They change the distance halfway through a dash. What should that dash do?
- Why not expose speed as well as distance and duration?
- What is the one thing you would not let them tune?
That's the code finished. What do you want to know about how gameplay programmers and designers work together here? Ask anything — how a tuning change reaches the game, who keeps harnesses like this one alive, what a designer can change without us.
What this section is for
Purpose
Candidates who have shipped gameplay ask how tuning reaches a build and who owns the tests; candidates who have not ask about the engine. Naming the topics makes the choice the signal.
Before we stop, something true you should know: [state one current weakness in how your gameplay code meets design — tuning that still needs a programmer, frame-rate bugs found by players, a component everyone is afraid to touch]. You would be working on it from your first weeks.
What this section is for
Purpose
A real, specific weakness is the most convincing thing this round can offer the candidate it is looking for, and a fair warning to one who is not. Confirm it is still true before saying it.
Game Developer interviews — common questions
- Who is this Game Developer interview plan for?
- It is written for the interviewer, not the candidate: the hiring manager, engineer or panel member running the Coding — the dash that changes with frame rate round for a Game Developer role. It gives you a 60 min script to follow in the conversation — 4 questions with what each one is for and the signals to score against — so you are not writing the round from scratch the night before.
- What does the Coding — the dash that changes with frame rate round assess?
- This round is focused on: Gameplay programming in a live coding round: making a dash cover the same distance, cooldown and damage at 30, 60 and 144 fps and through a hitch, keeping it from tunnelling through walls once the frame-rate bug is fixed, finding what the component costs when forty AI characters dash at once, and moving its tuning into data a designer can change without a programmer.. It works through The ticket and the file, Six metres at any frame rate, Forty dashes in every frame and The designer's half of the ticket, scoring against 34 observable signals, with follow-up prompts on all 4 questions for going deeper where an answer is thin.
- How is the 60 min split up?
- The ticket and the file (12 min), Six metres at any frame rate (24 min), Forty dashes in every frame (12 min), The designer's half of the ticket (12 min). The timings are there so the round stays on schedule and every candidate gets the same shape of interview — which is what makes two candidates comparable afterwards.
- What other rounds should I run for a Game Developer?
A single round does not cover a whole role. The other rounds in this library for a Game Developer: