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

Published on

Equation Pyramid - Math Puzzle Game

​
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:

​
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

  1. Start with Numbers: You're given a set of numbers to work with
  2. Form Equations: Place numbers to create valid mathematical equations
  3. Follow the Rules: Each equation must be mathematically correct
  4. Complete the Pyramid: Fill all positions to win
  5. 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:

​
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: