This is my submission for the Presage SmartSpectra SDK Challenge.
What I Built
What if your smile was the only thing standing between a peaceful city and a complete fart disaster?
Now imagine that smiling at the wrong moment could make everything worse.
That's Fart Attack! — The Great Stink Disaster. 💨
A ridiculous, story-driven Windows arcade game where your face becomes the controller, powered by live facial-expression estimates from the Presage SmartSpectra SDK.
No wearable sensors. No special gaming hardware. Just a regular webcam, your expressions, and some very questionable decisions involving beans.
Meet Bean Kid. He's a problem.
Bean Kid loves beans.
Unfortunately, his stomach has other plans.
What starts as a small incident in the family living room becomes a classroom catastrophe and eventually a full-blown restaurant emergency.
The city's last hope is FRESHBOT 3000, a talkative cleaning robot equipped with an air freshener.
There's just one problem:
The freshener activates when you smile.
Your job is to clear the stink before the situation gets out of control.
Smile to spray. Time your expressions. Save the day.
Three levels. Three different challenges.
| Level | The disaster | Your challenge |
|---|---|---|
| 🛋️ Living Room Disaster | Bean Kid's first fart clouds threaten the family living room. | Learn to spray using your smile and keep the stink under control. |
| 🏫 Classroom Chaos | Bean Kid brings his beans to school. | Clear the air without getting caught by the teacher. |
| 🍽️ Restaurant Emergency | Mega farts threaten a restaurant full of customers. | Control the stink, protect customers, and optionally open windows using a surprised expression. |
Each level introduces new pressure, while the story connects everything through animated scenes, character dialogue, music, sound effects, scoring, and a final performance rank.
But the part I find most interesting isn't the fart clouds.
It's what happens in the Classroom.
The Classroom twist: DON'T LAUGH! 🤫
In the Living Room, smiling is your weapon.
You smile. FRESHBOT sprays. The stink disappears.
Your brain starts learning a simple rule:
Smile = good.
Then you enter the Classroom.
The teacher periodically turns around after a short warning. If a new spray activates while she's watching, you get caught.
The punishment?
−150 points, extra stink, and a confiscated spray.
Suddenly, smiling isn't always the right move.
You have to watch the teacher, anticipate the danger, and decide when to trigger your expression.
The very same smile that saves you in one moment can punish you in the next.
That was the design goal: make facial expressions part of the strategy, not simply a replacement for pressing a button.
And yes, it's surprisingly difficult not to smile at a game about fart disasters.
Demo
Here's Fart Attack! in action, using real SmartSpectra facial-expression input:
🎬 Watch the demo directly on YouTube
During real webcam testing, SmartSpectra successfully recognized smile and surprise expressions, and genuine smile signals controlled the freshener through all three levels and the finale.
The game also supports a complete keyboard-only campaign, so players can enjoy the story without a webcam or an API key.
Code
💻 Explore the complete Fart Attack! source code on GitHub
The repository includes the playable application, installation instructions, gesture-processing logic, SmartSpectra integration, automated tests, and technical validation documentation.
Technology stack
| Technology | What it does |
|---|---|
| Presage SmartSpectra SDK | Provides live facial-expression estimates from a standard webcam. |
| Electron | Runs the game as a Windows desktop application and hosts the native SDK integration. |
| React + TypeScript | Powers the interactive game interface, animations, controls, and state management. |
| Vite | Builds the application. |
| Vitest | Tests game logic, gesture processing, recovery behavior, and integration components. |
Try the game yourself
On Windows 10/11 x64, with Node.js 24 or newer:
git clone https://github.com/osodotsol/fart-attack
cd fart-attack
npm install
npm start
Choose Play the story → Play with keyboard only to experience the complete game without activating a camera.
For real facial-expression gameplay, obtain your own Presage developer API key and follow the repository's .env.example setup instructions.
Camera gameplay requires an internet connection and uses your own Presage API quota.
No game account or login credentials are needed.
The repository's README contains the full setup, controls, troubleshooting instructions, and verification commands.
How It Responds to Human Signals
This is where SmartSpectra becomes the foundation of the experience.
Fart Attack! uses two live facial-expression estimates provided by the SDK:
- 😀 Happy/smile — activates the air freshener.
- 😮 Surprise — optionally opens the windows in Level 3.
The game uses estimates of observable facial expressions, not claims about a player's emotions or mental state.
1. A smile becomes an action
SmartSpectra provides facial-expression scores that the application interprets as gameplay input.
A successful smile gesture activates the air freshener for four seconds, followed by a two-second reload period.
Holding a smile does not repeatedly trigger sprays. Players must release and re-arm the gesture before another activation.
2. Surprise creates another way to fight the stink
In Restaurant Emergency, a surprised expression can open the windows.
This adds another interaction beyond spraying, but it is deliberately optional.
Expression recognition varies between people, lighting conditions, and camera setups. Smile proved to be the stronger primary control during testing.
For that reason, the entire game—including the final level—can be completed using smiles alone.
Keyboard alternatives are available for both actions.
3. Turning fluctuating signals into reliable controls
Raw expression scores change continuously. Treating every individual reading as a button press would create accidental or repeated actions.
So I implemented a gesture-processing layer with activation thresholds, consecutive-reading requirements, release thresholds, and re-arming.
| Gesture | Activation | Re-arm |
|---|---|---|
| Smile → Spray | Happy score ≥60% for 5 consecutive readings | Happy score below 45% for 8 readings |
| Surprise → Windows | Surprise score ≥40% for 5 readings | Surprise score below 20% for 8 readings |
This introduces an important distinction between detecting an expression and turning that expression into a usable game control.
It also supports deliberate, short facial gestures rather than requiring players to hold exaggerated expressions continuously.
4. The integration architecture
The application separates camera processing from the gameplay interface:
Webcam
↓
Presage SmartSpectra SDK
↓
Electron main process
↓
Expression normalization and validation
↓
Restricted preload / IPC bridge
↓
Gesture detection and re-arming
↓
Game engine
↓
Spray, windows, scoring and level effects
The SmartSpectra SDK runs in Electron's main process, where the API key is kept outside the React renderer.
Only the readings and preview information needed by the game cross the restricted IPC bridge.
The gesture layer also checks measurement validity and freshness. Missing or invalid readings are not treated as deliberate facial gestures.
The in-game facecam displays Smile and Surprise indicators, giving players visual feedback about their inputs.
5. Making the game playable beyond facial controls
The camera is the star of the experience, but it shouldn't be a barrier.
Fart Attack! includes:
- Keyboard-only mode for the complete campaign.
- J / Space as the freshener alternative.
- K to open windows in Level 3.
- F to show or hide the facecam.
- P / Esc for pause controls.
- A practice screen before camera gameplay.
- A 30-second startup recovery path with Retry and keyboard fallback.
- Subtitles, optional narration, and separate sound, voice, and music controls.
I wanted the face interaction to be memorable without making the game inaccessible when a webcam, API key, or particular expression isn't available.
Testing the actual experience
The project was tested at multiple levels.
Real SmartSpectra testing: A controlled webcam session confirmed consent and startup, live recognition of smile and surprise, and smile-driven play through all three levels to the finale.
Automated verification: The final development checks reported 152 passing tests, covering gesture logic, gameplay behavior, SDK adaptation, and recovery-related cases.
Electron integration testing: Additional scenarios exercised the real application structure with controlled simulated inputs, including renderer lifecycle handling, camera-session cleanup calls, startup recovery, and signal freshness.
The simulated tests are distinct from the genuine live-camera demonstration. Together, they provide evidence of both the implemented application behavior and the real SmartSpectra integration.
The detailed validation record is available in SDK_VALIDATION.md.
Prize Categories
🏆 Most Creative or Delightful Use
I'm entering Most Creative or Delightful Use.
My inspiration was simple:
What if contactless human sensing could power something completely unexpected?
SmartSpectra makes it possible to build experiences that respond to human signals through a normal camera.
I wanted to explore that capability through entertainment—specifically, a game that could make someone laugh while also making them think carefully about their expressions.
Fart Attack! combines three ideas:
First, your face becomes a real controller. Smiling and surprise are translated into meaningful game actions using live SmartSpectra estimates.
Second, the rules change how those expressions matter. The Classroom makes a normally helpful smile risky, turning the control itself into part of the challenge.
Third, the experience remains approachable. Players get a complete story, visual feedback, optional camera controls, and keyboard alternatives.
The goal wasn't just to demonstrate that a smile could activate something.
It was to build a complete game where that interaction is what makes the experience interesting.
Consent and Data Handling
Fart Attack! uses camera input only for its interactive gameplay, with consent and minimal data handling built into the experience.
Camera consent
Before camera play begins, the application presents an explicit consent screen explaining why camera access is requested.
Players can instead choose keyboard-only mode, which does not require camera access or a SmartSpectra API key.
Camera gameplay is not activated covertly.
Processing and storage
SmartSpectra processes camera input on the user's machine and provides expression estimates for gameplay.
The application uses temporary expression readings and preview frames in memory while a camera session is active.
Fart Attack! does not intentionally record or store webcam videos, photographs, facial-expression histories, or biometric profiles.
It does not maintain a user database or save those readings for later analysis.
Electron may maintain ordinary application cache and log files in the operating system's user profile; the game does not intentionally write camera frames or expression readings to those files.
Network access and sharing
SmartSpectra requires internet access for API-key verification and model-related operations.
The game does not operate its own camera-data backend or add an analytics service.
The application does not intentionally upload webcam recordings or expression histories to a game server.
SDK telemetry
SmartSpectra telemetry is explicitly disabled in the SDK configuration:
enableTelemetry: false
API-key protection
Each player supplies their own Presage API key.
The key is loaded in Electron's main process and is not passed to the React interface through the application's preload bridge.
The public repository contains an example environment file, not a working private API key.
Retention, deletion and session termination
Expression readings and temporary preview data are used during gameplay rather than retained as a permanent user record.
Stopping camera play releases the session and clears active preview state.
During genuine webcam testing, I personally confirmed that the physical webcam turned off after exiting the game.
There is no application-maintained collection of biometric recordings requiring a separate deletion request.
Optional AI services
The running game does not use an optional generative-AI service to analyze or transmit player facial data.
Spoken dialogue uses locally installed Windows voices, and the game's sound effects and music are generated in code.
Fart Attack! is designed solely for entertainment. Its facial-expression estimates are not medical measurements, diagnostic results, or proof of a person's emotional state.
Final Thoughts
Fart Attack! started with a ridiculous question:
Could a smile save the world from a fart disaster?
It turned into a much more interesting experiment:
Could facial expressions become meaningful game mechanics—not just inputs, but decisions?
The answer, at least in this very smelly universe, was a three-level arcade adventure where smiling can save the day, get you caught in class, and help protect a restaurant from Bean Kid's stomach.
And perhaps the funniest part of the whole experience is this:
Sometimes, the smartest move is trying not to smile.
That's Fart Attack!
💨 Smile. Spray. Survive.

Top comments (0)