A post was split to a new topic: Having trouble loading Circuit Dude
With the new version 5 release of the Arduboy2 library, this problem, which was never addressed, manifests itself more severely. The changes to setRGBled() make it more “aggressive”, so sound is now corrupted.
Changing sound to use the new BeepPin1 class might provide acceptable sound, without conflicting with the RGB LED. (The issue is that @crait wants a smooth sounding ramp during “self distruct”. I haven’t experimented to see how BeepPin1 will handle this).
The main issue with switching is that BeepPin1 requires count values, instead of frequency values used by ArduboyPlaytune. The values to ramp the tone up would need to be inverted and possibly adjusted differently to produce the desired glissando.
Im not going to use the LED at all in any of my games. Its too bright and of course weird to program with that issue you cited.
But you can control the brightness … I am using the ArduboyTone library and the new setRGBled() command in Lode Runner. I have fixed most of the ‘brightness’ levels by setting the various colours to about 64 - anything else is too bright for me.
Oh no’s One of my favorite games been crippled . I looked into why the problem is more severe and figured out it’s because analogWrite configures the LED pins as digital when maximum and minimum values are set. The new version sets the LED pins always to pwm.
I’ve written an optimized analogWrite equivalent that doesn’t break circuitdude.
I felt a little guilty about “crippling” Circuit Dude with the new version 5 Arduboy2 library, so I’ve modified it to use the BeepPin2 class for sound. The rising temperature sound is as smooth as the ArduboyPlaytune version, and the red RGB LED now increases in brightness as intended.
Just compiling the original code with Aruduboy2 library version 5.0.0 instead of 4.1.0 saves 634 bytes of program memory (and 7 bytes of RAM). This is mainly due to the optimised setRGBled() function in the new library release.
Changing sound from using the ArduboyPlaytune library to the BeepPin2 class saves another 2102 bytes of code and 32 bytes of RAM, for 2736 bytes of code and 39 bytes of RAM total. There is now enough program space to add 30 more levels, if @crait desired.
Unfortunately, @crait doesn’t want people publishing modified versions of Circuit Dude, so I can’t make my changes publicly available. I will send @crait a PM with a link to it, so he can apply and publish the changes himself if he wishes.
P.S. making other changes to optimise, as I’ve pointed out in previous posts in this topic, could save a bit more code.
If you do @crait, I hope you add button redundancy too so you can choose to use the A or B button.
A post was split to a new topic: What library is best for my game sounds?
I am very excited to delve into this game. Quick question: How do I fix the text so as not to appear elongated? Thank you!
Did you compile from source? @flimote had a similar issue lately.
It most likely is the same issue.
It only happens with the 1.8.6 and 1.8.7 versions of the IDE.
@Mr.Blinky found a fix for that, which will be in the next version of the Arduboy2 library.
But the next release might be a while off still, we could do with a few testers/early adopters to make sure the fixes didn’t break anything else.
As the song goes:
99 little bugs in the code, 99 little bugs,
you squash one down, patch it around,
109 little bugs in the code.
@MEMalguy, which version of the Arduino IDE are you using, and which version of the Arduboy2 library?
I am currently using the most updated IDE and Arduboy2. The handheld itself is a couple of years old, though.
Then it’s almost certainly the same bug.
Even if you roll back to 1.8.5 or use the Arduboy2 pre-release and it fixes what you’re seeing, you’re still going to encounter the problem I described in this post:
@crait has never applied the fix that I offered or addressed the problem in some other way
Best approach might be to simply download the HEX rather than compile it yourself.
Just finished the game! And I love the secret ending (I didn’t expect that) Great level design, I enjoyed every minute of the game! A must have for the Arduboy! Thanks @crait (even I hated you so much on some levels ) Now time to play it on Steam!
I also want to spread some love for Circuit Dude - my favourite Arduboy game so far! Excuse the shoddy photo.
I just finished this game today, some of those levels drove me nuts lol. All in all its a great game, loved the ending.
OK … any clues on level 45? In particular the block in the lower, right-hand corner. If I approach it from the left I obviously get stuck in there so I assume I must (somehow) rotate the one to the left or the one above it to allow me to be able to move through them both. Just cannot figure it out!