Skip to content

lucasmanea21/brain-lane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Sprint

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.

Neural Sprint Preview

Goals

  • 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.

How to Play

  1. Connect your Neurosity Crown EEG headset on console.neurosity.com.
  2. Put your login data & deviceId from the console in the .env found in /neurosity-server and start the server.
  3. Make and start the game (instructions below).
  4. Focus to move up, relax to move down.
  5. Toggle brain/keyboard mode with the Tab key.
  6. Track your score on the leaderboard.

EEG Data

  • 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).

🕹️ Game Features

  • 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

⚙️ Tech Stack

  • 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

📦 Installation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published