Skip to content
← Back to Community
Python Turtle Maze
Profile icon
18cyrj

The player solves a maze that is randomly generated using Kruskal's maze algorithm using python turtle

https://repl.it/@18cyrj/Finished-maze-project

Once the maze is generated you move the turtle with the dots under the maze.

Voters
Profile icon
totally-not-kai
Profile icon
ErikFarrar
Profile icon
TanisaPillai
Profile icon
H2LG03Ryabenko
Profile icon
IsaiahCazares
Profile icon
loganstempeck
Profile icon
SuhaniSingh6
Profile icon
HaydenWitt1
Profile icon
SteveDembo
Profile icon
alaynaaa
Comments
hotnewtop
Profile icon
[deleted]

Nice drawing app dude

image

Profile icon
coolkidcoder311

Screenshot 2021-06-29 7.49.36 PM

Profile icon
UzayAnil

Nice!

Profile icon
arpimatevosyan

this is awesome

Profile icon
CosmicWonderhoo

can you see the broad no you cant i covered it
image

Profile icon
3DKTH3PR0

Erm, I tried it, and it DREW EVERYWHERE

Profile icon
tinydiamond

i should tell you..for me nothing happen when i touched the black near the end

Profile icon
ebest

Huh.
If you randomly press buttons quickly, weird things happen.
Try.
-Ebest

Profile icon
ebest

w a s d work. nothing else works. also, I solved the slow generation problem.
Quick now!
Takes 5 seconds to generate size 5 maze. The solution is disabling screen refreshes:
How to speed up python's 'turtle' function and stop it freezing at the end

Profile icon
Logimite

???

Profile icon
18cyrj

@laksh5: are the question marks because it's poorly done or like what's the criticism here

Profile icon
Brandaboss

Cool! I just wish the maze was generated faster.

Profile icon
18cyrj

@brandaboss: Thanks man! Yeah I do too, but using turtle this was the quickest I was able to get it, I bet there's more optimizing possible but I don't think it'd be much at least for this generation algorithm :)

Profile icon
lifeyears332

Is good.

Profile icon
18cyrj

@lifeyears332: Appreciate it man :)

Profile icon
haya

not sure how to play this game 😞

Profile icon
18cyrj

@haya: Once the maze is generated 4 circles should appear under the maze and you click on each to move in a direction. If the maze is taking a superrr long time and they aren't showing up I messed something up i guess haha

Profile icon
haya

@18cyrj: this is what I see, I'm not sure what to do after
image

Profile icon
18cyrj

@haya: If it isn't changing fairly quickly somethings broken, works on repl for me so idk why it wouldn't for others

Profile icon
ashtons

It's a bit easy due to the small size of the maze.

edit: nvm found out I can change the grid size

Profile icon
thoq

It doesn't work for me: ExternalError: TypeError: /\((.*)\)/.exec(...) is null on line 2

Profile icon
18cyrj

@thoq: is that on repl? works fine for me but I just tried it in IDLE and it paused halfway through, I made this months ago but if I remember correctly it's because the turtle was inexplicably returning extremely long floats like 49.998741231245123 and I guess I forgot to make it catch that in one spot

Profile icon
thoq

@18cyrj: Yes, on repl but I suspect that this has got something to do with our firewall. I got similar issues with other websites but only when using this network.