top of page

VR Pong

This was my final project for the course Fundamentals of Programming and Computer Science (15-112) at CMU, and I was one of 8 students to be featured in the final project showcase!

​

I wrote my first line of code in this class, and it was so exciting to grow and build a functioning VR-style game by the end of the semester. The game, titled VR-Pong, is an expansion of the classic retro game Pong. I started by moving the game from 2D to 3D, adding extra gridlines and a tail to the ball to indicate depth and trajectory, as well as a parallax effect assuming a static view from the center of the screen. I then integrated the vision library, OpenCV, in order to track a paddle with a bounding box. At first, I tried to do this with a regular ping-pong paddle, but I found that the easiest way to avoid bugs in HSV segmentation was to use a green paddle (The hue of skin tone and red can be difficult to discern in high or low lighting conditions). Last I added facial tracking using Haar cascades, moving the parallax camera to the estimated location of the player's head.

 

Attached below is a zip of the project, run main.py from an IDE if you'd like to give it a try! (paddle not included)

bottom of page