Arduboy2base vs. Arduboy2

When is it appropriate to use one over the other and what are the differences between the two?

Arduboy2 has text functions (print, println) and Arduboy2Base doesn’t.
These functions, along with the font, take up space.
If your game has no text or you handle text yourself, you can make better use of that space by switching to Arduboy2Base.

2 Likes

Here’s a nice diagram showing what functions each does and doesn’t have:

(If you can’t read UML, # means protected, + means public, and the arrow points towards the parent class):

Nice. But what about the 14 more… bit in the first box?

There are also 41 more in the second box, and 7 more in the third.

One more question, do the individual libraries inherit the traits of their parent class?

No idea, I shamelessly stole the image from the Doxygen documentation.

Individual classes inherit all methods (also called member functions) and fields (also called member variables) from their parent class.
Anything marked private in the parent can’t be accessed by the child.
Anything marked protected can be accessed by the child but not the outside world.
Anything marked public can be accessed from outside the class (as well as by the child).

(There’s also the issue of friend access, but that’s not important for everyday use.)

1 Like

In the original Doxygen documentation, the collaboration diagrams contain clickable links which take you to the page with the full listings.

2 Likes

Thank you for all the information. It has been very helpful!

1 Like