Triple-R: Reach High, Reach Out, Reach Beyond 🚀

A Journey Through My First Game
In 12th grade, I decided to challenge myself by creating a simple yet engaging game called Triple-R. Inspired by my school’s motto—“Reach High, Reach Out, Reach Beyond”—the game puts players in control of a character whose goal is to rise higher and higher, overcoming obstacles with determination and skill.

The Concept of Triple-R 🌟
In Triple-R, you control a sprite with one simple mission: defy gravity and reach the highest point possible. To achieve this, players use the left and right arrow keys to move horizontally, all while gravity is constantly pulling them downward. Along the way, there are lightning bolts scattered across the screen—collecting these bolts gives you the boost needed to rise higher and negate the effects of gravity.
The game becomes progressively more difficult as you pass through its five unique levels, each with its own special challenge, making it a true test of agility and reflexes:
- Level 1: Regular Level
- Level 2: Saturn - More gravity
- Level 3: Flash - Flashing lightning bolts
- Level 4: Invert - Reversed controls
- Level 5: Bombs - Dodging explosives
Behind the Scenes of the Game 🎮

The game was built using Pygame, a Python library for game development, which was my first real exposure to building a complete application. Let me take you on a small journey behind the scenes of Triple-R to explain what happens at the code level.
Controlling the Character: Gravity and Movement
The core of the game centers around managing gravity and movement. Here’s a snippet of code that shows how I handled the sprite’s movement and the effect of gravity:
# Apply gravity to the player
player_velocity_y += gravity
player_y += player_velocity_y
# Player controls using arrow keys
keys = pygame.key.get_pressed()
if keys[pygame.K_LEFT]:
player_x -= player_speed
if keys[pygame.K_RIGHT]:
player_x += player_speed
The player_velocity_y
is increased by gravity
on each frame, simulating the effect of being pulled downward. When the player collects a lightning bolt, gravity
is reduced, allowing the player to ascend faster.
Lightning Bolts & Boost Mechanic ⚡
Collecting lightning bolts gives the player a boost, essentially reducing the effect of gravity. This mechanic keeps the player afloat and makes progression possible:
# Check for collision with lightning bolts
for bolt in lightning_bolts:
if player_rect.colliderect(bolt):
gravity = max(gravity - gravity_boost, min_gravity)
score += 1
lightning_bolts.remove(bolt)
Here, the gravity
is reduced when a lightning bolt is collected, making it easier for the player to climb. The game logic also ensures that the player’s score increases each time they collect a bolt, making progression a rewarding experience.
Levels and Challenges 🪂
The levels in Triple-R each present unique challenges, from increased gravity to flashing items and inverted controls. Below is a snippet for Level 4, where the left and right controls are reversed:
# Inverted controls for Level 4
if current_level == 4:
if keys[pygame.K_LEFT]:
player_x += player_speed # Reversed!
if keys[pygame.K_RIGHT]:
player_x -= player_speed # Reversed!
When reaching Level 4, the left and right movement logic is swapped, creating an unexpected twist. This simple change adds a surprising layer of difficulty and keeps the gameplay fresh.
Bombs and Hazardous Obstacles đź’Ł
In Level 5, bombs are added to make the game even more challenging. Players must not only collect lightning bolts but also avoid bombs scattered across the screen:
# Bomb collision logic
for bomb in bombs:
if player_rect.colliderect(bomb):
# End the game or reduce health
game_over = True
print("You hit a bomb! Game Over.")
The presence of bombs forces players to think carefully about their path, introducing a risk-reward dynamic where avoiding hazards is just as important as collecting boosts.
Building Triple-R: A Steep Learning Curve 🎢
When I first started working on Triple-R, I was completely new to Pygame—and honestly, still getting comfortable with Python. The code I wrote for this project wasn’t always efficient or elegant, and there were many times when bugs had me stumped for hours. Yet, it’s precisely because I did this project in the absence of modern AI tools that I learned so much. There was no easy way out—no shortcuts. It was just me, some Python documentation, and a lot of determination.
# Simple and repeated code for setting levels
if current_level == 1:
gravity = 1.0
elif current_level == 2:
gravity = 2.0
elif current_level == 3:
lightning_flash = True
Looking back at this code, it’s easy to see how it could have been refactored for simplicity and readability, perhaps using data structures to manage level properties. But the trial and error involved in building Triple-R is what solidified my understanding of programming concepts. The code may be far from perfect, but it works, and that was all that mattered back then.
Play Triple-R and See for Yourself 🎮
If you’re curious about Triple-R and want to see where it all started, you can try it out for yourself. The code may be a bit rough around the edges, but the gameplay is still pretty fun. You can find the complete source code on my GitHub repository.
It’s been an amazing journey—from struggling to get my sprite to jump properly to watching it grow into a real, playable game. Triple-R will always hold a special place in my heart as the project that made me realize just how much I love coding. It may be simple, but it’s proof of what’s possible when you keep pushing higher—just like my sprite, always reaching for the next lightning bolt.