Ardu Buggy [1.0]


(Marco) #1

Last two weeks I try to code something for long time. I chosed Arduboy for this scope, is simple & open.
Last time I tryed to code is 32 years ago with my first computer ZX Spectrum.
Start with a game “inspired” by Moon Patrol, because I think is enought simple and I can try to implement one thing at a time (background, terrain, car, shot, jump…).
On Vol.3 Arduboy Magazine i discovered that @metalidol made almost same game. Great! Now I can compare my little solution with code well write.

Sorry for my poor english.


New (another) unofficial repo :)
New (another) unofficial repo :)
(Gavin Atkin) #2

Nice, I like the look of the Rover :slight_smile:


(Holmes) #3

Very cool! Yeah, I watched the video before reading your post, thinking, “Hey, I’ve seen an anime game like this, before.” It’s cool you saw it in the Arduboy Magazine. I think it’s really cool to compare code to see how people do the same thing differently. :slight_smile:


(Marco) #4

Yeah, today I start some class tryout ( and space ship sprite).


#5

“Ardu Buggy”, I thought you were describing my development.


(Marco) #6

Ah ah! You make laugh also my wife.
Every line of code I must upload to view the result, because I’m pretty sure to make a mistake. Now, I buy some hardware to develop because I think to wasted at least 1000 of 10000 upload :worried:.


(Gavin Atkin) #7

I’m sure your device isn’t about to burn out.

If you make a mistake, the console window of the Arduino IDE will help you track down the error. And it won’t upload unless it is error free. You can also compile without uploading to make sure there aren’t errors. It’s a pretty quick process with such small files so feel free to do that as much as you want. :slight_smile:


(Marco) #8

Of course, but when I compile, my finger go instantly on upload sketch because my eyes must see the result :slight_smile:.
Anyway, this week I’m able to code 10 lines without upload. Little step.


(Marco) #9

Well, gameplay now is pretty copleted. Miss sound at all.

Uploaded on https://github.com/NonoNano/ArduBuggy

Try to reach 20000 point faster as you can, jumping and firing over 6 level.

Manage your ammo for last two level.

RIGHT: move forward and increase your speed

LEFT: brake

A: fire

B: Jump

Marco

#10

Love it! Thank you for making and sharing!

I almost thought it was Lunar Jetman, one of my fave games from way back then.

PS: Is it possible, can a clone be done? Can someone fit all of Lunar Jetman into the Arduboy?


(Marco) #11

I think is possibile.
My Dream is porting Underwurdle, always from ZX Spectrum.


(Marco) #12

Actually my record

Marco


(Marco) #13

Released version 1.0, link to download on first post.

Added some tone and corrected other stuff.

It’s a 10-15 min. game-time. I wish you can enjoy with it.

Thank’s to all to allowt me to (re)create something playable end fairly complete.

@bateske master of Arduboy
@TEAMarg with usefull tools and tutorial
@crait with Pong tutorial

 Marco

(Scott) #14

@Nono_Nano, Nice work!

A few suggestions:

  • There’s no need to have the pinMode() calls in setup() for the RGB LED. Calling arduboy.boot() will set these pins as outputs properly.

    It would also be better to use arduboy.digitalWriteRGB() to control the LEDs instead of digitalWrite(). With the latest version of the Arduboy2 library, arduboy.digitalWriteRGB() can control each LED individually, or all at the same time as before.

  • It would be better to use arduboy.audio.begin() instead of arduboy.audio.on() in setup(). This way, the user will be able to mute the sound using the system control mute function (hold B during boot up, then while still holding B press UP for sound on or Down for sound off).

  • Your code generates a few warnings when compiled, so it may not be working exactly as intended. To see these warnings select
    File > Preferences
    in the IDE.
    Then set
    Show verbose output during: compilation
    and set
    Compiler warnings:
    to All
    You can ignore the EEPROM warnings but you should look into the others.


(Marco) #15

Thank’s for suggestion and tips.
I made change shortly.

Marco


(Scott) #16

@Nono_Nano, Why are you using arduboy.boot() instead of arduboy.begin()? Do you have a reason for disabling the boot logo?


(Marco) #17

No, not any specific reason. I can change this.

Marco


(Marco) #18

I think now the problem is solved.

Marco


(Scott) #19

You don’t need to call arduboy.flashlight(), arduboy.systemButtons() or arduboy.audio.begin() anymore. They are all included in arduboy.begin(). And, if you’re using random() you should include arduboy.initRandomSeed().

void setup() {
  arduboy.begin();
  arduboy.setFrameRate(60);
  arduboy.initRandomSeed();
}

You should use the defined values for turning on and off the RGB LEDs.
RGB_ON instead of LOW and RGB_OFF instead of HIGH

arduboy.digitalWriteRGB(BLUE_LED, RGB_OFF);
arduboy.digitalWriteRGB(RED_LED, RGB_ON);

(Marco) #20

Thank’s a lot!

Change -> done

Marco