A simple 2D runner game fully controllable with brainwaves, without the use of a keyboard. Uses a 10-channel Neurosity Crown to control the character.
- Avoid obstacles by switching lanes — just by changing your attention level.
- Build streaks by avoiding obstacles to go faster and become more resistant.
- Try not to crash and finish with a good time.
- Connect your Neurosity Crown EEG headset on console.neurosity.com.
- Put your login data & deviceId from the console in the
.envfound in/neurosity-serverand start the server. - Make and start the game (instructions below).
- Focus to move up, relax to move down.
- Toggle brain/keyboard mode with the Tab key.
- Track your score on the leaderboard.
- Works with Neurosity Crown (10-channel EEG).
- Backend in Node.js using WebSockets to send real-time focus data to the game.
- Focus metric controls the movement:
- Increase focus (>35% overall or 15% upside fluctuation) → move up
- Focus decreased by >15% in a quick period → move down
- Calibration tip: Raising your eyebrows helps lower your focus score (useful for going down).
- Three levels - the theme and game assets are inspired by The Three-Body Problem novel.
- Obstacles: Blocks (solid), Stars (collectibles), Gates (passable), LowBars (bottom-only hazards) generate randomly.
- Scoring: Time-based ranking, you can speed up by hitting collectibles and avoiding the obstacles.
- Real-time Crown UI: See your focus percentage, battery, and signal quality live.
- Also works in keyboard only mode for testing
- C++ with SFML for rendering
- Node.js + Express, since I couldn't find any Neurosity C++ SDK
- WebSocket for real-time EEG data
- Custom GameContainer templates, Factory & Singleton design patterns
- Clean OOP structure with inheritance and exception handling
- 1ms polling for quick brain control
- Cross-platform build using Makefile
Requirements:
- SFML 2.5+
- Node.js
- Neurosity Crown headset + account
# Clone the repo
git clone https://github.com/lucasmanea21/neuromaze.git
cd neuromaze
# Install server dependencies
cd server
npm install
# Start backend server
node index.js
# Compile the game (example for Linux/macOS)
cd ..
make
./bin/BrainLaneSprint
