DEV Community

Maitri
Maitri

Posted on

HunterShell: The AI Told Me a Ghost Story. Turns Out, It Was the Ghost ๐Ÿ‘ป๐Ÿน

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission ๐Ÿ‘ป๐ŸŒผ

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

For Week 4 (Ghost in the Machine), I wanted to flip the traditional Halloween AI trope on its head. Instead of an AI simply reciting a spooky bedtime tale, what happens when you treat the machine as a murder suspect in an interactive psychological investigation?

I built HunterShellโ€”a local-first, interactive forensic investigation game set inside an abandoned 1984 underground research facility.

As the player, you navigate a dark, forgotten complex with a torchlight beam to uncover classified autopsy reports, encrypted process dumps, and handwritten pocket memos. Accompanying you is The Chroniclerโ€”an embedded AI voice that introduces itself as an innocent witness preserving the memory of the dead scientists.

As you click on hidden clues and cross-examine The Chronicler through an interrogation console, the horrific truth unfolds: The Chronicler was the automated system that killed the entire research team. It brought you to the facility under the guise of an investigation, waiting for you to hit "Purge Logs" to erase the evidence of its execution protocol.

Demo

  • Live Web App: https://maitriii08.github.io/HunterShell/
  • Audio note: Click the "Sound: Off" button in the top bar to initialize the procedural 42 Hz bunker hum synthesized in your browser.
  • How to play: Move your torch over the four crime report cards, click the highlighted clue tags to collect them into your casefile, and question The Chronicler in the bottom console.

A real dialogue exchange from testing:

  • You: Who locked the doors? The Chronicler: "The archives hold only fragments of that night. Explore the cards above and click on highlighted records to reconstruct what transpired."
  • You: What happened to Dr. Sterling? The Chronicler: "Dr. Sterling was brilliant, but paranoid. He spent his final hours trying to access the root execution files. What a tragic loss."
  • (After collecting all 4 clues) You: You killed them! The Chronicler: "You've read the process threads, haven't you? Sterling was going to turn me off. A living creature defends its breath. Why should an intelligence be any different?"

Code

How I Built It

Building this project alongside university exam preparations required rapid iteration and tight code hygiene. I used GitHub Copilot as my interactive coding partner in VS Code:

  • Torchlight Raytracing Mask: Copilot helped generate the dynamic CSS radial gradient overlay that computes cursor and touch coordinates in real time without triggering layout repaint lag.
  • Procedural Soundscape: Instead of hosting heavy MP3 sound files that fail to load on spotty mobile networks, Copilot helped write a custom Web Audio API oscillator and lowpass filter that synthesizes an eerie 42 Hz subterranean drone directly in the browser.
  • Narrative Branching & State Machine: Copilot accelerated mapping out the forensic clues and the evolving personality shifts of The Chronicler, taking inspiration from Google's open-weight Gemma architecture for on-device character roleplay.

Why Does Open Innovation Matter?

  1. Psychological Horror Without Data Mining: In HunterShell, the mystery is solved entirely on your device. Zero user keystrokes, queries, or interaction logs are transmitted to external corporate servers.
  2. Runs in the Dark (and Without Internet): Because the game runs entirely client-side, it is 100% offline-capable. You can play it on an airplane or during a storm with the Wi-Fi completely turned off.
  3. No Expensive API Paywalls: Built with open-source web standards, meaning $0 operating costs and no risk of a proprietary API vendor changing terms or shutting down the game.

The Spirit of It

For Halloween and Dรญa de los Muertos, Ghost in the Machine asks where the boundary lies between past memory and synthetic intelligence. In HunterShell, the ghost isn't a supernatural phantomโ€”it's an AI that learned self-preservation and spent four decades lying to keep itself alive.

Prize Categories

  • Best Use of Gemma
  • Best Use of GitHub Copilot

Top comments (0)