How to run this game
git clone https://github.com/NTUEE-ESLab/2020-Pikachu-volleyball.git
cd 2020-Pikachu-volleyball
To play at the left side
python3 ws_server_1p.py
Or you can play at right side
python3 ws_server_2p.py
If you want to play with yuor friend, open another terminal and run both 1p & 2p. Then turn the STM32 on.
You may need pixi.js to execute the program. Go https://github.com/pixijs/pixi.js/ to get more information. You need to open another terminal to start the game.
cd pika/pikachu-volleyball
npm start
Then you can open Chrome and and go to localhost http://localhost:8080/ to start it. If you go to the above website and see nothing, go to terminal to see where the program runs. If you have some problems when running the program on Chrome, you can press F12 to see more information. Also, you can see whether your server is connected. If the F12 console told you "WebSocket connection to 'ws://127.0.0.1:8866/' failed: Unknown reason", you need to turn off the localhost and npm start again.
- Download mbedos 6.0.
- Create a new program and load mbed-os-example-wifi as your active program.
- Import sensor library to your program. ==> https://os.mbed.com/teams/ST/code/BSP_B-L475E-IOT01/#bfe8272ced90
- Move and substitue main.cpp and mbed_app.json to your active program.
- Change ip address, port in main.cpp and wifi-ssid, wifi-password in mbed_app.json according to your network environment.
- Complie the program to your STM32.
If mbed-os want to change your device setting, click No.
1 player mode: https://youtu.be/Qfkzt2Bb2ZQ 2 player mode: https://youtu.be/HzImpa4oTNo