This isn’t a problem (I hope) but just an interesting question. Maybe someone who’s curious about it, or wants to show off their compiler/linker knowledge, can have a go at explaining it.
As part of creating the recent v6.0.0 release of the Arduboy2 library, I compiled and tested a fair number of existing sketches to make sure they worked identically to before. I also noted the program and RAM size differences from the previous v5.3.0 release. Program savings varied, with some saving only around 20-30 bytes and others 200-500 or more.
However, one sketch, Evasion by @obono, was far above the others, with a code savings of 2414 bytes. (The next highest savings of those I tested was 766 for SetSystemEEPROM with all others below 550.)
So, the question is: What is it about Evasion that results in such a high code savings compared to others? (I guess a pre-question is: What is actually causing the savings for all sketches? I haven’t investigated this.)
It’s probably related to the fact that the game creates a child class, MyArduboy2, which inherits Arduboy2 and overrides and adds quite a few functions.
Note that in order to get this game to compile, you’ll have to change or remove the
#if ARDUBOY_LIB_VER != 50201
test for a specific library version, at the start of file MyArduboy2.h
I’d like to investigate this myself but I spent a fair amount of time working on the new Arduboy2 release and now want to do some other things I’d set aside.