Maze game
- 4 Devlogs
- 6 Total hours
A randomised generated maze game with infinite levels and you have to collect ghosts in order to pass to the next level
A randomised generated maze game with infinite levels and you have to collect ghosts in order to pass to the next level
I added a whole bunch of new features. First of all, the maze worked perfectly where it got more complicated as it went but players couldnt tell what level it was so I included a level text. To also transition it from a boring maze game, I included collectible which are the white squares suppose to be ghosts where players have to collect a minimum of 5 in order to be able to go on the next level. As I tested out my game tho, I found it very annoying and repetitive having to spam the arrows/wasd keys to move so I changed the code slightly to allow users to just hold on to the key to move. The colour scheme also changed where there is also a star background.
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.