Skip to content

lgyts/DECO3801_CannotCode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Mind Over Matter is a brain-computer interaction (BCI) powered 2D side scroller game in which players control a spaceship and must fly as far as possible without crashing. The player will have to avoid procedurally generated obstacles including asteroids, moons, planets and other spaceships. Certain obstacles can also be shot by the laser cannons on the player’s ship to destroy them. The player’s ship will be controlled using the traditional paradigm of a keyboard, however the game’s environment will automatically adapt to the user’s cognitive state based on data sent by an EEG (electroencephalogram) headset.

Table Of Contents

Getting Started

1. Setup Unity

git clone https://github.com/Slothlesss/DECO3801_CannotCode
  • Open Unity Editor.
  • Click Add -> Add project from disk
  • Navigate to the cloned project folder ./DECO3801_CannotCode/DECO3801
  • Open it using Unity version 2022.3.17f1 or higher. image

2. Setup EEG headset

3. Transmit data to Unity

  • Navigate to ./DECO3801_CannotCode/Asset/EEG/server.py.

  • Open the file using Visual Studio Code (or any Python-supporting IDE).

  • Right-click the file tab → select "Reveal in File Explorer" (Windows) or "Reveal in Finder" (Mac).

  • In the File Explorer/Finder window, copy the path.

  • For windows: In the terminal, run:

    pip install -r requirements.txt
    cd "D:\Project\GitHub\DECO3801_CannotCode\DECO3801\Assets\EEG
    python server.py
    
  • For MacOS: open EEG folder in terminal, then run:

    pip3 install -r requirements.txt
    cd '' && '/usr/local/bin/python3'  'server.py'  && echo Exit status: $? && exit 1
    
  • If its the first time connecting, Click "Approve" in Emotiv Launcher.

4. Start the game

  • Navigate to ./DECO3801_CannotCode/Asset/Scenes/SampleScene.
  • Double-click SampleScene.
  • Click the Play button at the top of the Unity Editor to start the game.

🎮 How To Play

1. Player Mode Selection

Players can choose between 1 Player or 2 Player mode using left/right buttons.

2. Player Movement

  • Player 1 (Left side)
    • Move Up: W
    • Move Down: S
    • Shoot: Spacebar
    • Charge Shot: Press and hold spacebar
  • Player 2 (Right side)
    • Shoot: P

3. Obstacles

  • Asteroid

          

  • Asteroid Group

  • Planet

4. Adaptive Gameplay

The headset will detect your level of frustration, fatigue and focus:

  • Frustration: Triggers additional obstacles. Higher fatigue levels introduce more challenges in the environment.
  • Fatigue: Increases game difficulty. The more frustrated you are, the harder the game becomes => so try to stay calm.
  • Focus: Unlocks and strengthens your weapon. The more focused you are, the more powerful your weapon becomes.

License

Current assets used:

All 3rd-party assets and libraries used in this project retain all rights under their respective licenses.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ShaderLab 45.5%
  • C# 30.0%
  • Python 16.6%
  • HLSL 7.9%