Skip to content

harness: smooth the busy_tick 255→1 wrap teleport in text_wave comet #673

Description

@btipling

Summary

The u8 inv_set_busy_tick phase range 1..255 is incommensurate with the
27-tick / 54-raw comet period in text_wave.zig (SPEED=2, STEPS=3 on N=18).
At the 255→1 wrap (~every 25.6 s at 10 Hz), the localized comet head
jumps ~7 glyphs in a single 100 ms frame — from scalar index 8 back to ~0.7.

The old full-ring cyclicDistance gradient (before #671) hid the same skip
as a phase hitch. The localized sprite makes it visible. The test added in
PR #671 pins the exact values (text_wave.test.zig).

Not a blocker for #671 — just a known artifact of the u8 phase width.

Possible approaches

  • Wider phase — use a u16 or u32 tick counter so the comet has more
    steps before wrapping (e.g. wrap at a multiple of N*STEPS).
  • Wrap remap — when the host wraps 255→1, remap the incoming phase
    to stay continuous (e.g. phase = wrapCount * 255 + tick).
  • Accept the hitch — it is one frame every 25.6 s and may not bother
    operators on tool-using turns that rarely exceed that duration.

Ref

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions