← Back to blog

Floating Damage Numbers: Handoff Acceptance and Engine Implementation

Fail criteria when popups blur, miss glyphs, sort wrong, or stutter; choosing TMP vs bitmap digits, pools and Canvas order, Unity UGUI acceptance steps, and how design digit art plugs in.

Published
  • game-ui-design
  • game-dev-ai
  • ui-to-engine
  • bitmap-font
  • unity
  • godot
  • cocos
  • vberai
  • 2026
Floating Damage Numbers: Handoff Acceptance and Engine Implementation

When ten hits land in one second, floating text issues are rarely fixed by “bigger font”: sharp in Editor, soft on device; crit color works but “K” or minus is missing; numbers sit on HUD buttons and steal taps; or Instantiate spikes GC. Popups are high-frequency, short-lived UI—accept them separately from static HUD.

Below focuses on Unity UGUI / TextMeshPro (RectTransform, Canvas, sortingOrder). Godot: Label + Theme / bitmap; Cocos: Label + bitmap font + pool—same criteria and step order. Static HUD shell: engine + MCP checklist. Pre-ship item 3 (“blurry art / damage numbers”)—retest on Release devices.

Fail criteria (any one = not passed): readability hurt (blur, clip, missing glyphs); combat frame time clearly worse than no-popup baseline on target devices; popups block required taps with raycasts still on; crit/heal/miss visuals don’t match data-driven spec; number formatting inconsistent with design table (e.g. 1.2K vs 1200 mixed).

Sharp in Editor vs soft on device


Choose first: TMP or bitmap digits

ScenarioBetter fitTypical pitfall
Digits + few symbols (0-9 . + - %)Bitmap / custom digit meshCharset gaps; wrong filter → blur
Full localized strings (“Critical”, “Immune”)TMP + string tableWidth jitter when mixed with digits
Heavy outline, gradient, animated styleBitmap or frame sequenceMissing state → wrong color fallback
PrototypeDefault TMP SDFNo reference resolution → soft on device

If device blur persists: Canvas Scaler reference, TMP padding/atlas, bitmap Filter Mode (often Point)—then charset or SDF quality. See bitmap font charset planning and pre-ship item 3.

Bitmap digit atlas vs TMP/SDF text


Unity: build and accept (6 steps)

1. Dedicated Canvas or explicit sort

  • Use a dedicated Canvas (Screen Space - Camera aligned with combat camera) or a HUD child layer.
  • Set sortingOrder above world UI, below modal popups; raycastTarget = false on popup graphics.
  • World popups: one shared World Canvas—not one Canvas per number.

Popup Canvas sort above HUD, below modals, raycasts off

2. Object pool

  • Prewarm ≥ peak on-screen count (stress from skills; often 16–32 minimum).
  • On recycle: reset position, alpha, scale, animation state, text.
  • No per-hit Instantiate/Destroy.

3. Separate data from presentation

  • Combat emits DamagePopupEvent (value, type, world pos/attach point, crit flag).
  • Presentation picks color, prefix, abbrev (K/M/B), curves.
  • Design table maps type → style Prefab (Normal / Crit / Heal / Miss / Block).

4. Motion and readability

  • Typical: float up + fade + slight scale; 0.4–0.8s; stagger or queue on same anchor.
  • Same-frame multi-hit: merge or offset 1–2 frames to avoid overlap.
  • If size follows camera distance, use one world scale rule—don’t mix with UI Canvas scale twice.

Multiple popup states with horizontal stagger

5. Charset and formatting

  • Bitmap: verify 0-9 . , + - % x K M B and project abbrev rules.
  • TMP: split fields or sprites—don’t rely on one string to switch fonts.
  • With locale overflow: don’t rasterize full localized sentences as popup art.

6. Device smoke

  • Dev and Release: 30s mob swarm, multi-tick boss skill, low-RAM device.
  • Compare frame time with vs without popups; screenshot crit/heal/miss each once.
  • Pass criteria live in Prefab + pool config, not test Scene only.

Design handoff (digits and states)

DeliveryUse
Digit art or TMP styles per state (Normal/Crit/Heal/Miss)Table-driven Prefab/Material
Outline/shadow at target resolutionDevice sharpness check
Crit/combo color + icon on digitsAvoid hard-coded tints in code
Charset scope (digits only vs localized units)Bitmap or string table

Design handoff checklist: if popups are raster, spec per-locale or not; default bitmap digits + TMP labels.


Fix routing

SymptomLikely causeActionOwner
Soft on device, sharp in EditorScaler / SDF / bitmap filterAlign reference res; Point filter; SDF paddingEngineering
Missing glyphsCharset / symbolsExtend charset; or TMPEngineering + Design
Blocks buttonsSort / raycastLower order or disable raycastEngineering
StutterNo pool / too many FX+textPool; merge same-frame popsEngineering
Wrong crit lookHard-coded colorsType→Prefab; design statesEngineering + Design
Split from HUD styleTwo font pipelinesUnify font source or ThemeDesign + Engineering

FAQ

Must popups be World Space?
No. Fixed 2D often uses Screen Space - Camera; free 3D cameras often use World Canvas. Pick one and document it.

UI particles for flair?
Fine for FX; digits stay Label/TMP/mesh for locale and pooling.

One script with damage logic?
Emit events from logic; presentation toggle (ShowDamageNumbers) for tests and accessibility.

Large numbers?
One formatter rule from design; single implementation—no copy-paste across UI scripts.

More guides you might like