HigherLower - A Simple Number Guessing Game

HigherLower is a simple game for the Arduboy. A game of logic, to guess the random number using only two clues: HIGHER or LOWER!

HigherLower-v2.0.0.hex (50.7 KB)

This game started life from @crait’s excellent tutorial series, and with permission I’m happy to present this extended version of that game.

Improvements[1] include:

  • [NEW] Increasing difficulty levels
  • [NEW] 2-Player mode
  • Hold down buttons to change your number
  • Added graphics throughout, including title screen, win/lose screen and credits
  • Title tune, win/lose tunes and UI beeps and boops

Additionally, I have some big thanks to those that gave advice on my forum thread pleading for help, including @Pharap and @filmote


Latest Release: v2.0.0 (GitHub Releases)

The code is all GPL 3.0 over on GitHub. Feedback & issues also welcome there!


  1. 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. ↩︎

10 Likes

Love the extra graphical polish! It’s a great looking, fun little game :smiley:

1 Like

Nice! I like the experience of adjusting the number, both the “scroll speed” and the cool pitching sound.

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.)

1 Like

Left over from some debugging - fixed, replaced with the proper setup for ArduboyTones.

v1.3.1 now on GitHub or the top post.

2 Likes

It might be different in the compiled hex (I haven’t checked), but the line is still in the source code on the GitHub version.

(To prove that’s from the current ‘main’ branch at the time of writing: here.)

(Looking at the commit history I get the impression you’ve been fighting a bit with whatever desktop git tool you’re using?)

sigh…

We’re not going to talk about v1.3.1

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…

3 Likes

It’s here!

The result of a complete rewrite from scratch, HigherLower now features a 2-Player Mode and increasing levels of difficulty.

v2.0.0 release is available on GitHub, or will be added to the cart shortly.

3 Likes

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:

  1. Player 1 sets the ‘secret number’ that is guessed by Player 2. (Player 1 takes the place of the RNG)
  2. Player 2 plays a full game guessing the number, as if playing alone.
  3. 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…?

Feedback welcome!

Oh … my mistake, I thought it was a swap back and forth game. I get it now! How dumb of me :stuck_out_tongue_winking_eye:

You could have it so that they both set a number and then see who can guess their number first.

Not at all! The fact you misunderstood means it’s poorly explained in the game. Something to work on…

So, should I update the version on the cart or wait?

Good point - I think wait for now. I doubt I’ll have time until the weekend but I’ll make some changes to clarify the 2P mode instructions.

1 Like

This looks fantastic and I love the presentation! I just wish that win screen told you what the number was that you guessed. :stuck_out_tongue: 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. :smiling_imp: I think 6 or 7 is more appropriate.

2 Likes

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.

2 Likes