Play Now:

Inspiration

The inspiration for Peggle Master came from the classic PopCap Games Peggle series, which masterfully combined simple mechanics with addictive gameplay. I wanted to recreate that satisfying physics-based experience while leveraging Reddit's unique social platform capabilities through Devvit. The goal was to build a game that could bring the nostalgic joy of Peggle to Reddit users while adding modern features like daily challenges and community-created content.

What it does

Peggle Master is a physics-based puzzle game where players launch balls to clear orange target pegs from procedurally generated levels. Players can create, publish, and share their own levels with the community through a built-in level editor. Each day presents a unique level generated from the same seed, ensuring all players face identical challenges for fair competition.

The game features separate ranking systems for daily levels and custom levels, tracking high scores and player achievements. Ball physics include gravity, bouncing, and collision detection to create realistic gameplay. Consecutive peg hits build multipliers, rewarding skillful play and strategic ball placement. The responsive design works seamlessly on both desktop and mobile devices.

How I built it

The game was built entirely within Reddit's Devvit framework using TypeScript and modern web technologies. I used HTML5 Canvas for game rendering with custom CSS for responsive UI and TypeScript for game logic. The physics engine is custom-built, handling gravity, collision detection, and ball trajectory calculations.

The backend runs on Node.js with Redis for persistent data storage of levels and leaderboards. Level generation uses deterministic procedural generation with date-based seeds for consistent daily challenges. I implemented separate Redis keys for daily versus custom level leaderboards to ensure proper score isolation. The build system uses Vite for fast development and optimized production builds, while Reddit Devvit APIs handle user authentication and custom post creation.

Challenges I ran into

Achieving pixel-perfect mouse and touch input across different screen sizes required implementing coordinate transformation between display and logical canvas dimensions. Working within Devvit's sandbox environment meant adapting traditional game development patterns to work with Reddit's security requirements.

Accomplishments that I'm proud of

I successfully implemented separate leaderboard systems that can handle multiple concurrent custom levels without data conflicts. The community features I created allow players to become content creators through the level editor, extending the game's longevity. The game maintains smooth performance while providing a full-featured gaming experience within Reddit's platform constraints.

What I learned

This project taught me valuable lessons about game development within constrained environments. I developed skills in implementing realistic physics simulations with proper collision detection and response.

What's next for Peggle Master

Next, I will adjust the game data and add more customization options, such as changing the number of balls available to players, adjusting scoring values for different peg types, and implementing user-customizable game parameters. I want to give players more control over their gaming experience and allow for greater variety in both daily challenges and custom levels. Additional features might include different ball types, special peg behaviors, and customizable physics parameters to create unique gameplay experiences.

Built With

Share this project:

Updates