Maze generation was taken from Chapter 11 of the Recursion book at Invent With Python by Al Sweigart:
https://inventwithpython.com/recursion/chapter11.html
I then adapted it into 3D using LibSGD:
To see this example in action do this:
git clone https://github.com/Chaduke/maze_generation_3D
cd maze_generation_3D
pip install libsgd
python main.py
Use WASD or the arrow keys to move around and Mouse to steer
This also gives you a decent demonstration of how to create a minimap.