Asteroids - Arcade

playdate-asteroids

asteroids.pdx

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!

7 Likes

Really nice!

Solid 30fps, but there is frequent garbage collection pauses/hitching.

And no way to restart at Game Over.

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.

B does not insert coins for me.

B is the fire button, A is the start button.

Either way, at Game Over I am unable to play again by pressing any combinations of A/B.

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.

Here's what I see:

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...

1 Like

Yup, this one works!

Love your attention to detail.

Thanks for pushing the update.

1 Like

Updated the asteroids.pdx file above.

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.

Bug reports welcome!

if you push the "A" button while playing. the game crashes with:

attempt to concatenate a nil value coming from input.lua:72

@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.

1 Like

Very cool! It runs really well on my Playdate.

1 Like

I finally got my Playdate - I've updated the above asteroids.pdx file to fix some crashes and properly save the high scores. Enjoy!

3 Likes

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

@basvandesande Sure thing! You can download an alternate version of the Asteroids game here: https://arcade.netingredients.com/asteroids/asteroids.pdx.alt.zip

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.

3 Likes

I think that is a very valuable addition to this game.. I'll download it right away

Cool!

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.

that is what I would do...

just of of curiousity: did you write a small emulator to emulate the system roms?

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?

1 Like