Pong Unity EEG neuro-Game, using Motor Imagery

mhadji05mhadji05 Cyprus
edited February 2021 in Software

Dear @retiutut

I found this project by you https://github.com/retiutut/OpenBCI-Unity-Pong_DOTS
I m trying to follow the steps for BrainFlow Unity https://brainflow.readthedocs.io/en/stable/GameEngines.html#unity
I dont know why I failed to install nuget.exe

By run this on cmd
C:\Users\Marios\Downloads>nuget.exe install brainflow -OutputDirectory C:\BrainFlowInstalled

I get this message
The system cannot find the file specified.

Also I m trying to make a simple game with motor imagery (MI). How is working your Pong game?
I dont have the device at the moment and I m trying to work with

BCI Competition IV-2b: 3-electrode EEG motor-imagery dataset with 9 subjects and 5 sessions of imagined movements of the left or the right hand, the latest 3 sessions include online feedback. (http://www.bbci.de/competition/iv/#dataset2b)

Any help with all of these?
Thank you.

Comments

  • retiututretiutut Louisiana, USA
    edited February 2021

    The Pong_DOTS project is a bit messy, and it is half-abandoned because it's not clear how to use DOTS + Multiplayer + BrainFlow in Unity. It would be great for an experienced Unity developer to help unblock this repo. Instead, I am trying to do the same type of game, but use Mirror for networking.

    I was able to play the game and have fun using EMG setup and connected to forearms. I squeezed a stress ball in my left and right hands to make the paddle go up or down. Uses simple thresholds to detect input from EMG values that have been normalized [0. - 1.].

    Hope this helps,
    RW

  • @retiutut
    As i said before, I m trying to follow the steps for BrainFlow Unity https://brainflow.readthedocs.io/en/stable/GameEngines.html#unity
    I dont know why I failed to install nuget.exe

    By run this on cmd
    C:\Users\Marios\Downloads>nuget.exe install brainflow -OutputDirectory C:\BrainFlowInstalled

    I get this message
    The system cannot find the file specified.
    Do you know why or how to solve this problem?

  • retiututretiutut Louisiana, USA

    @mhadji05

    This is a critical first step, and it only has to do with installing Nuget and getting it to work.

  • @retiutut
    Yes i know that is a critical first step.
    Why can't I install it?
    Do you know how can I solve this problem?

  • retiututretiutut Louisiana, USA

    Nuget is probably not in the PATH for Windows.

    After installing, I type nuget in command prompt and I see details.

  • retiututretiutut Louisiana, USA

    @mhadji05 It's difficult to assist when this is not something that OpenBCI makes, and is a widely adopted tool. We both have access to Google.

  • retiututretiutut Louisiana, USA

    I just downloaded nuget.exe again, and ran the commands

    cd downloads
    nuget.exe install brainflow -OutputDirectory C:\BrainflowInstalled

    Everything works just fine.

  • @retiutut
    ok I restart my computer and now nuget working. Thanks
    Is there any example of OpenBCI with Unity quickstart project based on Motor Imagery (MI)?

  • retiututretiutut Louisiana, USA
    edited February 2021

    Aha! The old "have you tried turning it off and on again?" saves the day!

    @mhadhi05 I believe you would be making the first example for Unity + BrainFlow + Motor Imagery.

    I'm not sure about everything involved in such an example, but here are my initial thoughts:

    • Get data from BrainFlow using C# binding in a MonoBehavior
    • Have your models ready and do classification in C# (I think???)
    • Use my DOTS_Pong example and move the paddles

    I am happy to help share what I have learned so far in Unity, though I am just a beginner in this framework. Also, I can help with cleaning up or explaining the messy code in the DOTS_Pong example. I am interested in what Machine Learning library you would use in C#/Unity.

    Glad you were able to get past the first step!
    -RW

  • dmacd10dmacd10 SF Bay Area

    FWIW I'm building an app in Unity + brainflow + openBCI for my own neurofeedback R&D purposes. I too had some issues getting brainflow to install but eventually got it working.

  • Dear @dmacd10
    What kind of technique will you use? (Motor Imagery (MI), P300, SSVEP, SCP, etc.)
    How will you do the analysis? Are you planning to train some models?
    How to transfer eeg data to Unity ?

  • dmacd10dmacd10 SF Bay Area

    My initial focus is on replicating some known 2-4ch and sLORETA neuromeditation protocols, and (depending on what kind of data I can scrounge up) maybe some z-score training later. The overall goal is maximum flexibility as I explore and debug my own brain and tune its performance in real time. Down the road it may make sense to do some more ML-type-things to differentiate states I cant easily capture and label myself.

    I'm using brainflow to talk to the openbci board from unity for now. I'm planning to migrate my hardware stack to HackEEG soon however so I can have more than 16 channels, and will either use LSL or maybe just write my own interface at that point.

Sign In or Register to comment.