Blinking while invulnerable looks different on every screen
Toggling the character every frame looks like a gentle flicker on one screen and a solid ghost on another, and sometimes it ends while the character is invisible. Here is how to tie the blink to time, make the end always visible, and add a first-moment flash.
Why this works
How long a character stays safe is a matter of the clock, not of how many pictures the screen draws per second. When visibility is worked out from elapsed time, every device shows the same blink, and the look never decides who can be hurt.
When not to use it
Avoid blinking and white flashes for people who are sensitive to flashing light, and in games with a very fast pace where the blink hides the enemies. Offer a setting, or show protection with a steady glow or a lowered opacity instead.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 21 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Blinking while invulnerable looks different on every screen" (read_entry damage-blink-and-white-flash-timing) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP