Plumbi
Inspiration
The inspiration for Plumbi came from a desire to create a simple, fun, and addictive game that could engage Reddit users directly within their favorite communities. I wanted to build something that people could play casually, compete with friends, and challenge themselves through increasing difficulty levels. Pipes, as a concept, are universally recognizable and nostalgic for many—connecting pieces and creating flow feels satisfying. The idea of combining this with Reddit Devvit and Redis allowed me to bring a fresh and interactive experience directly to Reddit users.
What it does
Plumbi is a level-based puzzle game where players must connect pipe pieces to allow water (or liquid) to flow from the Start point to the End point.
- Each level presents a grid of pipes, including straight, curved, start, and end pieces.
- Players click on individual pipe pieces to rotate them into the correct orientation.
- The challenge is to solve the puzzle and complete the water path as quickly as possible.
- Players’ completion times are recorded, and a leaderboard tracks top players.
The game is lightweight, easy to play, and directly integrated into Reddit using Devvit.
How we built it
- Reddit Devvit: Plumbi is built on Reddit Devvit, allowing the game to run seamlessly within Reddit posts or comments as a panel interface. Devvit handles the rendering and user interaction.
- Redis: For backend storage, Redis is used to manage game states (like pipe grids), user progress, and leaderboards. Redis sorted sets make it easy to rank players based on their completion times.
- JavaScript/TypeScript: The core game logic, including grid generation, pipe rotation mechanics, and validation of the water path, is written in TypeScript.
- Game Grid Logic: The game grid is represented as a 2D array, where each cell is a pipe piece. Rotations and path validation are handled through efficient traversal algorithms.
- Leaderboard: Player times are recorded in Redis, and top scores are fetched and displayed for community competition.
Challenges we ran into
- Game State Management: Storing and retrieving dynamic grid states efficiently for each user was challenging, but Redis provided a lightweight solution with its key-value structure.
- Path Validation: Ensuring the water flows correctly across pipes required a traversal algorithm that could handle all possible rotations and configurations of the grid.
- Devvit Integration: Working within Reddit’s Devvit framework introduced limitations in UI rendering, which required simplifying the grid into a textual representation that still felt intuitive and fun.
- User Interaction: Designing an interactive experience (like rotating pipes) while working in a text-based Reddit environment was challenging but rewarding.
Accomplishments that we're proud of
- Successfully creating a functional game that runs directly within Reddit posts using Devvit.
- Building a seamless state management system using Redis to handle user data, game grids, and leaderboards.
- Designing a fun and engaging gameplay experience that feels rewarding and competitive with a clear progression system.
- Implementing a leaderboard that encourages users to compete for the fastest times, increasing replayability.
- Overcoming the challenges of UI constraints to deliver a satisfying and playable game.
What we learned
- Reddit Devvit Development: Gained valuable experience working with Reddit’s Devvit framework to build apps directly within Reddit communities.
- State Management: Learned how to efficiently store and manage game states and leaderboards using Redis.
- Game Design: Discovered the importance of balancing simplicity and challenge in game mechanics to keep users engaged.
- User Engagement: Realized how crucial community-driven games are for engagement—adding leaderboards and progression made the game more competitive and fun.
- Optimization: Learned how to optimize text-based rendering for interactive grids under the limitations of Reddit panels.
What's next for Plumbi
The future of Plumbi is exciting! Here’s what’s coming next:
- More Levels: Introduce more challenging levels with larger grids and complex pipe layouts.
- Multiplayer Mode: Allow players to challenge friends in real-time competitions.
- Custom Levels: Enable users to design and share their own pipe puzzles with the community.
- Visual Enhancements: Explore richer UI options to make the game more visually appealing while working within Devvit’s capabilities.
- Achievements and Rewards: Add badges, achievements, and rewards for players who complete levels or top the leaderboards.
- Reddit Integration: Allow Redditors to share their scores, brag about their achievements, and invite others to play directly through posts and comments.
Plumbi has the potential to become a fun and competitive game that Redditors will love to play and share. 🚀
Built With
- devvit
- redis
- typescript
Log in or sign up for Devpost to join the conversation.