A simple vertical space shooter game. This project's current version is intended to implement a joystick-like input for a game using BeagleBone Black and electronic components, and then use sockets to realize the communication between the joystick and the game.
The game executes on user's computer as a server, and the joystick code runs on BeagleBone Black as a client.
Built using pygame library on Python 2.7
C++11 Standard used on joystick code
First Release, version 1.0
Linux
To play the game the way it was intended to be on this project, some electronic pieces will be needed: a potentiometer, a LDR (Light Dependent Resistor), a 10K-ohm resistor and a push button, along with some wires to connect them.
The BeagleBone Black proper configuration can be seen on the image below:
Before compiling and running the program, be sure to have the /beaglebone
folder copied to your BeagleBone Black, and have the components set on the right configuration like stated above.
Compiling and running the joystick
On BBB, enter /beaglebone
folder and run the following
g++ -std=c++11 -pthread adc.cpp gpio.cpp cliente_bb.cpp -o joystick
./joystick
Running the game
Make sure you have Python 2.7 installed along with pygame (http://www.pygame.org/) library. On your computer, run PyGalaxian.py
- Choose option on starting screen tapping LDR and confirm pushing button
- Move your spaceship using the potentiometer
- Fire lasers using button
- Destroy all enemies to win the game
- To exit the game while playing, gently tap LDR or press ESC key
Original
Shivam Shekhar
Email: shivam.shekhar.ece14@itbhu.ac.in
BeagleBone Black version