top of page
pong showdown gif.gif
pongshowdown_cover.png

Pong Showdown is a 2d pong game developed in a month using Stencyl where you

have to battle each other in a showdown to win the pong championship!
The game has a multitude of different character classes to play as that each have their own unique quirks and abilities. The game also features a power shot mechanic which allows players to build up charges from hitting the ball do deliver powerful strikes that will send the ball flying at high speeds

​​​

You can play the game yourself at:

https://lozerd.itch.io/pong-showdown

pong showdown gif.gif

Code Highlights

PowerShot

I wanted to innovate on the formula that pong had so i devised on a powershot mechanic that required you to achieve a certain amount of hits to do which would send the ball flying. The mechanic would add alot more depth in the game by giving the players more freedom of play and strategy in how they can score a point.


















Implementation
​
When the paddle collides with a ball in the "PowerShot" state, it triggers a strong bounce effect. The ball’s bounce magnitude and velocity are significantly increased compared to a normal bounce. The power effect is applied temporarily, and the ball’s de-power attribute is updated after a short delay to avoid immediate re-collisions within the same frame. During a collision with the paddle, If the ball's power condition is met and its able to 
de-power, the ball’s velocity and direction are adjusted using the increased magnitude, and the "PowerShot" state is reset, ensuring that the ball’s movement is enhanced only for a brief period before returning to its normal behavior.

​​​

​​​

​​​

​​

​​

​​



Challenges
My power shot was bugged and I didn't know why
As the deadline approached, I encountered a bug where, after several rounds or uses, the powershot would stop working. When bugged, it shot the ball at high speeds and random angles, without any power shot effects.












 

 

 



Solution

It took me two months to fix the bug. Initially, I debugged the powershot code, suspecting an issue with the engine or certain code, but everything seemed normal. Coming back to the game after 2 months though, I realized the problem was the ball colliding on the same frame as the power shot initiation, deactivating it. To fix this, I added a delay tied to a boolean, which worked surprisingly well.

image
image

Results

power_shot.gif

The Bug

power shot bug.gif

Notice how the ball didn't have a trail of after images and the random angle that it bounced at after the powershot was used

Classes

I wanted to add more variety and replayability to every game of pong showdown. Different characters and classes with special abilities naturally came to mind.

​​

​Warrior

This class has the ability to summon a suit of armor which consists of a helmet, chestplate and skirt which increase the size of the player as well as deflects the ball at higher speeds before breaking.
Implementation
I made an armor piece actor which had different states and values for each piece of armor like, the coordinates on the where it would be attached on, the sprite it was using and the angle that it would bounce the ball to once it was struck. when the player presses the ability key and the skill was off cooldown, it would create 3 instances of the actor with each different state.


Rogue

This class has the ability to dash a short distance leaving after images behind that can deflect the ball which can be helpful for deflecting incoming power shots that may have been too fast to catch.

Implementation
When the ability key is pressed and the skill is available, the player enters a dash state, recording and resetting their speed while applying dash movement. After a short time, the dash ends, and the speed is restored. During the dash, the player's speed is set to 0 to prevent normal movement from affecting the dash, and a fading after-image actor that can deflect balls is created rapidly at the player's position.
 

Mirror-mancer

This class has the ability to summon an eldritch mirror which stays in place and blocks balls which effectively covers the area that it was placed in.

Implementation
When the ability key is pressed and the player has no active summons, a mirror summon is created at the player's position with 3 HP. The mirror is linked to the player and lasts for a set time, blocking balls and losing HP with each block, causing it to crack. Once the mirror’s duration ends or it is destroyed, the cooldown for summoning a new one begins.
 

Gunslinger

The most unique and hard class, It replaces the power shot mechanic with a revolver that spins around as you move and requires bullets which you acquire from deflecting the ball to shoot. The bullets shot from the revolver act like a powershot which allows you perform calculated but hard to pull off moves like chaining your shots to make it hard to block.
​Implementation
I created a revolver actor that follow the player and spins when the player it moving and implemented bullets which need to be obtained by deflecting the ball. When the ability key is pressed, the revolver will shoot out a fast moving bullet in the direction of its angle that has a similar collision code to that of a powershot except with less power.

​​​

​​

Results

warrior.gif
warrior state code 1
warrior state code 2
armor piece create event
armor piece update event 2
armor piece update event 1
armor piece ball collision code
rogue.gif
rogue dash code
mirror_mancer.gif
mirror-mancer summon code
mirror updating event code
mirror fade
mirror ball collision code
gunslinger.gif
revolver code
revolver shooting
bottom of page