<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Safwaan Uddin</title>
    <description>The latest articles on DEV Community by Safwaan Uddin (@safwaankira).</description>
    <link>https://dev.to/safwaankira</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1229834%2Ff69f6fae-7bda-4ad2-a872-9b8c54fed459.png</url>
      <title>DEV Community: Safwaan Uddin</title>
      <link>https://dev.to/safwaankira</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/safwaankira"/>
    <language>en</language>
    <item>
      <title>Don't Blink: a horror game that only moves when you blink</title>
      <dc:creator>Safwaan Uddin</dc:creator>
      <pubDate>Mon, 23 Nov 2026 07:58:41 +0000</pubDate>
      <link>https://dev.to/safwaankira/dont-blink-a-horror-game-that-only-moves-when-you-blink-e2d</link>
      <guid>https://dev.to/safwaankira/dont-blink-a-horror-game-that-only-moves-when-you-blink-e2d</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/presage-2026-11-04"&gt;Presage SmartSpectra SDK Challenge&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Don't Blink&lt;/strong&gt; is a horror game played with your face. Something is standing at the end of a candlelit hall. It only moves when you blink.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Blink&lt;/strong&gt; and the screen cuts to black. When your eyes open, it's closer, in a new pose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your pulse&lt;/strong&gt; makes it faster. The game reads your resting heart rate while you light the candle, and every beat above it lengthens each step (up to 2x).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your heartbeat&lt;/strong&gt; is audible: each detected beat plays a low thump and pushes red into the edges of the screen, louder as it nears.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A real smile&lt;/strong&gt;, held for about a second, makes it flinch back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Talking&lt;/strong&gt; lets it creep forward, because it can hear you.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Survive 60 seconds and you see dawn. Either way, you get a shareable card that charts your pulse across the round, with a tick for every blink.&lt;/p&gt;

&lt;p&gt;The tutorial is the calibration: you light the candle by blinking twice, which proves the blink signal works for you before the hunt starts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/n3NkY0FsMmo" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;43 seconds, live SmartSpectra: pulse, pulse wave, blinks and smile.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/safwaankira/dont-blink" rel="noopener noreferrer"&gt;https://github.com/safwaankira/dont-blink&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setup is in the README: Node.js 20+, a webcam and a free SmartSpectra API key. Run &lt;code&gt;npm install&lt;/code&gt;, copy &lt;code&gt;.env.example&lt;/code&gt; to &lt;code&gt;.env&lt;/code&gt; and add your key, then &lt;code&gt;npm start&lt;/code&gt;. For the best reading, lean back so your shoulders show and sit still while you light the candle.&lt;/p&gt;

&lt;p&gt;No key? The start screen has a &lt;strong&gt;Practice&lt;/strong&gt; mode (Space = blink, hold S = smile, arrow keys = pulse). It's labelled as simulated everywhere, so it never pretends to be live.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Responds to Human Signals
&lt;/h2&gt;

&lt;p&gt;The game runs on Presage's official Electron quickstart (credited in the repo) with &lt;code&gt;@smartspectra/node-sdk&lt;/code&gt; 3.5.0 on-device, requesting cardio and face metrics. (I dropped breathing: it needs the chest in frame, and when the chest is hidden the SDK holds back pulse and expression too. A debug log of validation codes showed this, so the game now coaches you to lean back and sit still for SmartSpectra's ~12 s pulse window while you light the candle.)&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;SmartSpectra metric&lt;/th&gt;
&lt;th&gt;In the game&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;face.blinking&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Rising edge across packets = one blink = one move&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cardio.pulseRate&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Resting baseline during calibration; pulse above it scales the step&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cardio.arterialPressureTrace&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Peak detection gives a heartbeat thump per beat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;face.expression&lt;/code&gt; (HAPPY confidence)&lt;/td&gt;
&lt;td&gt;Held smile pushes it back, with a cooldown&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;face.talking&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Slow creep while you talk&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each &lt;code&gt;metrics&lt;/code&gt; event carries only the new samples, so &lt;code&gt;src/signals.js&lt;/code&gt; keeps a little state to find blink edges and heartbeat peaks across packets. The game rules live in &lt;code&gt;src/engine.js&lt;/code&gt; as pure logic, so the same code runs on live signals, practice keys and 18 unit tests (CI runs them on every push).&lt;/p&gt;

&lt;p&gt;In live mode your real eyelids are the shutter: the game cuts straight to black on the detected blink and only animates the reopening. In practice mode it draws the eyelids, because no real blink happened.&lt;/p&gt;

&lt;p&gt;Everything you see and hear is made in code: the hallway is drawn in perspective on a canvas, and the sound (room tone, a tension drone, a close-range whisper, creaking steps, the heartbeat) is synthesized with Web Audio. There are no image or audio files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Most Creative or Delightful Use.&lt;/strong&gt; Most camera-vitals apps measure you; this one turns your body into the controller of a horror game. The idea came from the old "don't blink" monster: the rule only works if the game truly knows when you blink, and SmartSpectra's blink signal makes that real. Your own fear then feeds back into the game, because a rising pulse makes the creature faster, and the only way to push it away is to smile at it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consent and Data Handling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The camera doesn't turn on until you press &lt;strong&gt;Allow camera and play&lt;/strong&gt; on a screen that says what's read and what's kept. &lt;strong&gt;Esc&lt;/strong&gt; stops the round and releases the camera at any time.&lt;/li&gt;
&lt;li&gt;Nothing is stored or sent by the app: no video, frames or vitals. Signals live in memory for one round.&lt;/li&gt;
&lt;li&gt;The end card has numbers only, never your face, and is saved only if you ask.&lt;/li&gt;
&lt;li&gt;Presage SDK telemetry is &lt;strong&gt;off by default&lt;/strong&gt; (&lt;code&gt;enableTelemetry: false&lt;/code&gt;) and only on if you tick the box. The SDK contacts Presage to validate the key and may download its on-device models from Presage; no video, frames or vitals are sent.&lt;/li&gt;
&lt;li&gt;No AI services or LLMs are used by the game.&lt;/li&gt;
&lt;li&gt;It's a game, not a health reading. Gentle mode removes the jump scare.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Team
&lt;/h2&gt;

&lt;p&gt;Solo: Safwaan Uddin.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>presagechallenge</category>
      <category>gamedev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
