A retro arcade of thought-controlled minigames - proving neurotechnology is already here, accessible, and ready to hack.
Brain Arcade is an open-source platform that connects consumer-grade EEG devices to playable minigames in your browser. Built with the cheapest available headset (Muse), this project demonstrates that neurotechnology isn't just deep-tech anymore - there's a layer that's usable, accessible, and waiting for builders.
This project serves two audiences simultaneously:
-
Users ๐พ - Experience what's possible with neurotechnology today. See that brain-computer interfaces aren't science fiction - they're in your browser.
-
Builders & Hackers ๐ ๏ธ - Discover that building with neurotechnology doesn't require a PhD. Use pre-processed biomarkers as simple joystick controls (normalized 0-1 values) or dive deeper into signal processing pipelines.
The arcade setting makes it playful and approachable while the modular architecture makes it serious and extensible. Neurotechnology for everyone.
You can explore the entire platform using mock mode with real pre-recorded EEG data:
npm install
npm run devWhen connecting, choose "Explore without a device" to try all games without a Muse device. The mock data is real neural signals, so you'll get authentic behavior.
๐ง Consumer-Grade EEG - Uses Muse headbands (cheapest consumer EEG available) via Web Bluetooth
๐ฎ Plug-and-Play Games - Add new games without touching core files
๐น๏ธ Four Contribution Levels - From joystick-only games to raw EEG pipelines
๐ Zero Data Collection - Local-only processing, no neural data is ever saved or transmitted
๐งช Mock Mode - Develop and play with real pre-recorded EEG data (no device required)
๐น๏ธ Retro Aesthetic - NES-style UI with 8-bit vibes
# Clone the repository
git clone https://github.com/itayinbarr/brain-arcade.git
cd brain-arcade
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173/ in a Web Bluetooth-compatible browser (Chrome, Edge, or Opera).
- Chrome, Edge, or Opera (Web Bluetooth support required)
- Safari is not not supported (no Web Bluetooth API)
Option 1: With a Muse Device
- Power on your Muse headband
- Click "Connect Muse" in the app
- Select your device from the browser's Bluetooth dialog
- Start playing!
Option 2: Explore Without a Device (No Device)
- Click "Explore Without a Device"
- Experience real pre-recorded EEG data
- Perfect for development and demos
Brain Arcade is designed for modularity and scalability. Contribute at any of four levels - pick what matches your skills and needs:
Use pre-built cognitive joysticks - simple 0โ1 values (map to 0โ100%) that represent states like focus, engagement, or relaxation. You do not need to touch biomarkers or signal processing.
import { useJoystick } from "../../contexts/JoystickContext.jsx";
export function MyGame() {
// Choose an axis like 'engagement', 'focus', or 'relaxation'
const { value01 } = useJoystick("engagement", {
range: 0.4,
autoAdjustBaseline: true,
});
const power = Math.round(value01 * 100); // 0..100
return <div>ENGINE POWER: {power}%</div>;
}Notes
- Joysticks auto-normalize against a session baseline and gate on signal quality.
- You can rely on the built-in calibration flow in the UI, or call
useBaseline().ensureBaseline({ seconds: 30 })if your game needs to force calibration.
Use or add biomarkers that joysticks are based on. Biomarkers expose raw values plus normalized helpers.
import { useBiomarker } from "../../contexts/BiomarkerContext.jsx";
export function MyGame() {
const { norm01, value, baseline } = useBiomarker("frontal-midline-theta");
return <div>FOCUS: {Math.round((norm01 ?? 0.5) * 100)}%</div>;
}Common biomarkers
frontal-midline-theta(focus/control)engagement-index(beta/(alpha+theta))relaxation-index((alpha+theta)/beta)- Ratios and bands:
beta-alpha-ratio,theta-alpha-ratio,alpha,beta,theta, etc.
Use preprocessed features like band powers directly from the processing pipeline.
import { useProcessing } from "../../contexts/ProcessingContext.jsx";
export function MyTool() {
const { bandPowers } = useProcessing();
// bandPowers[ch].alpha, .beta, .theta, .delta, .gamma
return <SpectrumBars data={bandPowers} />;
}Access raw EEG and design your own DSP pipeline.
import { useEEG } from "../../contexts/MuseContext.jsx";
export function MyDSP() {
const { rawEEG } = useEEG(); // [TP9, AF7, AF8, TP10] @ 256 Hz
const metric = myCustomDSPFunction(rawEEG);
return <Metric value={metric} />;
}Full Processing Stack:
-
MuseContext โ Raw EEG data (256 Hz, 4 channels)
-
ProcessingContext โ Welch PSD + band powers (~4 Hz updates)
-
BaselineContext โ Session normalization (30s calibration)
-
BiomarkerContext โ Cognitive markers (derived features)
-
JoystickContext โ Game-ready 0-1 controls
๐ Zero Data Collection. Period.
- No neural data is ever saved to disk
- No data is transmitted to any server
- All processing happens locally in your browser
- Data exists only in memory during your session
This is a hard rule for the project. Games that attempt to save or transmit neural data will not be accepted.
When you close the browser, all neural data is destroyed. Your thoughts stay yours.
Read our full privacy policy: PRIVACY.md
/src
/components
- Layout.jsx # Main UI layout
- MuseConnector.jsx # Device connection UI
- BiomarkerJoystick.jsx # Visual joystick component
- StartScreen.jsx # Retro start screen
- NavBar.jsx # Game navigation
/contexts
- MuseContext.jsx # Raw EEG streaming (256 Hz)
- ProcessingContext.jsx # PSD + band powers
- BaselineContext.jsx # Session normalization
- BiomarkerContext.jsx # Derived cognitive markers
- JoystickContext.jsx # Game controls
- QualityContext.jsx # Signal quality monitoring
/games
/example-game # Visualization demo
/sweet-spot # Relaxation floating game
- games.config.js # Central game registry
/lib
- signalProcessing.js # DSP utilities
/styles
- retro.css # 8-bit aesthetic
- App.jsx # Main app + routing
const { value01 } = useJoystick("engagement", {
range: 0.4,
autoAdjustBaseline: true,
});axis: one of the documented joystick axes (see below)value01: normalized 0โ1 control (map to 0โ100%)range(optional): sensitivity around baseline (default ~0.4)autoAdjustBaseline(optional): gently shifts center if user sits at extremes
const { rawEEG, isConnected, isMock, connectMuse, disconnectEEG } = useEEG();rawEEG:[TP9, AF7, AF8, TP10]in microvoltsisConnected: Boolean device statusisMock: Boolean indicating mock modeconnectMuse(options): Connect to device ({ mock: true }for mock mode)disconnectEEG(): Disconnect device
const { bandPowers, psd } = useProcessing();bandPowers:Array(4)of per-channel objects:bandPowers[ch].alpha|beta|theta|delta|gammapsd: Power spectral density (Welch method, 2s window, 1s overlap)
const { ensureBaseline, isBaselineReady, baseline } = useBaseline();ensureBaseline({ seconds }): Start calibration (default 30s)isBaselineReady: Boolean indicating baseline capturedbaseline: Baseline band power values
const { value, norm01, baseline } = useBiomarker("frontal-midline-theta", {
range: 0.4,
});value: Current biomarker valuenorm01: Normalized 0-1 (0.5 = baseline)baseline: Baseline reference valuerange: Sensitivity parameter (default 0.4)
Games should prefer joystick axes as the primary control surface. Biomarkers remain available for Level 2+.
-
Biomarkers (BiomarkerContext
getBiomarker(name))frontal-midline-theta- AF7/AF8 theta average (focus)frontal-alpha-asymmetry- Alpha L-R difference (valence/approach)frontal-delta- AF7/AF8 delta average (drowsiness)beta-alpha-ratio- Beta/Alpha (frontal; stress proxy)theta-alpha-ratio- Theta/Alpha (frontal; workload)theta-beta-ratio- Theta/Beta (frontal; engagement inverse / fatigue)engagement-index- Beta/(Alpha+Theta) (frontal; attention)relaxation-index- (Alpha+Theta)/Beta (frontal; calm state)
-
Joystick axes (JoystickContext
useJoystick(axis)โ{ value01 })focus- Fromfrontal-midline-thetavs baselinealertness- Inverse offrontal-deltaincrease (0=drowsy โ 1=alert)drowsiness-frontal-deltaincrease vs baselinestress-beta-alpha-ratio(higher โ more stressed)workload-theta-alpha-ratio(higher โ more load)engagement-engagement-index(beta/(alpha+theta))relaxation-relaxation-index((alpha+theta)/beta)flow- Composite of engagement, moderate beta, low delta, non-excessive thetafrustration- Composite of thetaโ + betaโ with right-leaning theta asymmetry
Notes
- All axes gate on frontal signal quality to avoid artifacts.
- Most axes normalize against the session baseline (30s by default).
- Games can enable
autoAdjustBaselineto adapt when users stick at extremes.
- Contributing Guidelines
- Privacy Policy
- Curation & Deployment Policy
- web-muse Documentation
- Web Bluetooth API
- Muse Headband
