BrickBreaker
In this project, I coded from scratch an interactive game inspired by the retro video game "Breakout." Developed in Processing, a Java-based coding language, my game uses a finite state machine, classes, objects, animations, and sound effects to create a simple, yet enjoyable, experience.

Pictured above is the first of two levels. To control the character, players use "a" to move left and "d" to move right. Spacebar starts the ball at the player's location moving in a random direction. Players destroy the bricks by bouncing the ball off of them, and they lose if the ball goes below the bottom of the screen. To get to the next level, players must destroy each of the bricks without losing the ball.
Pictured here is the second level. The player character has animations for moving left and right that look like rocket boosts. Whenever the ball touches a brick, it bounces off and starts the brick's dissolving animation. Once a player beats level two, they get the win screen.
To make the game more interesting, I made it so that the location of the contact between the ball and player determines the direction of the resulting bounce. I did this by mapping the difference in the ball's and the player's position to the ball's velocity. I made sure to cap the overall speed using some simple trigonometry.
This dissolving animation plays whenever a brick is destroyed by the ball. Each animation was made in the same resolution as the hitbox to get accurate detail. This one is composed of 9 different images.
This one plays when plays press "a" or "d" to move the player character. All of the animations were made using piskelapp.com.

Below is a video of a full playthrough of the game. For a less punishing experience, I made it so that if a player loses, they can restart from where they left off. The final game has sound effects for the ball bouncing, as well as background music, but my recording software was not able to capture it.
BrickBreaker
Published:

BrickBreaker

Published:

Creative Fields