Inspiration

  • After coming to swamphacks and brainstorming ideas for a few hours, we wanted to take a short break and play some ping pong outside of Newell hall, but then we found out that it wasn't always accessible, and the paddles were gone, and we realized that this is a common situation.

What it does

  • Our program allows you to play ping pong in an AR style, both in singleplayer against bots of you skill level choosing, or multiplayer against your friends.

How we built it

  • Our game is built from scratch in python. The Computer Vision backend uses Google Mediapipe for hand and landmark detection (with relatively high precision). The "game" simulation is made in a "pseudo-3d-style", with a custom physics engine that simulates basic physics (including the magnus effect). Networking for the multiplayer portion is also custom built but made to be as simple as possible to not make it lag.

Challenges we ran into

  • We had several challenges regarding simulating the game, especially after evolving the game from a simpler form to its current sophisticated version. The networking was a big problem to try to synchronize between players in real time. Matching the state of the board between two players that have different views (alongside the networking trouble). All of these challenges added some complexity.

Accomplishments that we're proud of

  • We're most proud of implementing the custom physics engine (especially the Magnus effect). While it doesn't simulate 3D space completely, we did it in a way that makes it as efficient as possible for this purpose-built application, and minimal overhead.

What's next for AR Pong

  • The main thing we want to implement is multiplayer across the internet, since currently both people have to be on the same network.
  • We also want to potentially expand this game into a mobile port that allows you to play it with your phone in the same way this desktop app allows you.

Built With

Share this project:

Updates