Inspiration
I was inspired by the classic puzzle game "Rush Hour," where you must navigate a car out of a traffic jam using similar sliding mechanics. I wanted to put a twist on this concept by adding more interesting mechanics and giving players the freedom and flexibility to create their own levels.
What it does
Block Escape is a sliding block puzzle game where players guide a hero block to the goal by strategically moving obstacles. The game features:
- 4 block types: Hero (moves freely), Horizontal (left-right only), Vertical (up-down only), and Unidirectional (one direction)
- Ice mechanics: Special ice tiles that make blocks slide until they hit obstacles
- Built-in level editor: Reddit users can create and share their own puzzles directly in posts
- Tutorial system: Interactive popups guide new players through mechanics
- Responsive design: Optimized for both desktop and mobile Reddit browsing
How we built it
Tech Stack:
- Devvit: Reddit's app platform for custom post types and server-side logic
- Phaser 3: HTML5 game engine for rendering and physics
- TypeScript: Type-safe development across client and server
- Vite: Fast build tooling for client bundles
The game is structured with separated client-side rendering, server-side post handling, and shared types. I implemented scene management for different game states and created a grid-based system for block movement and collision detection.
Challenges we ran into
I'm primarily a backend developer with some frontend knowledge, so I had to learn quite a bit during this project. Working with Phaser 3's scene lifecycle and ensuring responsive design across different devices was a significant learning curve.
Another challenge was building the level editor with proper validation to prevent broken levels from being published. I needed to ensure that every level has exactly one hero block, one goal, and is theoretically solvable. Integrating this into Reddit's ecosystem seemed daunting at first, but Devvit's platform made it easier than I expected.
Accomplishments that we're proud of
I'm most proud of the level editor and the flexibility it gives users to create their own puzzles. I believe I've achieved a solid version of the game that works without errors or broken gameplay elements. The ice mechanics add an extra layer of challenge that makes the puzzles more engaging.
What we learned
I learned how to work with the Devvit platform and deepened my frontend development skills throughout this project. Understanding Phaser 3's architecture, managing game state, and creating intuitive UI controls were all valuable experiences that pushed me beyond my backend comfort zone.
What's next for Block Escape
The game is designed to be extensible with more mechanics in the future. Some ideas I'm considering include:
- Level Explorer: A browsing interface where players can discover popular community-created puzzles, filter by difficulty, and search by creator or tags
- Teleporters/Portals: Blocks that can jump between connected points on the grid
- Directional floor tiles: Special tiles that change the movement direction of blocks
- Mirror blocks: Coupled blocks whose movements are linked and synchronized when one of them moves
- Community features: Leaderboards, level ratings, and collections of popular puzzles
Built With
- devvit
- html5
- node.js
- phaser.js
- typescript
- vite
Log in or sign up for Devpost to join the conversation.