Inspiration

Inspiration I was inspired by the idea of creating a fun, fast-paced arcade game that players could enjoy instantly Reddit’s Devvit platform gave me the opportunity to make a game that runs directly on Reddit itself, making it easy for players to jump in and compete right from their browser.I wanted CornClash to capture the chaotic energy of catching popcorn as it pops simple to play, but exciting and challenging to master.

What it does

Players compete to catch flying popcorn kernels before time runs out — either in solo mode or multiplayer mode.

🎮 Game Features:

Solo Mode – 60-second challenge to catch as many kernels as possible.

Multiplayer Mode – Real-time 1v1 battles with server-authoritative gameplay.

Popcorn Types:

White 🍿 = +1 point

Blue 💙 = +20 points

Red 🔴 = –10 points + chaos spawns!

Leaderboards Track your progress and compete globally:

Daily - Today's top players Weekly - This week's champions All-Time - Legendary high scores Features:

Automatic score tracking Best score only (no score spam) Reddit username integration Personal rank display Daily Community Challenge Work together with all players to achieve a shared goal:

Goal: Complete matches as a community Resets: Every 24 hours automatically Rewards: Contributor recognition + celebration effects Fair: Only contributors before completion get credit Inclusive: Both solo and multiplayer matches count

The game includes responsive controls for keyboard and mobile, dynamic sound effects, and real-time score tracking.

How we built it

⚙️ Physics & Animation

We used Arcade Physics with realistic arcs, bounce, and spin:

Gravity: 300 px/s²

Collision detection: 80% of player bounds

Wobbling pot and idle cup animations for life-like motion

Particle effects and screen shakes for impact feedback

🧑‍🤝‍🧑 Game Modes

Solo Mode: Single-player with full screen movement.

Online Multiplayer: Real-time two-player mode with Redis matchmaking, duplicate join prevention, and sync every 166ms.

🧠 Technical Implementation

Client:

Phaser.js (v3.88.2) with WebGL rendering at 60 FPS

Tween animations, audio manager, and responsive touch controls

Automatic asset loading via hooks that update Preloader.ts when new assets are added

Server:

Node.js on Reddit’s Devvit

Redis for matchmaking and state management

Atomic operations to prevent race conditions

Auto cleanup, disconnection handling, and ready-timeout (30s)

📱 UI & Assets

We used a kitchen background, pot, counter, and popcorn cup sprites, plus themed audio for gameplay and menus. The UI includes ready indicators, countdown timers, and touch controls for mobile players.

Challenges we ran into

The toughest part was building a real-time multiplayer backend — managing joins, readiness, disconnections, and synced timers using Redis atomic operations.

Accomplishments that we're proud of

Successfully built and launched a Reddit-native multiplayer arcade game.

Used AI-assisted development effectively for everything from UI improvements to backend design.

Created a reliable cloud multiplayer backend using Redis and Devvit APIs

What we learned

I learned how to combine AI-assisted development with traditional coding, how to manage multiplayer logic, and how to design efficiently for both desktop and mobile.

What's next for Corn Clash

Leaderboards and weekly challenges

Built With

Share this project:

Updates