Log In  

Cart #34919 | 2017-01-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

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.

P#34921 2017-01-04 13:29 ( Edited 2017-01-05 22:00)

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.

P#34924 2017-01-04 14:39 ( Edited 2017-01-04 19:39)

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.

P#34925 2017-01-04 15:20 ( Edited 2017-01-04 20:20)

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?

P#34927 2017-01-04 15:27 ( Edited 2017-01-04 20:27)

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 :)

P#34932 2017-01-04 16:02 ( Edited 2017-01-04 21:02)

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.

P#34941 2017-01-04 17:15 ( Edited 2017-01-04 22:15)

Not bad. Simple and sweet.

P#35015 2017-01-05 17:00 ( Edited 2017-01-05 22:00)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 23:10:10 | 0.022s | Q:25