Maze Trudger! by Colossal Gnome

You've found yourself in an intricate maze. You must trudge all the way to the furthest south-eastern most point to escape. Along the way you will encounter a great deal of some sort of sticky, smelly muck that you will have to trudge through as there is no way around it. Unfortunately this muck sticks to you, and when it's disturbed a strong odor emits from it that gets some maze creatures all riled up, causing them to have the seemingly insatiable desire to go for a jog through the maze. The more muck you disturb, the more likely it is that you'll encounter one of them -- or that they'll encounter you. While they probably won't chase you, as your paths cross it is likely they'll take a little nip (or maybe more than just a little), and your only defense is to run away.
You'll also find health packs scattered about to recouperate from those pesky bites, and flares that you can launch to briefly illuminate parts of the unknown maze. Good luck, you may or may not get out alive,but every maze is different...
Game Controls:
Navigate with arrow keys, launch flares with the space bar.
You start with full health, no flares and no muck (like the clothespin nose icon on that power bar? hee hee) As for muck, don't worry you'll find PLENTY throughout the maze. Up to 30% of cells will contain some, and of those that do some will have enough to get you on up to three passes through that cell.
Health and flares are scattered randomly throughout the maze. Up to 15% of cells will have one of the other, and of those cells there's a 50-50 chance they'll have one or the other. It's likely you'll encounter both, but there is a chance that you won't encounter any in some mazes -- it's all random.
Tools used:
- Phaser JS game engine -- more specifically, this starter project which took care of much of the overall environment config.
- Photoshop to draw the art assets
- Texturepacker to prep spritesheets
- Reaper for audio editing & timing of audio sprites
- VS Code for the code editor
Notes
This is my first game jam, and really the first completed game of any sort with graphics -- although it's a more complex reimagining of a basic maze crawler I built using a similar algorithm for an extra credit project in a Pascal class back in highschool (~24yrs ago, specifically).
There is no start menu, ran out of time to implement that. But really all that would've been is a play button. The game will begin automatically after the intro screen, on win or death you'll just launch back into a new game again automatically. So while a menu would maybe be nice it's not a big loss to not have it.
I also did not get a chance to include control buttons for mobile devices which pretty much prevents playing on an ipad/etc. Though it would be easy enough to add that in, just need buttons that trigger the same move function.
For the math geeks and technically interested folk; maze generation uses the classic Prim's Algorithm.
Struggled a number of hours trying to get creature AI implemented so that they would actively seek the player out, that had several unfortunate results:
Actively running pathfinding logic for up to 100 creatures in a 1500 cell maze pretty reliably crashed the game or used so much processor that the game became entirely unresponsive
Most performant pathfinding algorithms seem to expect a different type of grid than the data structure used to maintain the maze structure, I'd have to experiment more to see if something like A* would work with the structure used (it's a 2-dimensional array representing cells in height & width, where each cell contains an array of 0/1 values for top, right, bottom & left walls.) It seems for things like A* to work I'd need a flat grid instead.
Using less intelligent seeking behavior resulted in creatures just deciding to stop moving, or exhibiting very stupid behavior (repeatedly moving between two cells indefinitely)
In the end, the "AI" is only intelligent enough to keep track of their own previous cell locations, and it then randomly selects any other direction to move whenever possible. The result is that creatures very actively free-roam large swaths of the maze, and very little processing overhead is involved. In testing I was able to have several hundred active creatures with no negative impact on game play (other than a ridiculous number of creatures in the maze!)
Ultimately not having the creatures actively seeking you out is beneficial, the game wouldn't be at all enjoyable with 100 creatures who always know exactly which way to go to find you. The existing implementation, albeit not smart about finding the player keeps it more fun, and gives you some semblance of a chance of finding the maze exit (lower right corner, always).
Ratings
| Overall | 408th | 3.25⭐ | 28🧑⚖️ |
| Fun | 411th | 3.135⭐ | 28🧑⚖️ |
| Innovation | 427th | 2.962⭐ | 28🧑⚖️ |
| Theme | 485th | 3.077⭐ | 28🧑⚖️ |
| Graphics | 405th | 3.135⭐ | 28🧑⚖️ |
| Audio | 326th | 2.942⭐ | 28🧑⚖️ |
| Humor | 296th | 2.82⭐ | 27🧑⚖️ |
| Mood | 352th | 3.042⭐ | 26🧑⚖️ |
| Given | 20🗳️ | 28🗨️ |
Thanks for playing, happy to hear you enjoyed it!
this._frame is null game.min.js:280:562
Discovered as long as you are moving in the opposite direction to the rats you don't take damage. And conversely, if you move the same direction you can take damage each turn, making it often the best option to stay still and let the rat pass.
@ryan-temple, @masamunedragon, @btwj thanks for playing, glad you enjoyed!
Edit: Tried the last two latest version of FF on mac and couldn't reproduce the typeerror.. Bummer.
Muck avoidance strategy would be an interesting addition, but the nature of the maze algorithm used is that there is exactly one path between any two cells in the maze at all times, so it's probably not possible with this style of maze. I have noticed though that you can go diagonal around corners if you press the two buttons in close enough succession, so some things can be avoided that way -- additionally (and similar to the flaws in bite detection) if you're moving too fast it's possible to not pick up an item or trigger a cell as visited.
Definitely room for improvement. I appreciate the feedback :)
> I stepped in something.
> I stepped in something.
Cool game! Movement was interesting--I know you mentioned above that it's due to (potential) bugs, but I do like the idea of being able to dash past rats if you time your movements correctly.
From a technical perspective, I wonder if there are maze generation algorithms that are designed around limiting backtracking. Obviously dead-ends are an intrinsic property of mazes, but I wonder if there's a way to limit the potential length of any particular path/branch.
@Sholf yeah I agree the audio is kind of annoying after a while -- it was the last part added just before cutoff or I'd have worked a bit harder to make it less repetitive and maybe only play the 'pickup' sounds sometimes. Didn't have time to tweak it at all.. in fact I think my bite audio sprite may have one of the muck sounds in it too, kept saving over my audio spite json files with config for different sprites so I probably screwed that up during one of the several times repopulating them. (I wonder if there's a good tool for that, if not I might have to make one.)
An enjoyable game!
@chong-lee If you're interested I have very similar maze-gen logic & a much simpler gameplay that runs on the command line with node in [this github repo](https://github.com/willvincent/js-maze). It lets you specify the maze size, and you can toggle between individual cell view, and a full map view (full map will break if you go too big on the maze size). You can also toggle between modes similar to what this game shows, maze becomes visible as you explore, or 'easy mode' where you can see it all the time (like when a flare is lit here).. Just like this game, that uses an implementation of the prims algorithm. I referenced it when building this game.
I liked trying to decide how to use the flares efficiently and trying to remember the shape of the path after it fades away. I found that if a rat and I swap tiles I would sometimes be able to take no damage (though perhaps the rat was not hungry). I could also hide in a dead-end and hope the rat would go in a different direction.
I'm a fan of voice-acting in game-jam games, and you added a few variations so it wasn't too repetitive (though I found it funny when I sprinted through large areas of muck).
The maze is pretty huge! I explored something like 4 screens worth of tiles without finding any exits.
Backtracking on a large and complicated maze is a bit frustrating because of how much time it takes. I think it would be ok to allow a few cycles in the maze so that you can have more than 1 route between some areas. Since you are basically blind it should still be challenging.
is really hard to lose btw, too many healths
and also too many flares, you never run out of flares
one thing that bugs me is controls: you should be able to keep going in a direction by holding down
also the voice is quite annoying
but i played couple times so gg
The maze is 50 cells wide, by 30 cells tall -- so there are a total of 1500 'rooms' in every maze. Thanks for playing glad you liked it :)
@frescogusto It's all random, while you certainly can end up in a very well stocked maze, it's also possible to have _nothing_ populate (though thats a remote chance)... The way it works is it generates a random number between 0 and 15% of the maze size (225) and then scatters that many items randomly throughout the maze. It is definitely possible to never run across any flares or health. But yeah I agree at the top end the number of items can be kind of excessive.
Sound was the last thing added, right at the time cutoff, so I didn't have a chance to tweak it to be less frequent (which was originally my intent) . Ideally there needn't be a sound _every_ time you step in muck, or pick up an item... also agree, controls could be improved :)
Thanks for playing.
Thanks for playing :)
Not accurate for how the flares actually work, but this was the inspiration for the art for the flares:

The maze generation was interesting, but I think the gameplay would have benefited from a starting with a smaller maze as well; it's pretty challenging to get to the end just due to the sheer scale of the map.
fyi the \*s in your game's description (in "A\*") are turning sections of your description into *italics* because wrapping a block of text in them is the markdown syntax for that. You can put a \\ in front of them to avoid that.
Thanks for the heads up on the A\* issue, I hadn't noticed. :)
Thanks for playing.
The maze is VERY big, and a lot of it is just dead ends. The enemies can DESTROY you thanks to not being able to see what's ahead, even with flares, sometimes you
can just 'pass' through enemies, health packs and flares for some reason. And (this is just my opinion) I'm not too fond of the tile-based controls.
But hey, this is just your first Ludum Dare (this is also MY first Ludum Dare, and my game has IT'S problems as well), and for your first Ludum Dare, a decent entry (ignoring the not so good stuff, that is).