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...
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.
Very cool! It runs really well on my Playdate.
I finally got my Playdate - I've updated the above asteroids.pdx file to fix some crashes and properly save the high scores. Enjoy!
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: asteroids.pdx.lua.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.
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?
Ha! No. I'm not that smart. I just did a bunch of research (I even found an article online that showed the original sketches on graph paper of the ships + asteroids so I could get those vectors exactly correct), found the sounds online, played a ton of the MAME version, etc., etc., etc. It's fun reverse engineering the old games. Gives me a better appreciation of the effort that went into the originals.
Okay that's impressive. Plus rewriting Asteroids probably much more fun than writing an emulator.
nevertheless hats off ![]()
the port you made is really accurate, but i think it is too hard to play on the playdate. e.g. the bullets that the ship fires are so small that they hardly can be seen. Furthermore the speed of the astroids can be a bit slower. If you manage to fix that, then you nailed this port ![]()
@basvandesande These are really good ideas. I had thought more or less the same thing once I saw the game on the actual device. It was a completely different experience in the Simulator. Even though the shots are equally as hard to see in the real arcade version, I agree with you. And the smaller screen does beg for slowing the whole thing down a bit. I may play around with those changes and repost another version. Stay tuned.
