Update November 11, 2016: The Arduboy2 library can now be easily installed using the Arduino IDE Library Manager:
- In the Arduino IDE select from the menus:
Sketch > Include Library > Manage Libraries...
- In the Library Manager Filter your search… field enter arduboy2.
- Click somewhere within the Arduboy2 entry.
- Click on the Install button.
Update October 20, 2016: V2.1.0 released with Team A.R.G. Arglib capabilities added.
Team A.R.G. uses their Arglib library (which is based on an early version of the standard Arduboy library) for all of their excellent Arduboy games. The Arduboy2 library now includes most of the extra functionality that has been added to Arglib. This includes sprite drawing, button handling, collision detection and compressed image drawing functions.
Since “the powers that be” can’t seem to decide how to continue with development of the Arduboy library past V1.1, I decided to fork the Arduboy V1.2 development code myself and turn into an alternative library, which I call Arduboy2 (for lack of a better name). Yes, I know Arduboy2 could be interpreted as being meant for some new “next generation” of the Arduboy system, but what can you do?
Allow more code space to be made available to sketches by, among other things,
removing the tunes functions and creating a separate library for them
allowing the “text” functions to be removed
allowing for having a minimal boot sequence which can eliminate any or all of the boot features, such as the boot logo and “flashlight”.
some optimization of the existing code
Allow other sound generation libraries and functions to be used. The tunes functions took over timer interrupts, which made it impossible for other libraries, which needed these interrupts, to work. The tunes functionality can be added back in using the now separate ArduboyPlaytune library. I’ve also written a new library to generate tones and tone sequences called ArduboyTones, which is efficient and uses substantially less code space than the tunes functions (but has different features). You can now even just use Arduino tone() (but using ArduboyTones will generate less code).
Fix the “frame rate” bug. The nextFrame() function was calculating the time to the next frame incorrectly. This has been fixed in Arduboy2. Update: There actually wasn’t a bug so this has been reverted to the original code.
Added a new boot up feature which allows the state of the audio enabled flag to be set and saved in system EEPROM, so all sketches with compliant handling of the flag will either come up muted or with sound on, as configured. Like other boot up features, this one can be left out to save code space. See the Audio mute control heading in the README.md file for details.
Allow Arduboy2 to coexist in the Arduino IDE alongside Arduboy library V1.1, so existing sketches can still use the Arduboy library without breaking. This is accomplished by using the name Arduboy2 for the library and class, so it’s different from Arduboy.
Maintain as close as possible compatibility with the existing Arduboy V1.1 API. Most of the API is identical except for the tunes functionality, which is slightly different due to using a separate external library. Most existing sketches can be converted to using Arduboy2 with minimal effort (which is detailed in README.md).
The Arduboy2 library is available now for your use. Feel free to use it for new sketch development or for further development of existing sketches.
Update: I’ve decided to just maintain Aduboy2 in my own repository as given above, and it can now be installed using the Arduino IDE Library Manager.
@ekem and/or other people of authority,
If you want Arduboy2 to become an “official” library, just say the word and create a new Arduboy2 repository under the Arduboy user on GitHub. I’ll try to get it up and running as quickly as possible. We could then start the process of making it available through the Arduino IDE Library Manager.
Discuss this topic
If you would like to talk about the Arduboy2 library, you can do so in your own topic OR go to this one: