Just skimming the source. Looks like some space could be regained by switching to a 5-bit encoding for the text vs 8-bit if anyone really wanted to.
How would you go about doing that?
Lots of different ways. Easiest way might be to just do 6-bit since then you don’t have to come up with a way to encode the punctuation and stuff (You might have more than 32 chars, not sure). But there are also ways to do 5-bit with extra chars if they are a subset:
I wrote an encoder in Ruby but never got around to a decoder.
For the “strings” that are pure punctuation there is also the chance you could use a bit of length value to store which character set you were currently shifted into.
Then it’s just a matter of getting an offset into the string and doing a bit of bit shifting to turn your value back into a “byte”. I guess technically you might need a small lookup table, but I looked at the text file and it looked like there were a LOT of strings there. 5/8 is almost a 40% size reduction though (before adding any code to work with the new encoding)… does someone want to run obj-size and find out the actual size of that string object?
Has anyone had any problems with the sound not playing at all? Just installed the game today, it works fine other than it just has no sound, no matter how I toggle the in game sound option. Ive also double checked the sketch to make sure it has the song files too.
Someone else is having problems …
Have you tried your device with other games to ensure the sound works?
Have you tried un-muting the system?
Try to upload another Arduboy2 library based game (like Arduboy2 PLayTune example and see if sound works after enabling system sound as @Keyboard_Camper discribed . When you have sound. Try uploading Arduventure again. If there is still no sound (or glitchy sound) It could be that the newer Arduino IDE versions may trigger a glitch in ATMlib that was recently fixed but is not yet in the release version of the library.
you can download the fixed ATMlib from here
Yes, after I noticed that the sound wasn’t working I tried playing CastleBoy which I knew previously had sound effects and sure enough, I do have functional sound with that game.
Sounds like @Mr.Blinky’s solution could be the correct one.
I still wouldn’t rule out the system setting as castlyboy uses the Arduboy library instead of Arduboy2
Cant seem to get the system control function to work, at least while running Adruventure. It just jumps straight into the game.
I don’t think its built-in in arduventure. Have you tried uploading the arduboy2 playtune example and if there is no sound, tried to set system sound?
So little update, I did test the arduboy2 playtune example and sound was playing like normal. I did also attempt to install the new fixed ATMlib that was linked earlier, but i’m not 100% sure if I did it correctly (I added it into my .zip libraries). Unfortunately Arduventure is still not playing any music.
I’m not sure how it works on OSX but I’d expect you have to unzip it and replace the ATMlib folder with the unpacked one. Alternately you could repace the ATMlib.cpp and ATMlib.h in the ATMlib/src/ folder
Gonna step in right here. Seems like the new Arduino IDE messes up sound. You’re not the only one.
Use the precompiled .arduboy files. This is one of the reasons why we create them.
You can rename .arduboy files to .zip, extract the .hex file and upload that one on command line OR just use the beta version of the Game Loader for MacOS: http://team-arg.org/AGL-downloads.html
Next week, I’ll have time to release a new version of ATMlib with your fixes
I just wanted to know for my self and tested compiling Arduventure with Arduino 1.8.6 and 1.8.7
with the latest ATMlib version and unfortunately It doesn’t fix the sound problem. 1.8.5 and lower work fine.
It seems that the problem is not limited to Arduventure. The ATMlib examples also play no sound
Looks like I found the culprit that caused the no sound problem with latest IDE and fixed it in time for the release Made a PR for ATMlib
HAHAH, was that somehow getting completely optimized away? Doesn’t code reference it anywhere?
Not completely but I did notice from some disassemblies that the new compiler is trying harder to leave stuff out.