Equation Pyramid - Math Puzzle Game Inspired by The Devil's Plan
- Published on

βIntroduction
Equation Pyramid is an interactive math puzzle game inspired by Season 2 of Netflix's reality show "The Devil's Plan." Challenge your mathematical skills and strategic thinking by finding the correct equations from a limited set of numbers.
I created this project with Carol Hsiao, combining game design with modern web technologies to bring this addictive puzzle game to the browser.
βDemo & Source Code
Equation Pyramid is an open-source project:
- Play Now: equation-pyramid.vercel.app
- Source Code: github.com/eason-dev/equation-pyramid
βWhy We Built Equation Pyramid
After watching "The Devil's Plan" Season 2 on Netflix, we were fascinated by the Equation Pyramid game. The concept was brilliant:
- Simple Rules: Use numbers to form valid mathematical equations
- Strategic Depth: Multiple ways to arrange the same numbers
- Addictive Challenge: Easy to learn, hard to master
But there was no way to play it online. So we decided to build it ourselves.
We wanted to create a version that:
- Captures the essence of the original game
- Works in the browser - no download required
- Looks beautiful with 3D visualization
- Is open source so others can learn from and improve it
βGame Features
βStrategic Challenge
Use addition, subtraction, multiplication, and division to form valid equations. Every number placement matters!
βMultiple Difficulty Levels
From beginner puzzles to expert challenges. Start easy and work your way up.
βReal-time Validation
Automatic verification of equation correctness. Get instant feedback on your solutions.
βVisual 3D Pyramid
Engaging 3D visualization adds excitement to gameplay. Watch the pyramid come to life as you solve it.
βOpen Source
Full source code available on GitHub. Perfect for learning React Three Fiber and game logic.
βHow to Play
- Start with Numbers: You're given a set of numbers to work with
- Form Equations: Place numbers to create valid mathematical equations
- Follow the Rules: Each equation must be mathematically correct
- Complete the Pyramid: Fill all positions to win
- Try Different Strategies: Multiple solutions may exist!
βGame Rules
- Use basic operations: +, -, Γ, Γ·
- Each equation must be mathematically valid
- Left-to-right evaluation (no operator precedence)
- All positions must be filled correctly
βTechnologies
We built Equation Pyramid with cutting-edge web technologies:
- Next.js: React framework for optimal performance
- TypeScript: Type-safe game logic
- React Three Fiber: 3D rendering in React
- Three.js: WebGL 3D graphics engine
- Tailwind CSS: Modern, responsive styling
- Vercel: Fast, global deployment
βTechnical Highlights
3D Visualization: React Three Fiber makes it easy to create interactive 3D experiences in React. The pyramid rotates and responds to user interaction.
Game Logic: Complex validation system ensures equations are mathematically correct while handling edge cases and multiple solution paths.
Responsive Design: Works on desktop, tablet, and mobile. Touch-friendly controls for mobile gameplay.
Performance: Optimized rendering and state management for smooth 60fps gameplay even on mobile devices.
βThe Making of Equation Pyramid
βDesign Process
Carol designed the entire game experience:
- Visual Style: Clean, modern interface that doesn't distract from gameplay
- User Flow: Intuitive controls that feel natural
- Difficulty Curve: Gradually increasing challenge to keep players engaged
- Feedback System: Clear visual feedback for correct and incorrect moves
βDevelopment Challenges
Building a math puzzle game taught us a lot:
Equation Validation: Had to handle all edge cases - division by zero, order of operations, floating point precision.
3D Performance: Balancing visual appeal with performance on mobile devices required careful optimization.
Game State Management: Tracking all possible moves and solution paths needed careful architecture.
User Experience: Making complex math feel approachable and fun required many iterations.
βWhat Players Are Saying
"Addictive! Can't stop trying to beat my best time."
β Beta tester
"Great way to practice mental math. My kids love it too!"
β Parent and player
"The 3D visualization is beautiful. Makes the puzzle come alive."
β Game enthusiast
βOpen Source Philosophy
We made Equation Pyramid open source because:
- Learn from Real Code: See how we implemented 3D games in React
- Community Improvements: Others can add features and fix bugs
- Educational Value: Perfect project for learning React Three Fiber
- Give Back: We learned from open source, now we contribute
Feel free to:
- Star the repo if you like it
- Report bugs or request features
- Submit pull requests with improvements
- Fork it and make your own version
βFuture Plans
We're considering adding:
- Multiplayer Mode: Race against friends
- Daily Challenges: New puzzle every day
- Leaderboards: Compete for fastest solve times
- Custom Puzzles: Create and share your own challenges
- Achievement System: Unlock rewards for milestones
Want to help? Check out the GitHub issues and contribute!
βTry It Now
Ready to test your math skills?
Play now at equation-pyramid.vercel.app
No download required - works directly in your browser!
βConclusion
Building Equation Pyramid was a fun weekend project that turned into something we're really proud of. It combines our love of puzzle games, math, and modern web technologies.
We hope you enjoy playing it as much as we enjoyed building it!
If you have feedback, find bugs, or have feature suggestions, please open an issue on GitHub or leave a comment below.
βReferences
Inspiration for this project:
- The Devil's Plan (Netflix) - Original game inspiration
- React Three Fiber Documentation - 3D rendering in React
- Three.js Examples - WebGL inspiration
- KenKen Puzzles - Similar math puzzle games
- 24 Game - Classic number puzzle