Inspiration
I was inspired by the idea of creating a more emotionally responsive and immersive gaming experience. Many players get bored with repetitive gameplay, so I wanted to build a game that would monitor a player's mood and dynamically adjust the challenge level and action flow to keep them engaged. Combining emotion recognition with automatic shooting mechanics seemed like the perfect blend of smart interactivity and constant action.
What it does
EmotionStrike uses MediaPipe for real-time facial emotion analysis to detect whether you are happy, neutral, sad, or bored. If it detects boredom, it automatically activates SURPRISE MODE, adding boss battles, chaotic multi-target spawns, time-warp speedups, and enhanced visual effects to reignite engagement.
The combat system is fully hands-free for shooting:
- When you move, bullets fire automatically in your movement direction.
- When you stand still, bullets fire toward your mouse cursor.
Weapons have unique automatic fire rates and patterns, letting you focus entirely on strategy and movement instead of constant clicking.
How we built it
I integrated MediaPipe's facial emotion detection to analyze expressions in real-time and built an emotion classifier to monitor boredom or disengagement. The game itself was developed with JavaScript and HTML5 Canvas for fast rendering and particle effects. I designed a modular weapon system with customizable fire rates and a continuous auto-fire loop, along with an adaptive game state manager that triggers special Surprise Mode events. Finally, I polished it with seamless visual indicators showing weapon direction and facial detection feedback.
Challenges we ran into
- Getting consistent facial emotion recognition with varied lighting and camera angles
- Designing smooth transitions between normal mode and Surprise Mode without jarring gameplay
- Balancing the fire rates of different weapons so that they felt distinct but fair
- Managing constant bullet spawns while maintaining good performance
- Integrating facial detection with real-time game state changes
Accomplishments that we're proud of
- Successfully blending facial emotion detection with live gameplay
- Creating a truly hands-free auto-firing combat mechanic
- Developing a mood-adaptive Surprise Mode that really changes the player's experience
- Optimizing for performance even with many simultaneous bullet and enemy objects
What we learned
- How to integrate MediaPipe emotion detection with a live HTML5 game
- Techniques for balancing automatic weapons to keep gameplay engaging
- Best practices for maintaining a high frame rate under heavy computational loads
- The power of adaptive gameplay to hold user engagement
What's next for EmotionStrike
- Expanding to recognize more emotional states
- Supporting multi-player mood detection
- More complex surprise events tied to different emotions
- A training mode to adapt to individual players' reactions
- Deeper weapon upgrade systems and procedurally generated bosses
Built With
- html5
- javascript
- machine-learning
- mediapipe
Log in or sign up for Devpost to join the conversation.