Maze 256
Ye Min Aung, Genglin Liu
Ye Min Aung, Genglin Liu
When the word "maze" comes to mind, we often associate it with the puzzle where we try to find a passage to a goal through an elaborate structure. Many of us have probably solved a maze on pen and paper, where we have a bird's eye view of the entire maze. But have you ever imagined how it would be like if you were instead trying to clear the maze from within? This is exactly what our project offers: an exciting first-person experience of clearing a maze.
An exciting feature of our game is its mechanical nature. This not only brings a touch of realism to the game, but also makes the gameplay more exciting. As the game is first-person in perspective, only a limited portion of the maze around the player will be visible. As the player moves around the maze, the walls of the maze change to reflect the position of the player. Clearing a maze from a first-person perspective is challenging, so the player is offered a number of hints. Each game ends when the player either gives up or clears the maze by reaching the goal.
The physical components of the maze such as the walls and the ground are 3D printed. The walls of the maze are raised and lowered using a rack and pinion linear actuator. The rack is embedded onto the surface of the wall. The pinion is powered by a programatically controllable motor. The wall, the rack and pinion and the motor together comprise the wall mechanism. There are twenty four such wall mechanisms in the maze, and controlling them independently requires an equivalent number of pins. Therefore, we are using an Arduino MEGA that has 54 digital pins instead of the standard Arduino UNO that has only 14 digital pins. This Arduino is the control center of the game, coordinating the user input with the physical state of the maze. The player navigates through the maze using a joystick. Hints are offered through an LED display.
Week 1 : March 27 - April 2
Sketch the hardware of the project.
Implement maze generation using Prim's algorithm.
Week 2: April 3 - April 9
Simulate player navigation and first-person vision.
Implement the compass and the trail hint systems.
Implement a new algorithm for maze generation, iterative DFS.
Model the rack and pinion for usage in the mechanism of the walls.
Design and test the first iterations of a singular wall mechanism.
Week 3: April 10 - April 16
Implement the Aldous-Broder algorithm that generates unbiased mazes.
Mix loops into the maze, that increases the complexity of the maze.
Finalize the design of the wall mechanism after three iterations.
Week 4: April 17 - April 23
Create an autopilot feature that moves the player towards the exit using BFS.
Implement a hint that moves a player six steps towards the exit based on autopilot.
Simulate the wall mechanism by integrating the printed parts with a servo.
Design and test the 3D printed components of the entire maze.
Week 5: April 23 - April 29
Finalize and acquire all the 3D printed components of the maze.
Transpile Processing code into Arduino.
Simulating the system in Processing
A segment of the maze
3D print the remaining components including wall slabs and enclosures (~ 2d)
Assemble the existing Servo motors with the 3D printed components (~ 1d)
Coordinate the hardware components: joysticks, LED displays and the maze (~ 1d)
We primarily faced roadblocks in the hardware of our project. The software was relatively easier to tackle for us than the hardware, because the maze generation algorithm was essentially a spanning tree generation algorithm that is covered in an algorithms course, and the rest of the features such as autopilot, limited vision and compass were comparatively easy compared to the maze generation itself.
The zeroth problem was overcoming the steep learning curve of Fusion 360. We quickly found out that the software used in class, TinkerCad, was insufficient for designing the structures we wanted. Thus, I set out on a perilous journey to master Fusion at least to the point where I was comfortable making designs with it. I watched YouTube videos and experimented in Fusion 360 for two whole days, after which I felt I was finally able to design 3D models properly. At least, we were on the starting line now.
The first problem was creating a functional rack and pinion system. Initially, we neglected the theory behind these gears entirely and printed the component, hoping everything would work out. It did not. Therefore, we decided we needed to study the basic theory behind gears before attempting to design the system again. After reading a concise and comprehensive paper on gears, we were able to create a functional rack and pinion with confidence.
The second, seemingly minor problem we faced was the significance of clearance in 3D printing. The first time I printed a wall slab that was supposed to go through a rectangular hole, the slab did not go through, because the hole was not big enough to accommodate the free movement of the slab even though they have the same dimensions. The solution was to set aside a space of around 0.3 millimeters between the connecting components. I studied an article on 3D printing clearances lest I repeat the same mistake. Even after knowledge of the clearances, I still made clearance errors when printing parts that have to tightly interact with one another. It was a process of trial and error.
The third and perhaps the biggest roadblock was making the wall mechanism work. This proved to be much harder than the 3D printing of the components. We were initially using 9g servos to power the mechanism, but we quickly found out in the early stages of testing that this servo did not produce enough torque to lift the wall slab up. Thus, we decided to order more powerful servos for the mechanism. These powerful servos worked as expected, but we faced another problem. The wall slabs were not going vertically up due to the position of the rack. After a failed attempt, we solved this problem by adding an extrusion that supported the vertical rack to move straight vertically.
A functional wall mechanism
Arduino MEGA - Acquired
3D-printed components - In Progress
Wall Slabs
Maze Supports
Maze Ground
Servo Motors - Acquired partially
Joystick - Acquired from Makerspace
LED matrix display - Acquired from Makerspace
Buttons - Will acquire from Makerspace