smh, short for Shake My Head, is a desktop game created in PyGame and OpenCV with the objective to avoid hitting enemies by moving your head from side to side while bobbing to the song in the background. The enemies are procedurally generated so that the enemies appear according to the music and your head moves according to the beat.
This game was designed for Hack112 F17, one Carnegie Mellon University's largest hackathons, along with team members Komal Dewan, Kusha Maharshi, and Sebastien La Duca.
pygame
cv2
face_recognition
matplotlib
numpy
scipy
sobol
- Add a webcam picture of the player(s) into
./players/
. - To add a new song, add its
.wav
file to./music/
and runprocessor.py
replacing the song name on line 21. - To play with the new song, run
game.py
replacing the song name on line 21.
NOTE: The process versions of songs Shape of You by Ed Sheeran and Spectre by Alan Walker are included in ./json/
but not the actual .wav
file.