Bōl-Man Post Mortem


     This is the fifth entry in my "recreating influential games" journey. Although I expected to be faster at making games by now, which I am, this still took me a bit more than a month. But that's not an issue since I can consider this a completed game with only minor bugs that I don't know how to fix. Though, as always, I seem to have an issue with the prototyping phase. Instead of focusing on getting the main features of the game worked out - in this case, the Player movement, power-ups, and enemy behavior - I still get focused on a final design feature that ends up taking most of my time. However, I think I can justify my tunnel vision this one time since it ended up working exceptionally well for me in the end.

     From day one, I started building the maze. Going into this project, a clone of Pac-Man, I knew that the maze was going to be a major part of the game and I knew that I wanted it to be procedurally generated. Though this isn't my first time tackling procedural generation, I was shooting way past my skillset. On a positive note, this probably helped me level up a lot more than a simple clone game would have. Generating the maze was a pain at the start and the early scripts were becoming exceedingly long in number of lines and execution. The first couple of scripts were about 700 lines long, making it difficult to adjust or change things further back in the code, scrolling up and down, while the code itself only generated a terrible maze with way too many dead ends and no goals.  And this was before I realised that Pac-Man maze walls are more than one tile thick. I was close to giving up because not only did I set my difficulty too high, but everything I looked up about procedural generation and algorithms was far too difficult to comprehend. At least, that was until I found this.

     I knew some people had made a procedural Pac-Man maze before, but their findings were either useless to me or too complicated for me to understand, being filled with a lot of technical gobbledygook. But seeing how they made their maze using Tetris blocks made me realise how much I was overcomplicating things.  This became a running theme with my "generation" script, even before this point, with each interaction achieving what its predecessor did in fewer and fewer lines of code until I finally achieved what I wanted. Utilising Godot's TileMapPatterns, I was able to fill the maze with walls that were more than one tile thick and some extra code to clean any dead ends and tighten any paths that were two tiles wide to make a completed maze in a script about the same length as the early iterations. This was about three weeks into the project and made the rest feel much easier in comparison.

     As for the enemies, I also had a habit of overcomplicating things by trying to make them follow an A* pathfinding algorithm, something else I dabbled in before, but quickly realised that I was shooting unnecessarily too far for something that could be achieved in a single, small function. Turns out that the ghosts in Pac-Man use a pathfinding algorithm that I didn't even know existed. They just check the tiles around them and move to whichever one is closest to where they're trying to go. It was much easier to write the different behaviors of the enemies with that because all I needed to do was change how they target.

     In the end, the final product isn't own I'm fully satisfied with. There's a lot more I wanted to do in terms of gameplay and graphics, but even simple particles were starting to annoy me with their minor bugs, not to mention the way the enemies sometimes get stuck, and my only workaround ended up making them turn around on the spot. Other than that, pretty much everything works as intended and I'm excited to move on to my next project. It probably won't be another one in this series since I feel like I've learned as much as I can from these, especially with this game becoming less and less like Pac-Man as I started adding more to it. So it would probably be best to move on from making clones of games and start working on something I can be proud of.

Files

Bol-Man.exe 67 MB
May 12, 2024

Get Bōl-Man

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.