The code is all GPL 3.0 over on GitHub. Feedback & issues also welcome there!
I make no guarantees this program is better, more fun, or in any way improved compared to the tutorial code. It’s simply more complicated and with more spit & polish. ↩︎
One complaint: You’re calling arduboy.audio.on(); in setup().
The first 16 bytes of EEPROM are reserved for certain user settings, and one of those settings determines whether the sound is on or off, which is supposed to disable sound for people who don’t want to play with the sound on for whatever reason (e.g. maybe they’re in a public place and don’t want to disturb others).
arduboy.audio.begin() will correctly enable or disable the sound based on the user’s saved settings, but you don’t need to call that either because arduboy.begin() already calls it for you.
If you’re finding that leaving out the arduboy.audio.on() means your Arduboy isn’t producing any sound, that means your settings are set to have sound disabled. To fix that you can hold B when booting your Arduboy and then press the up button. (For more info, see the instructions here.)
Announcing 1.3.2, fixing the problem it was meant to in the first place!
No, I’m not sure how I got confused, removed the wrong line, broke everything, fixed it, and then neglected to actually fix the issue I was meant to be fixing. One of those days…
A potential bug has been raised in my PMs by @filmote:
From the way I designed the game, it appears to be running correctly. Perhaps the 2-player mode isn’t explained clearly enough:
Player 1 sets the ‘secret number’ that is guessed by Player 2. (Player 1 takes the place of the RNG)
Player 2 plays a full game guessing the number, as if playing alone.
Win or lose, players are then returned to the mode-select screen.
How are others understanding the 2-Player mode? How would you expect the game to run?
There are some caveats, namely it’s always Player 1 that sets the number and Player 2 that guesses. This is just flavour text, but I guess could swap every time…?
This looks fantastic and I love the presentation! I just wish that win screen told you what the number was that you guessed. Also, maybe 20 guesses is way too high. In the class that I teach, I have students do this same game, but there are only 5 attempts. I think 6 or 7 is more appropriate.
Actually, the lose screen should definitely tell you how much you suck because here’s the actual number haha - I’ll add both.
Yeah I’d agree. The levels need balancing - probably only need to have 5 in total. (Who’s going to stick around to play 10 times?)
7 guesses is the maximum needed for a binary search. Perhaps levels could be (10, 7, 6, 5, 1). I really like the impossibility of the final level getting just a single, essentally 1% random guess. Tickles me somehow.