Maze game
- 3 Devlogs
- 4 Total hours
A randomised generated maze game with infinite levels
A randomised generated maze game with infinite levels
I figure out the reason why it didn’t work was because I did maze_generation(level, level) but I made level = 1 and I forgot it only increase by +1 in next_level so I just put 4 + level instead so now its a functional maze. In this session I also realise it was very annoying having to spam the letter w or the up arrow to go up so I decide to change it so users could hold it. Instead of turtle.onkey for each key, I did a turtle.onkeypress and turtle.onkeyrelease where when the key is down, it will add the key movement and when it is lifted, it will discard it. To make it more noticeable that there are levels, I added like a title of what level it is. Additionally, I feel like its kind of boring so I might add some timer or coins you can collect in order to go to the next level in the next session. The colours are also horrible lol.
So… I learnt a very important lesson this session. It is to always keep running your program to see if it works. As I was coding this, I was just visualising and going like it will probably turn out like this if I do that but it turned out to be completely different. If you see in the image below, it’s just a red and blue square! Where is even the maze, let alone does it function? So during this time, I was programming the next_level function to make it become like infinite and I’m not too sure if it will work since the maze doesn’t work so I’ll have to fix draw maze_generation and draw_map first. Thats what I plan to do next session!
Initially, the start of the project was made using a HackClub workshop of the dungeon crawler. However, I wanted to turn it into an infinite maze game using that concept, which is what I did in this time. I had to work out some math and it was pretty hard to visualise everything. I think the hardest part was trying to work out how everything connected to make this maze game infinite and randomised. I just did some functions and next time I’ll make it actually kinda work.