Star Honor - A Space Roguelike Adventure

Ok, give it another try, I just upgrade to Arduino 1.6.9 and Arduino AVR Boards version 1.6.11
I then optimized a function to pass around an int and consolidate the float operation to once instead of four times, saving about 96 bytes.

Sketch uses 28,622 bytes (99%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,620 bytes (63%) of dynamic memory, leaving 940 bytes for local variables. Maximum is 2,560 bytes.

Thus the EXACT game size is ruined. I was sorta proud of that. What the heck am I going to do with 50 bytes? Oh, more text…

1 Like

Star Honor title animation. Was testing out something , so I thought I’d use your game title.


:joy: dude! This is so nice.

I get this

In file included from /home/me/Downloads/StarHonor/StarHonor.ino:4:0:
sketch/ArduboyCustom.h:5:24: fatal error: ab_printer.h: No such file or directory
#include “ab_printer.h”
compilation terminated.
exit status 1
Error compiling for board Arduino Leonardo.

What should I do???
and by the way, great game!!

1 Like

I took a few minutes and ported Star Honor to my Arduboy2 library. It now compiles even a bit smaller.

I haven’t tested it much so I don’t know if it works exactly the same.

My fork with the changes is on Github. I can make a pull request to the original repository if you wish.

1 Like

You should try to keep at least about 20 bytes free. Selecting a different board type can change the size. My Arduboy2 library version compiles to 28580 bytes for board type Arduboy but compiles to 28590 bytes if you select Leonardo. I use board type Arduino/Genuino Micro for my home made system, which also requires 28590 bytes.

Which compiler are you using and platform? Do you have the latest Arduboy library from GitHub? Seems strange it can’t find ab_printer.h

That’s very cool looking. Wish the Arduboy had an SD Card slot to have as much code/assets as I want but that’s what I like about the platform. No project can spin out of control.

MLXXXp put up your game that uses the arduboy2 library and that works.

I appreciate that but I’d like to get the one in my github working first for my own education before I merge in another lib. I’m interested in why it isn’t compiling because I have it working on my end and if I’m not using ab_printer, the Arduino IDE should basically compile it out. I’m going to be doing a code clean up soon as well so I already have a branch that I need to work on and bring back and I’m not great with Git.

You have
#include "ab_printer.h"
on line 5 of ArduboyCustom.h.

The compiler has no idea what the purpose of ab_printer.h is, so it tries to load and compile it, which gives an error because it doesn’t exist.

It’s true that because your sketch doesn’t use it, it won’t be linked in to your sketch, but it still has to be able to compile it. The same goes for all the other errors you get from references to things that have been removed in your custom libraries:

In ArduboyCustom.h:

#include "audio/audio.h"

ArduboyAudio audio;

In ArduboyCustom.cpp:

#include "glcdfont.c"

#include "ab_logo.c"

drawBitmap(20,y, arduboy_logo, 88, 16, WHITE);

line = pgm_read_byte(font+(c*5)+i);

1 Like

Ok, for some odd reason in OS X it compiles fine but the moment you remove #include “ab_printer.h” all of it comes apart. I’ve edited the library and tested compiling and installing it on a vanilla install of the Arduino IDE in Windows.

Is the Arduboy2 something you maintain MLXXXp?

For now.

It looks like its functionality is eventually going to be incorporated back into the official Arduboy library but things are proceeding slowly, as usual. As it stands, you should be able to use Arduboy2 and then once the official library is released, to switch to it you would just change Arduboy2 or Arduboy2Base to Arduboy or ArduboyBase in your sketch.

If you’re curious, you can follow along in the develop branch of the Arduboy library:

I’ve just installed it without any issues. I love it, my favorite game. This has so many potential, i wish the arduboy could have more flash…

1 Like

You installed from the GitHub in the original description? (Just trying to get it working for everyone)

I’m glad you liked it! Like I said in the original post, I had a lot of plans but ultimately I had to distill the experience down to the core. There’s a lot of power in constraints for you design and the Arduboy is amazing for that. With a little more space I could add AI Ships, Deeper “loot” and equipment system, etc. You can see remnants of stuff like that in the code.

I’m going to be cleaning up the code base soon (Working a lot right now) but I checked it in like that just to show people and to have a branch preserved incase I ever revisit those aspects. Thanks for playing!


You installed from the GitHub in the original description? (Just trying to get it working for everyone)

Yes i did, arduino IDE in OSX. didn’t need to change anything.

In file included from /home/ramonml/Arduino/StarHonor/StarHonor.ino:4:0:
sketch/ArduboyCustom.h:5:24: fatal error: ab_printer.h: No such file or directory
#include “ab_printer.h”
compilation terminated.
exit status 1
Error compilación en tarjeta Arduino Leonardo.

1 Like

Did you grab latest? In the GitHub that line is commented out.

That was so close…


You might want to check my tool. I wrote this long ago to accomplish the same thing (converting RAM pngs into bit-level Arduboy assets). It also does some complex stuff such as generate interlaces sprites with embedded transparency that can be used with the pure assembly sprite rendering in my Arduboy Extra library.

There is no faster way to get a transparent sprite onto the screen that this code. :slight_smile:

When you need the speed you need it… when you don’t you might never notice how slow all the existing rendering methods are. :slight_smile: Many people have no idea what the Arduboy hardware is TRULY capable of.

Oh it’s possible to use the core library (without modifying it) and still remove most of the bloat… you just start by calling boot() not begin() and then add back exactly what you want - and most of the fat gets trimmed automatically by the compiler.