Skip to content

← All entries

08

· 3 min read

Heart rate

STAMINASHADERUI

The bat used to fly around like it had all night. Now it has a heart rate.

Stamina, basically, but I didn’t want a yellow bar that says STAMINA. The bat is a small animal doing a lot of flapping, so the meter is its pulse. Flying lifts the rate to a working baseline. Holding the new sprint pushes it higher, and it keeps climbing the whole time you hold it. Let it redline and your health starts to go. The currency for going fast is the bat’s own body.

Under the hood it’s the Heat attribute that’s been sitting unused in the attribute set since I stubbed out GAS months ago. It was already labeled “Heat/Stamina” in a comment I’d forgotten writing. So heart rate is just Heat now: resting at the floor, an elevated baseline in the air, the ceiling while sprinting, and a danger band near the top where OverexertionDamagePerSecond starts chewing on health.

The part I like is what it does to the drawing. The whole game renders through a pencil-hatching post-process, and the outlines now wobble harder the faster the heart beats. I push the normalized rate into the material parameter collection every frame and the shader reads it as extra jitter. Calm flight, the linework is steady. Panic sprint across a lit street and the whole picture gets the shakes. You feel the exertion in the image before you read it off any number.

There is a number, though, and it’s the bit I’m smug about. A diegetic ECG monitor in the corner: a real beating trace, a BPM readout, a little CALM / ACTIVE / CRITICAL badge that flips red when you’re in trouble. It’s another web page hosted in the engine, same pattern as the strain editor from last week. Entry 07 signed off with a note that the transparent-overlay fix was a small C++ tweak to UEchoWebBrowser::RebuildWidget I hadn’t gotten to. I got to it. SetSupportsTransparency(true), the white bars are gone, and the monitor floats over the game the way it was supposed to.

I’ll be honest that getting the live number into that page cost me an afternoon I’d rather have spent on the actual game. CEF and I had words. It pulls the rate straight off the controller now and it behaves, and that’s all I’ll say about it in public.

Two things I caught in playtest and fixed. The climb was much too fast, so I slowed it right down. Reaching the red is a long, deliberate sprint now instead of a tap, and the rate lingers after you ease off rather than snapping back. Perching is the exception: roost somewhere safe and the bat gets its breath back fast. The other one was the quiet kind. At max rate, health was meant to drain, and it just didn’t. The damage was landing on the attribute but never telling the HUD or the death check, so the bar sat full while the bat technically came apart in silence. Now it bleeds, and the night can actually end you by your own panic.

Flying it is the whole point. I sprinted away from a probe down a bright road, watched the outlines start to shiver and the BPM climb into the red, and ducked into a doorway to let it settle before trying again. I sat in the dark there a second longer than the game needed me to.

Still loose: the wobble and the MPC scalar want a proper tuning pass in the material, the debug readout is still stuck on screen, and that monitor is still pulling React off a CDN. Future me has a list.