Retro Ping Pong Java Game

Retro Ping Pong Java Game

Overview

In this project case study, I will be sharing my experience developing a retro-style video game developed in Java using graphics and implementing math/physics concepts to calculate ball speeds.

Throughout the development process, I focused on creating an engaging and fun game with realistic ball trajectories and paddle movements.

My contribution

Java Graphics
Math/Physics Concepts

The team

1 x Creator


Year

2021

Project image

Process

Ideating the project

Growing up, I loved video games. Specifically those with pixel art and a retro-style. After learning Java and creating small programs using graphics, I was inspired to make my own. I decided on the ping pong game, making it single-player but adding a twist: 10 levels instead of hitting blocks. The ball speeds up after each level, making it harder to win by the end of the game. 

Development Highlights

After setting up the initial windows, texts, and buttons, I was faced with how to animate the ball in a way that seemed realistic when bouncing off the paddle. The ball bounces off in different angles depending on which third of the paddle it lands on, with varying speeds as well. A challenge I ran into was due to the ball going off screen never to be seen again. Setting the proper boundaries and having the ball bounce of the walls solved the issue. Additionally, the user has three lives in the game, meaning the game resets at the current level if the ball were to go past the paddle. Coding these parts was a fun challenge, and required critical thinking about how the ball and paddle move.

Demos

Game win!

Game over…

Outcome

The final outcome of the project was what I had originally aimed for: a fun game with retro-style graphics and a conceptualization of object movements.

Thank you for visiting!

Copy email

@2024 Natalie Ramirez

Thank you for visiting!

Copy email

@2024 Natalie Ramirez

Thank you for visiting!

Copy email

@2024 Natalie Ramirez

Create a free website with Framer, the website builder loved by startups, designers and agencies.