3D Random Maze with Pygame and PyOpengl

3D Random Maze with Pygame and PyOpengl

https://www.maze.gq/ <---- Click to play!
https://repl.it/@evanzimmerman/GameJam-3DMAZE <---- Click to see the code!

I started this project pretty much right when the game jam was announced, but I have had so little time to work on it that it is not completely finished, even with so many days to work on it.

When I saw the game jam, I knew that I wanted to do something 3D, so I tried something new with this. Previously I had no idea how to use PyOpengl and had little experience with Pygame, but now I feel like I can do much more than I previously could.

I had to use countless tutorials and example code, but I managed to get the program to successfully load a .obj file and render it out in the Pygame window. Then I applied the movement, and then I started to work on the maze generation program.

I would say this was fairly difficult mostly due to how I had no idea how to get create my own .obj files via a .txt document. I spent way to long messing around in Blender trying to find out how to read the obj files, and I finally figured it out and wrote some code to append boxes to a text file, which was then read and used to generate the maze.

I really wanted to add music as well, so I embedded the original repl with all of the code into a html,css,js repl. That way I could play music and add a volume adjustment slider bar for the user to change the volume.

I realize that the maze is extremely laggy for most people, and I tried removing the lighting and various other things, but it did not make much of a difference so you are going to have to deal with it. This isn't much of a game right now, it's more of a concept. I will probably continue to work on it after the game jam to add different difficulties and make it so the maze actually resets when you reach the end.

It will save your progress if you refresh the tab, so if you want to restart click the stop and start button again on the embedded repl.

The intructions are on the right side of your screen when you are playing, but I will put them here anyways.

To-do List:

  • Add collision so that the player can't walk through walls
  • Add a volume label for the slider
  • Add a level reset when the user reaches the end of the maze
  • Add some sort of level increase
You are viewing a single comment. View All

Very cool dude.