Chicken Launcher - A Bird Flinging Game

Chicken Launcher - v 1.1

Chicken Launcher is a fun lil’ game I made for the Playstation Vita and ported to the Arduboy based off of Kitten Cannon. Shoot a chicken as far as you can, trying to hit springboards to give you a boost, but watch out for spikes! Your high score will be recorded and saved. If you think you get a big high score, Tweet me a pic!


A: Set X velocity and Y velocity
B + Up: Erase game data


Download Sketch:
Download HEX:
Download .ARDUBOY:


Follow me on Twitter for more updates and releases: @crait
Check out my site for my other stuff:
If you’re interested in the PS Vita version, check out my post here:


1.1: September 9, 2016

  • Switched to standard get()/put() for storing data into EEPROM
  • Fixed potential text issue
  • Removed title and instruction screen from repeating
  • Added the option to erase game data (B + Up)
    1.0: September 8, 2016
  • Initial Release

F.Y.I. The Arduino IDE provides ways to write and read “anything” to/from EEPROM using the put() and get() functions.

After disabling the code that loads and saves the high score to EEPROM, this game compiles and runs on my Arduboy-Z prototype system. However, the faster processor makes it run much too fast.

You should consider using setFrameRate() and nextFrame(), or some other method to pace the game based on real time, if you want it to be more portable and “future proof” for other hardware.

Wow! I love living in the future! I’ll be sure to include this in my future updates/releases.

That’s awesome! Did you do anything to limit the speed? Did you try the game out? What did you think?

I’ll definitely take that into consideration in the future! I always appreciate your feedback.

No, not yet. I spent the remainder of my time yesterday trying to debug a problem with the “New high score” screen, which I’ll discuss below.

I played it on my real Arduboy. It’s kind of fun for a while but gets boring quickly, since once it starts you just sit back and watch, with more or less random results. Even the setting of the vectors at the start is kind of like rolling dice, with little skill involved. (You’re welcome to point out the same thing about my ArduboyLife sketch in this respect :smirk: )

I have a couple of suggestions:

  1. After the first time, when starting a new game after displaying the score(s), skip the intro screen and instructions and go straight to setting the vectors. It becomes tiresome to manually have to skip these screens each time.
  • Add a way to reset the high score. If another sketch has written values to your EEPROM save area you can end up with a huge high score value. Also, people may want to reset the high score, (for example, if someone else was playing the game), without having to load a separate sketch to clear EEPROM.

Now, regarding the problem I mentioned above with the “New high score” screen:
On my Arduboy-Z ARM based system (not on a real Arduboy) this screen is either skipped completely if the high score is 9999 or less, or the game locks up on a blank screen if the high score is 10000 or higher. After some experiments, I think it has something to do with the sprintf() function used to format the NEW HIGH SCORE! message. I didn’t go far enough to determine the exact problem. It could be the \n line break included, or maybe just the long length of the format string. I didn’t investigate further because I suggest that you don’t even use sprintf()

In addition to printing strings, the print() function is able to format and print numbers. Your use of sprintf() is simple enough that it’s easy to just use print() instead.

Here are changes that I made to eliminate using sprintf() (I’ve commented out the original code):

The text[] array is no longer needed:

//char text[24];

In the three blocks that use sprintf():

        arduboy.setCursor(0, 0);
//        sprintf(text, "%li", distance);
//        arduboy.print(text);
        arduboy.setCursor(25, 30);
//        sprintf(text, "NEW HIGH SCORE!\n        %li", highscore);
//        arduboy.print(text);
        arduboy.print(F("NEW HIGH SCORE!"));
        arduboy.setCursor(48, 38);
        arduboy.setCursor(30, 19);
//        sprintf(text, "SCORE: %li", distance);
//        arduboy.print(text);
        arduboy.print(F("SCORE: "));
        arduboy.setCursor(10, 34);
//        sprintf(text, "HIGH SCORE: %li", highscore);
//        arduboy.print(text);
        arduboy.print(F("HIGH SCORE: "));

sprintf() pulls in a lot of code for its formatting logic. With the changes above, the displayed output is the same as before but the code size is reduced by 1266 bytes.

Awesome! Thanks for testing the game and giving your feedback. I actually went back and updated the game to 1.1 with all of these suggestions. I’m going to go back and update my other games to add a feature to erase the game data because that’s really important for a system that doesn’t have specific guidelines to memory management.

As far as adding more agency to the game, I’ll have more games later on that are more interactive. This is just one of my favorite mini-games from back in the day, so I wanted to stay true to its play style and not include too many more features that I’ve seen in other clones.

1 Like

@crait, I think you made a copy/paste error in V1.1 on line 772:

Shouldn’t it be?:

1 Like


YES! That was a mistake! I was testing something!!! I switched it back, so we should be gucci.

How do I download the file? When I click the link, I just get a webpage of text

Right click, “Save Page As”, find where you want to save it, then (assuming you’re on windows) choose “All files” from the drop down menu before pressing “Save”.

I can only see an option to save as HTML

There are actually 3 ways to download this game, so I’m not sure which “file” you’re having trouble with. Is it the .HEX file? (You shouldn’t use that one!) Or is it the .INO file? I’m assuming it’s the .INO file. If it is, you can copy/paste all of the text into a new .INO file in the Arduino IDE. If this sounds confusing to you, I’ve also included the .ARDUBOY file, which you can find, here:

If you’re unsure how to transfer that file, no worries! You can rename it to and open the file up manually to get the .HEX file out if that was your issue. Otherwise, you can use my Arduboy Manager app to download this game, which can be found, here: Arduboy Manager 2.0 Released! This program will allow you to upload .ARDUBOY games, but it also shows you a list of games I have hosted on my server, including Chicken Launcher, meaning that it’s probably unnecessary to even download the file once you use this program.

1 Like

Which browser are you using?

To double check, it’s the .hex link you’re clicking on right?
And the text that comes up looks like this?:


(And so on.)

@crait’s right that if you can learn how to use the Arduino IDE then it’s often a lot easier than using the .hex, though’ll still come up as “a webpage of text” so that still leaves the issue of how to download a plaintext file in whatever browser you’re using.

I use Edge for my browser

Hrm, I can’t find anything useful online about the context menu of Edge.

Looks like it might be easier to copy and paste the text into notepad and then save it with the right extension.
Just in case you don’t know how to do that (sorry if you do know most of this, but I’d rather be as thorough as possible):

  1. Go to the text page
  2. Right click > Select all (or alternatively press Ctrl+A)
  3. Right click > Copy (or Ctrl + C)
  4. Open Notepad
  5. Right click > Paste (or Ctrl + V)

So you end up with something like:

  1. Click File > Save (or Ctrl + S)
  2. Choose where you want to save it
  3. Overwrite the name with either “ChickenLauncher.hex” or “ChickenLauncher.ino” depending on which file you’ve picked (.ino might be easier since it seems you’ve compiled with the IDE before)
  4. Make sure to select “All Files” from the dropdown menu, like so:

  1. Click Save

Then you should have the file and I’m assuming you know what to do from there.

I figured I could do that, but I’d rather not break things. Thanks for helping me out.

1 Like

You should be safe as long as you don’t accidentally bits of the text after pasting.
If you choose the .ino file then the worst case scenario is probably the code not compiling.
The .hex would be more of an issue since you might not find out you’re missing bits of code until part way through the game.

No problem, helping with people’s issues is one of the reasons the forums exist.