Circuit Dude - Awesome Puzzle Game With 50 Levels! [2.1]

Well, I’ve owned my Arduboy for only 5 days and I’m pretty much hooked to Circuit Dude. One of the first games I loaded onto the device, and I haven’t had the heart to remove it yet, not before I finish all the levels. I’m at level 49, and I’m so excited to see the ending for this jem. Keep it up @crait :smiley:

5 Likes

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.

1 Like

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.

2 Likes

Oh no’s :scream: One of my favorite games been crippled :sob:. 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.

Edit:

I’ve added the changes to my fork of the Arduboy2 library and to the homemade board package

2 Likes

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.

2 Likes

If you do @crait, I hope you add button redundancy too so you can choose to use the A or B button.

2 Likes

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!

1 Like

Did you compile from source? @flimote had a similar issue lately.

1 Like

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?

2 Likes

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.

Your options are to roll back to the 1.8.5 IDE (which you can get here),
or take the version of the Arduboy2 library from the master branch (specifically this link) and use that to compile with.

You could also upload a precompiled hex from @Eried’s or @crait’s repos.

1 Like

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

Circuit Dude [2.1] - Awesome Puzzle Game With 50 Levels!

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) :slight_smile: 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 :stuck_out_tongue:) Now time to play it on Steam!

6 Likes

I also want to spread some love for Circuit Dude - my favourite Arduboy game so far! Excuse the shoddy photo.

3 Likes

I just finished this game today, some of those levels drove me nuts lol. All in all its a great game, loved the ending.

1 Like