Inspiration

The Young Raider was created for Reddit’s Games with a Hook Hackathon as a fast-paced action-survival game built around progression, replayability, and community interaction.

The project was inspired by a larger browser game I had developed previously. For this hackathon, I adapted some of its ideas into a more focused experience that could work inside Reddit through Devvit.

I wanted the game to be easy to understand within seconds but difficult to master. Players should be able to start a run quickly, learn the controls, and immediately begin fighting enemies, collecting resources, buying upgrades, and chasing a higher score. To score well, players need to strategize their build and master combat skills like dodging or blocking.

At the same time, I wanted the game to give players meaningful reasons to return instead of feeling complete after one session.

Players can come back to:

  • Improve their personal best
  • Climb the global leaderboard
  • Reach a higher enemy base level
  • Claim daily gems
  • Request gems from the community
  • Contribute toward shared community upgrades
  • Unlock different Raiders
  • Challenge rotating King stages
  • Defeat stronger King levels
  • Save enough gems for higher King entry requirements

This combination of short-term action and long-term progression became the main hook and theme of the project.

What it does

The Young Raider is a single-player action-survival game where players control a Raider in a battlefield filled with enemy camps, bases-as-treasure-monster, catastrophes, and enemies that grow stronger over time.

During a normal run, players can:

  • Fight enemies using attacks and abilities
  • React and dodge enemy attacks (ie. sword swinging down and moving away in time)
  • Clear enemy camps
  • Destroy enemy bases (they look like treasure chest monsters)
  • Earn gold
  • Purchase upgrades
  • Survive catastrophes by staying out of their landing radius
  • Improve their score
  • Reach higher base levels
  • Compete on a persistent global leaderboard

Enemy camps is an area where enemies spawn, recover health, gain storm immunity. Enemies can detect the player, pursue them, attack, return to camp, heal, and become stronger.

If the player attacks the enemy base while enemies are still active, they become enraged and gain increased damage and movement speed towards the player. This gives the player a choice between clearing enemies first or taking the risk of attacking the base directly, which also reduces gold drops when the enemies die after base is destroyed.

When a base is destroyed:

  1. The player receives rewards (gold and gem)
  2. The remaining enemies die instantly.
  3. A rebuild timer begins.
  4. A stronger base appears elsewhere.
  5. Stronger enemies are generated.

This creates an endless progression loop where each completed stage becomes more difficult.

Enemies also strengthen automatically over time, preventing players from taking their time in each level.

The score multiplier begins high and gradually decreases, encouraging players to stay active and take risks instead of playing too slowly.

Catastrophes periodically strike the battlefield and force players to reposition. They can also be used strategically by luring enemies into the firestorm right when it lands.

Gold earned during a run can be spent on upgrades such as:

  • Health
  • Damage
  • Attack speed
  • Movement speed
  • Increased gold drops
  • Catastrophe immunity
  • Other powerful enhancements

The game also includes a collection of playable Raiders that can be unlocked through high-score milestones, gems, progression, and King victories.

Gems

Gems can be added into player's account after completing a normal run, by logging in daily, or requesting from the Reddit community every few hours.

Gems can be used to purchase certain Raiders and as entry to King stages.

King stages

King stages are separate battles from the normal survival mode.

A different King may be available depending on the day. Entering a King stage requires gems.

Defeating the current day's King for the first time would unlock the King as a playable Raider!

Each time the player defeats a King:

  • The next entry requirement increases
  • The King’s level increases
  • The King becomes stronger

The increasing difficulty and entry cost mean players are not expected to complete every King level in one session.

A player may defeat a King, discover that the next level requires more gems, and return later after collecting more gems.

This creates one of the game’s main long-term retention loops.

Community systems

The game uses Reddit-focused features to make the experience more social.

Players can:

  • Share their score
  • Share their leaderboard result
  • Request gems
  • Contribute toward community challenges
  • Help unlock permanent community bonuses

Community challenges allow players to contribute toward one of three shared upgrades:

  • Damage
  • Health
  • Starting gold

When the community challenge progress reaches every certain milestones, every players receive a permanent bonus which aids their subsequent runs.

Leaderboard

When the player dies, the completed score is submitted to the Devvit server.

The Game Over screen displays:

  • Final score
  • Personal best
  • Whether a new personal best was achieved
  • Global rank
  • Score-saving status

The leaderboard displays the top 100 players, their Reddit usernames, scores, rankings, and the current player’s own global position.

How I built it

The game was built using:

  • Phaser
  • TypeScript
  • HTML5
  • CSS
  • Reddit Devvit
  • Hono
  • Devvit Redis
  • Reddit authentication
  • Shared TypeScript request and response types

The project is divided into several scenes and systems, including:

  • Preloader
  • Main menu
  • Raider collection
  • Main gameplay scene
  • Battle UI
  • Tutorial overlay
  • Game Over scene
  • Leaderboard
  • King battle scenes
  • Server APIs
  • Persistent progression systems

Gameplay systems were separated into classes for player movement, combat, enemies, camps, bases, catastrophes, upgrades, scoring, controls, tutorials, and progression.

Enemies use multiple behaviour states, including:

  • Patrol
  • Detection
  • Pursuit
  • Attack
  • Return to camp
  • Healing
  • Enrage
  • Strengthening
  • Death

The game supports desktop controls and mobile touch controls with a joystick and action buttons.

For persistent scores, I created server routes using Hono and Devvit.

The server:

  • Identifies the Reddit user
  • Validates submitted scores
  • Preserves personal bests
  • Stores leaderboard data in Redis
  • Calculates global rankings
  • Returns the result to the game client

Scores are only submitted through the Game Over flow. Leaving, restarting, refreshing, or abandoning a run does not save the score.

The game also stores tutorial completion and other persistent progression data through Devvit Redis.

Challenges I ran into

One of the biggest challenges was learning Devvit’s development, deployment, server, and storage workflow.

Although I had previous experience with TypeScript and game development, Devvit introduced a different project structure and hosting environment.

Another major challenge was scene management.

As more scenes were added, bugs appeared where UI elements remained after restarts, timers stopped updating, or old objects were still referenced.

Enemy state management also became difficult because enemies needed to support patrol, pursuit, healing, enrage, strengthening, and death without those states conflicting.

Base reconstruction caused several bugs because the game needed to destroy the old base, remove enemies, show a timer, generate a stronger base, create new enemies, and reconnect all UI references in the correct order.

Responsive design was another time-consuming challenge.

The game had to work on desktop and mobile, with different aspect ratios, touch controls, camera behaviour, and UI scaling.

I eventually used a fixed internal game resolution and allowed Phaser to scale the full game to fit the available display.

The shop also required a separate Phaser camera so that its contents could scroll while remaining clipped inside the shop panel. This took tons of trial and error as the items in the shop always leaves the container when scrolling.

The first-time tutorial was also more complicated than expected.

The tutorial needed to highlight objects from the gameplay scene while displaying overlays in the Battle UI scene. This required converting world coordinates into screen coordinates.

The tutorial also temporarily demonstrates attack cones, enrage effects, and pursuit indicators without changing actual gameplay behaviour.

Accomplishments that I’m proud of

I am proud that The Young Raider became more than a basic survival game.

The final project includes:

  • Action combat
  • Enemy camps
  • State-based enemy behaviour
  • Enemy strengthening
  • Base progression
  • Catastrophes
  • In-run upgrades
  • Raider collection
  • Daily rewards
  • Gem requests
  • Community challenges
  • Permanent shared bonuses
  • King stages
  • Increasing King levels
  • Rising King entry requirements
  • Exclusive Raider rewards
  • Persistent personal bests
  • Global leaderboards
  • Desktop and mobile controls
  • An interactive tutorial

I am especially proud of the way the game gives players different reasons to return.

A player might come back to improve their score, claim daily gems, attempt to defeat a stronger King, unlock another Raider, contribute toward a community milestone, or climb the leaderboard.

The game therefore contains short-term, medium-term, and long-term goals instead of relying on only one gameplay loop.

What I learned

This project taught me that architecture becomes increasingly important as more systems are connected.

Many of the hardest bugs were caused by old references, scene lifecycle problems, incorrect initialization order, and persistent systems updating at the wrong time.

I also learned that responsive game design is very different from normal responsive web design.

It requires careful handling of:

  • Logical resolution
  • Display scaling
  • Camera viewports
  • Input coordinates
  • Touch controls
  • UI layers
  • Aspect ratios
  • Orientation

The leaderboard taught me the importance of separating trusted server logic from client-side gameplay.

The King stages taught me that retention systems work best when they connect to each other.

Higher entry requirements matter because players must prepare. King victories matter because they increase difficulty.

Most importantly, I learned that nearly every major mechanic improves through repeated testing, debugging, and refinement. In my own development community, I would have thousands of views, which were all due to me constantly refreshing after every changes and testing.

What’s next for The Young Raider

The next step is to gather feedback from Reddit players and improve balancing, usability, and replayability.

A possible future direction is rebuilding the game in Unity as a 3D version, which would allow more flexible animations, weapons, hitboxes, and visual effects.

For this hackathon, however, I intentionally used Phaser because the event included a Best Use of Phaser sub-challenge.

The immediate goal is to improve the current Reddit version and make every return visit feel worthwhile.

Share this project:

Updates

Submission history