Inspiration
I was inspired by several, online graphing calculators such as Desmos, which I used a lot in high school. I decided I wanted to code something similar, but with a twist that made it more like a challenging math puzzle, more than just a tool.
What it does
Pac-Man escape is a math puzzle game where the player is given a grid with goal points laid out on it. The player must write a mathematical function that creates a curve for Pac-Man to follow in order to eat all the goals while avoiding the ghosts. It is comprised of several levels, each getting progressively more difficult and requiring more knowledge of different kinds of math functions.
Pac-Man Escape allows you to be productive while having fun at home as it increases your understanding of how these functions behave.
How I built it
I built it using Java, the UI was done with the Swing library and I used another library called Exp4j to parse the math functions.
Challenges I ran into
The first challenge was dealing with discontinuities/vertical asymptotes that could arise in a math function. This required me to detect these and graph them correctly. Another challenge I ran into was making the GUI of the Swing library look somewhat decent and modern.
Accomplishments that I'm proud of
I am proud of how I was able to actually generate a graph of the math functions, without the assistance of any graphing library. I am also proud of how the GUI turned out, I am a fan of the flat, modern design.
What I learned
In this project, I learned how to detect and graph discontinuities in math functions. I also learned how to manually create animations using the Swing library.
What's next for Pac-Man Escape
All the levels in Pac-Man Escape are designed and solved by me. It would be nice if I could add a "randomly generated mode", where the levels are intelligently generated by the code. This would add much more replayability to the game.






Log in or sign up for Devpost to join the conversation.