Project Description [2.5 pts]: Name: POG PONG Description: POG is internet slang for “play of the game”, usually denoted to someone who is a skilled pro gamer (“This man is an absolute POG”). POG PONG seeks to challenge POGs through a fun and addicting 3D ping pong game, complete with several levels of AI, an arcade mode, and the option to control the paddle with your hands through OpenCV.
Competitive Analysis [2.5 pts]: POG PONG draws its inspiration from the classic arcade game PONG. It will emulate its simple yet intuitive gameplay by allowing the user to control a paddle within a 2D plane and take inspiration from the simple graphics through creating a 3D world made entirely of colorful yet simple 3D models. POG PONG will have a first-person perspective, rather than a top-down perspective of PONG, which creates a more immersive experience. Other first-person ping pong games do exist on the internet, one being the Flash Game “Table Tennis Challenge”. However, this game lacks the arcade mode that POG PONG will have, meaning that once users become proficient at the regular game mode, they wouldn’t be able to continue enjoying the game as they would in POG PONG. It also lacks the ability to control the paddle with your hand using computer vision.
Structural Plan [2.5 pts]: The main application will be run in main.py, and will use the 112 modal template. A separate CSV file will be used to keep track of the leaderboard. A potential folder with sounds effects may be added if time permits.
Algorithmic Plan [2.5 pts]: The most difficult part of the project is the rendering of the 3D world, 3D physics calculations, and the AI’s. For the 3D rendering, I used a parallax method combined with a coordinate augmentation system that brings a pair of coordinates closer to a “focal point” (The point at the center of the screen on which your vision is focused) based on its depth. The focal point can be dynamically changed to give different perspectives during the game. Through this method, models could be created through creating “model objects” which contained “face objects”, or collections of 3D coordinates points that would then be rendered into 2D space. This results in an extremely efficient and scalable way to achieve 3D graphics.
For the physics calculations, I created objects for each model that held information about its x,y, and z positions, as well as their respective velocity and acceleration for each axis. These were calculated through a finitely sized lookback window that holds data about an object's previous position and velocity, which is then updated as new information comes in. Velocity was calculated as the difference of past positions, and acceleration was calculated as the difference of past velocities. Universal gravity was then applied to all dynamic objects such that the acceleration due to gravity was constantly subtracted from each object's Y acceleration. Collisions are calculated using the equation for elastic collisions, in which we give each object a fictional weight that will be multiplied by their velocity to calculate their respective momentums.
There will be four different types of AI’s, 3 for the regular mode, and 1 for the arcade mode. For the regular mode, the first AI will have a naive strategy of moving towards the ball, and the movement of the AI will be slowed down. The second AI will predict where the ball will go based upon the arc of the hit from the player's paddle. It will also play aggressively, striking the ball even when it hasn’t yet touched the ground. The third AI will also predict the position of the ball based upon the arc it makes, however it will play more conservatively and will decide whether to strike a ball before it bounces or after it bounces.
Log in or sign up for Devpost to join the conversation.