A Raspberry Pi Pico-based handheld version of the classic cave explorer game

Latest Release: 1.0.1

 

About Hunt the Wumpus

Hunt the Wumpus is a fun handheld game based on the Raspberry Pi Pico. Your mission: to enter a dark cave, and then locate and destroy the monstrous Wumpus. The trouble is, the cave is dark and you have no torch. All you have is your sense of smell to tell you when the beast is near. And as if that wasn’t enough, the cave contains many lethally deep pits. The local population of giant bats are out to bamboozle you too…

How to Play

Use the joystick to move square by square through the cave. The display shows your path.

The red LED will light when there is a pit in an adjacent square. Don’t step on a pit — the fall will kill you. If there is more than one nearby pit, you’ll need to tread very carefully…

Beware the beast

You’ll sometimes hear on the piezo speaker the twitter of a bat an adjacent square. If you move into the bat’s square, it will carry you to a random part of the cave.

The green LED will light when the Wumpus is in an adjacent square. Don’t get any closer — the Wumpus will eat you. Instead, press the button to fire an arrow that will kill the monster. To choose the direction in which the arrow is loosed, step back and move toward the Wumpus’ square in the direction you want to the arrow to go. Make sure you get it right: if you miss, the beast will know where you are and immediately grab you!

Beware Giant Bats...
 
Shoot that poison arrow...
 

If your aim is true, you will defeat the Wumpus and receive a glittering trophy as reward for your success. You can now try your luck and skill again.


The Game Hardware

To build Hunt the Wumpus, you will need:

  • A Raspberry Pi Pico, or similar RP2040-based board.
  • An 8×8 LED matrix display with an I²C backpack.
  • A two-way, self-centring analog joystick.
  • A red LED.
  • A green LED.
  • A piezo-electric buzzer.
  • A button.
  • Two standard-size breadboards.
  • Wires.

Assemble the components in the following circuit:

The circuit layout for Hunt the Wumpus

The layout shown here is intentionally spaced out for clarity. Your own circuit can be condensed to fit on standard breadboards or a custom PCB.


Installing the Game

Either build the game from source, or copy the .uf2 file provided in the repo to the mounted Pico (press BOOTSEL and connect to USB).


Credits

This version of Hunt the Wumpus is based on an Arduino project by Corey Faure.

My Hunt the Wumpus code is licensed under the MIT licence.


Source Code

You can view Hunt the Wumpus’s source code at GitHub.


Release Notes

  • 1.0.1 (Go) 21 August 2023
    • Ported to Go.
  • 1.0.2 (C) 31 March 2021
    • Use TinyMT for random number generation.
  • 1.0.1 (C) 25 February 2021
    • Tweaked sprites.
    • Improved trophy presentation.
    • Improved in-game code flow.
  • 1.0.0 (C) 18 February 2021
    • Initial release.

Related Software


smittytonesmittytone
Site and software copyright © 2024, Tony Smith