I thought that I'd have a go at making something that wouldn't seem out of place in an 80s arcade. The result was probably more like an old ZX Spectrum game, but despite its simplicity it's not the worst way to kill a few minutes.
High scores are saved between sessions.
Not bad! I noticed that the AI seems to move randomly though. Some kind of pathfinding might make it a bit more interesting. For something like this, I think A* would probably make it much too relentless, so a "flawed" AI would probably work better. Check out the AI section of my tutorial here for a sample algorithm: https://www.lexaloffle.com/bbs/?tid=3117
This would certainly add some more difficulty, which is good. If it seems to be a little much, maybe decrease the spawn rate of the enemies so there aren't too many too quickly. Another technique you could look into for helping balance the difficulty could be Pacman-like modes for the AI, where they alternate between "chase" and "scatter" modes (or maybe chase using my AI algo and random mode using your current algo). A way to be able to kill enemies would also be great, but it depends on how far you want to go into Pacman territory.
Yeah, I did consider a few different ways to improve the AI. Currently, their movement is random with the only rule being that they can never completely reverse their movement and turn back on themselves. It makes them more predictable, which obviously makes the game easier, but it also makes it less infuriating to play.
Perhaps doing something as simple as just favouring the rough general direction of the player could work to add difficulty.
Overall though my goal was to get something that worked and contained all of the most basic elements of a game. The code is a horrific mess, which stems from a mixture of not being used to Lua (I'm a C# programmer) and completely failing to do any planning whatsoever, so that puts me off expanding on it. Half of me wants to improve it, and the other half just wants to draw a line under it.
Half of me wants to improve it, and the other half just wants to draw a line under it.
Or maybe a third option would be to do a sequel where there would be end to the amount of coins to gather, which the player would then have to go through an escape tunnel (a la Lock 'n Chase) in order to begin a new, different maze. Because this is a solid enough start as it is.
Also, nice av too :)
Does it save your high score if you left the page or refreshed it, or just in between plays while still on the same page?
It uses Pico 8's cart data feature, so it should persist between sessions regardless of whether you leave/refresh the page or even close the browser and reboot the computer.
Or maybe a third option would be to do a sequel
To be honest, that'd be the most viable option. I'd planned for a two-player mode originally, so it'd be nice if I could do something like that.
[Please log in to post a comment]