Skip to content

A hand-held 7-segement display game based on the ATtiny84

Notifications You must be signed in to change notification settings

dmcinnes/lunpus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hunt the Lunpus

A hand-held 7-segment display game based on the ATtiny84.

lunpus

Based on the old Hunt the Wumpus text-based computer game originally published as BASIC source code in Creative Computing. The original is based on a dodecahedron maze but I first came across it as a grid-based cave game on the TI-99/4A we had as kids.

This handheld version has been renamed Hunt the Lunpus for obvious reasons once you consider the constraints of the display 😉

Video of the game in action!

Rules

You find yourself in a dark cave with the elusive Lunpus! You have your trusty bow and four arrows, let's see if you can defeat the Lunpus before it eats you!

There are dangers in the cave:

  • Superbats will pick you up and drop you into a random location.
  • Slime Pits are certain death if you accidently stumble upon one!
  • The Lunpus may eat you if you bother its sleep.

You can only see walls that are next to you, however the dangers

  • Blinking decimal points will warn you there is a Buperbat nearby.
  • The sound of wind will warn you there is a Slime Pit nearby.
  • The sound of snoring will warn you The Lunpus is nearby.

You only have 4 arrows, use them wisely! Once you have shot them all you lose. The Lunpus eventally finds and eats you.

Directions

  • Press ARROW to start a game.
  • Use the direction buttons (NORTH, SOUTH, EAST, WEST) to move around the cave. Walls appear as glowing segments.
  • Press ARROW to show you how many arrows you have left. Press a direction to fire one, otherwise press ARROW again to cancel.
  • Once you win (or more likely die) press ARROW again to start a new game.

Flashing the ATtiny84

Requirements

Once these are installed, wire up your ATtiny with a programmer. I use the AVR Pocket Programmer. If you use something different you will need to change settings in the Makefile.

First set the fuses to get the proper 8 MHz internal clock:

make set_fuses

Once that is successful you can flash the chip:

make ispload

The ispload command flashes the program and will also flash the EEPROM which is where all the music, text and "graphics" reside. The 8K flash memory is almost entirely taken up by the program (8146 bytes 99.4% Full) and the EEPROM is alsmot full as well (465 bytes 90.8% Full).

PCB

The pcb directory contains EasyEDA project files that define the schematic and PCB construction. Also in this directory is the latest generation of Gerber files for fabracation.

Schematic

Schematic_wumpus_2022-07-12

intro screen

License

Creative Commons License
Lunpus by Doug McInnes is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.