Meteor -- By DFX2KX


Author :  DFX2KX

A simple Gamebuino Meta port of the arcade game 'Asteroids':

The game has the typical loop-around asteroid-shooting fare of the arcade game, with the ability to change the color of the Background, Ship, Astroids, the lasers, and the text that appears on screen. If you want classic black and white, or to go full pastel, you can.

These settings are adjusted in a nested menu system that pauses the game while you're there. It also saves any changes upon exit, the game will remember what you used last when you load it again. Hit Menu to go into the options, then back to the game.


WIth some help from Riksu9000, Sorunome, and Rodot, I've gotten it to a playable state.



background jingles for the stage, 'game over' and 'credits' screens.

Potentially re-implementing polygonal asteroids (there was a lot of CPU overhead, but if I can squeeze more performance out, then you'll be able to shoot and rocks and not beach balls).

Adding scoring and high-scores to the game, as well as a menu option to see them.

See more
Author :  Riksu9000

Hi. I made this little demo from scratch. Hope it helps! :)

Author :  Aurélien Rodot

Hey, you can attach files to your post, please avoid external hosting as it will eventually get down. Thanks!

Author :  Riksu9000

Uploading files doesn't seem to work for me. It just says "SOMETHING WENT WRONG. PLEASE TRY AGAIN." Tried firefox and chromium on windows and linux and tried to upload different files but it always fails.

Author :  DFX2KX

oh, sorry about that. I wasn't sure how to actually do that. The internet was not cooperating, so it took a few attempts just to get this.

(edit: fixed, though it names the zip something odd)

Author :  DFX2KX

You are a rockstar. I think the issues I was having stem from taking a what would work in geometry class? approach, where that's not always the best way to do things.

That certainly shows a much more efficient way of doing it!

Author :  DFX2KX


Using Riksu9000's technique for drawing the green line in his little demo, I've produced a way to render 2d polygons at arbitrary angles:

I'll have to heavily document how you actually encode the shape (it's not a series of x/y points in this case, but a series of angle/radius pairs. the ship is drawn conterclockwise, line by line. I'll see if I can make it wait during the draw phase so I can show it off, I'm pretty darn proud of that right there!

I haven't tested my implementation of Rik's physics approach, but given the drawing works, I'm pretty sure the flying part will, too.

Author :  DFX2KX

finally got near-pixel-perfect screen looping working. The ship already loops, but if you're sitting near an edge of the screen, you'll see your ship partially on the other side:

I also have part of the collision system in, and can now copy the draw routines to implement the rest, make some polygons for the asteroids, and set up the lasers. That should then let me actually say I have a proper basic Asteroids clone.

And then I have to learn how saving things to a sav file works.

getting this to work reliably added more dev hours then I thought it would....

(edit: I'll update the Github once I've got something to shoot at :P)

Author :  DFX2KX

Update: I've been super busy this last month, so haven't had the chance to properly test my collision code.

However, upon trying to compile it, it has decided that 'Poly' isn't a declared class, Despite Poly being declared, with constructors, at the top of the bloody sketch.

I hate C/C++ with every fiber of my being. The compiler's error messages, even on full Verbose, are about as informative as a brick wall. I have no idea why this is happening, as the collision system is practically a clone of the drawing function that worked up until now.

I'm still going to make this work... But it's more a matter of perseverance then pleasure at this point.

(if any of you guys have the time, I stuck the current working build in it's own branch. If any of you have an idea what's with this thing, I'd love to hear it, it can be found Here )

Author :  ragnarok93

Yeah I feel You bro/sis ;). C++ errors later on give really small insight on whats wrong in your code (its pain in the ass), and when You are using pointers then it doesnt even show You errors so You have to use debugger to see whats going on xD. Never thought that I gonna code in C/C++ (I was avoiding it as much as I could) but now when Gamebuino arrived I have no other option xD. Still its fun to learn new language and new programming techniques :D. I wish You much much patience and perservance :D.

Author :  DFX2KX

Update: It is now a proper GAME.

There are Asteroids, and the control mapping and color change feature is accessible with the menu button.

(also clarified how to get into those settings. It's menu XD)