Garage-Collective / Dark-And-Under

Dark & Under game for Arduboy.
BSD 3-Clause "New" or "Revised" License
32 stars 16 forks source link

Consider updating to Arduboy 5.0.0 #19

Open Pharap opened 6 years ago

Pharap commented 6 years ago

Now that Arduboy2 5.0.0 is released and it includes some of the optimisations that our custom version has, it's probably worth checking to see if compiling with the new Arduboy2 version can give us a size reduction.

If it doesn't, we can close this and do nothing. If it does, we'll figure out a way to adjust the game to use it.

Pharap commented 6 years ago

I had a go at this, it didn't turn out too well.

https://github.com/Garage-Collective/Dark-And-Under/tree/Arduboy2-5-0-0

Arduboy2 v5.0.0 added 214 bytes of progmem.

Pharap commented 6 years ago

I've decided to revisit this. I've scrapped the old branches and created a new one:

https://github.com/Garage-Collective/Dark-And-Under/tree/external-arduboy2

Using the master branch (as of commit 7202eb1) I get:

Sketch uses 26576 bytes (92%) of program storage space. Maximum is 28672 bytes. Global variables use 1806 bytes (70%) of dynamic memory, leaving 754 bytes for local variables. Maximum is 2560 bytes.

Using this new branch (specifically as of commit 6641602) I get:

Sketch uses 26796 bytes (93%) of program storage space. Maximum is 28672 bytes. Global variables use 1799 bytes (70%) of dynamic memory, leaving 761 bytes for local variables. Maximum is 2560 bytes.

Later on I'll try making another branch using SpritesB to see if it makes a difference, but unless it brings us within 20 bytes of the master, I'm not sure it's going to be worth us relying on the public version of Arduboy2.