Initial build of the arcade version of Asteroids. Not sure if Atari will ding me for this or not - just a fan of the classic arcade games. And it was a great way to get familiar with the SDK and Lua. I haven't gotten my Playdate yet, so I may make some adjustments based on how it feels on the actual hardware. Let me know what you think!
Thanks. I'll look into the garbage collection issues.
You have to hit B to insert another coin before you start. Was trying to stay true to mame-style games. And it also solved the problem of preventing the immediate restart of the game if you are mashing on the A/shoot button when your last life expires.
Odd. It works as I expect it to on my simulator. When a game is not active, B inserts a single coin (can't insert more than 1 at a time). Once a coin is loaded, A starts the game. When playing, B shoots and A is not mapped to anything.
Ugh. I'm an idiot. I had uploaded an old version of this to my server. Sorry for the confusion and thanks for sticking with this.
If you download the pdx file above again, you'll see the near-to-complete version. It has saucers, hi-scores, the coin/restart works(!), menu options, proper explosions, mostly true-to-the-arcade logic. I have a few things yet to do on it, but this one is mostly complete. Promise...
Cleaned up a bunch of code, including the main game loop. Made more refinements to mimic the arcade game. I used a pattern on the stroke of the asteroids to simulate the dimmer color of those vectors seen in the arcade game. Changed the menu options to be more useful - added a "clear hiscores" option so you can do it from there, instead of going out to the settings to clear the game data.
@deanhuff Sorry about that. That was a remnant of some testing I was doing. I uploaded a fresh copy of the .pdx file (above link) with that errant code removed.
You did a great job, it is very close to original.
One question though.. can you make an inversed version? Thus: white background, black vectors That will make the game easier to play in lower light conditions.
It would be nice if that is an application settings
I really liked the purity of the existing menu options (reset hi-scores, saucers on/off, lives), so I didn't want to make this a universal change to the original. The "invert" option replaces the "reset scores" option in this new version, since you can still do that in the settings by deleting the game data.
I suppose if you wanted to keep the historical purity, yet only maintain one app version, you could put things like the Invert option in the System Menu.
The "invert" is in the System Menu of the alternate version of the .pdx - but I ran out of space to add that to the 3 I already had in there -- you can only have 3 user-defined options in there. Correct?