Overview
A hand-card iteration in a UE5 card game, and the most complete problem → prototype → verification → trade-off chain in my work. The starting problem: in a 1,180 px row, eight cards show 147 px each, so names and numbers cannot be read. Scattering them across the table would fix that — but "position equals index" is the spatial memory players rely on by turn three. Whether scatter destroys blind play is what the iteration had to settle.
Build
An HTML hi-fi prototype settled the layout first: a 4×2 grid for spread plus jitter for non-alignment. Pure random placement piled all eight into one clump — a pit found at prototype stage, along with rotated bounding boxes clipping the table edge when only half a card of margin was left.
In engine, pose data FHandCardPose{X,Y,Angle,Z} lives on the card, so position comes from the card rather than from its index. Action grammar: click flips (ScaleX squash-and-swap, no fake 3D), double-click plays, drag flicks out with 80 ms velocity sampling, landing prediction and a 700 px/s threshold. Selection overlay, cancel-return and hover-lift were all rebased on the pose, otherwise the overlay snapped back to the old row position.
Six acceptance steps A1–A6 — pose consistency, flip chain, slow-drag return, fast-flick destroy, collapse to zero — feed coordinates into the same StepDrag / HandlePress / HandleRelease the game runs. 6/6 passed, and they caught two bugs a human would hit: rapid clicks swallowing a card (fixed with a flip queue) and a refresh breaking a drag mid-flight (drags voided in SetHand). A pose guard keeps a same-hand refresh from re-scattering.
Version v77e moved scatter out of the permanent state: hold Tab to spread the hand, release to return to the row, play always happens in the row. Flicks in inspect mode now return to the deck instead of tearing, since inspect is for reading and one stray flick should not cost a card. The same six steps were re-run in the inspect state: 6/6.
Tearing became the carrier of resource pressure rather than a punishment animation. One battle, one deck: played cards tear and are not recovered, free discards are removed, and the only release valve is "hand over eight returns to deck". The deck is restored whole after the fight with card count conserved, and an extreme-build fallback prevents a first-floor stall. Off-screen cards are eaten by the board — the cost is a card in the build, not health.
Difficulty was resampled, not felt. Fixing the map bug revealed the first run dying on floor 8 of the final chapter, a chapter that had never been run against the real enemy pool. Draw counts were isolated behind a pinned-start switch: at one card per turn the final chapter lost four of four, at three cards it cleared three of four, so the curve became 2/3/3. The same pass found two contradictory draw configurations and collapsed them into one source that warns on mismatch. Then win rate alone stopped being useful evidence — the hard point had moved from the final chapter to the first, where the boss broke four of four runs but left players at a dozen health with no recovery window after the map change. Measurement switched to per-floor sampling: entry health, turn count and post-fight health, normalised against the character's maximum into a curve, and tuned only where the curve actually dips. The tightest stretch went from cliff to slope, the lowest entry point rose more than a dozen floors, and first-two-turn deaths went to zero.
Design reasoning
Scatter was rejected by numbers, not by feel: only three or four of eight cards were genuinely readable across a 1,400 px spread; per-turn reshuffles erase spatial memory, which means re-reading the whole table each turn; the click was already spent on flipping, so the detail overlay got skipped; and "flick equals permanent tear" punished the highest mis-touch action in the whole scheme. But the scatter itself was good — the angles and overlaps really do look like a table, and the action grammar is richer than a row. So the idea was not deleted, it was split: the pretty state appears on demand, the usable state is always there. The same logic graded the penalty — a flick in inspect returns to the deck, a flick in play tears — because the meaning of the gesture should set the cost.
Retrospective
Boundaries recorded honestly: the Tab-to-InputComponent binding cannot be verified without keyboard automation, so a right-click fallback exists pending a human pass; drag feel is code-complete but human flick testing is outstanding; eaten cards have no fly-out animation, which needs incremental rebuild. On method: the value of automated acceptance is not that it passes — it is that the two bugs it caught are exactly the ones a human produces by clicking fast or refreshing mid-drag. The script translated feel problems into reproducible assertions.
One limit worth stating plainly: every sample here is a bot, zero human runs. These curves are the ceiling under ideal execution, not human win rates.