Skip to content

Simple arcade game using a BornHack 2022 badge and a micro:bit

License

Notifications You must be signed in to change notification settings

waldeinburg/survivator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Survivator

Demo

Backstory

Trapped in a dark area in Space (yes, I know, that's just how Space is, you get the point), constantly being attacked by hostile ... stuff, how long will you survive (no, you can't just escape, yes, I know it's Space but ... good grief, just let me put in the question mark and finish)?

I don't want a backstory

Okay, sorry.

Survivator is a simple arcade game made for the BornHack 2022 Game On Badge using a micro:bit to get tilting control and for saving high scores (because the CircuitPython system on the badge has a read-only file system).

Setup

The code was written on a micro:bit V2 and the CircuitPython version preloaded on the badge. I suppose micro:bit V1 will also work. The following steps should get the game running:

  • Connect the following pins with wire:
micro:bit badge
1 RX2
2 TX2
3V VCC
  • Use standoffs and screws to mount the micro:bit onto the badge, connecting GND on both devices and micro:bit pin 0 to badge pin A2. The latter will be unused technically, but the micro:bit will fit nicely and the angle will be right for what is assumed in the code.

  • Use python.microbit.org to flash microbit-controller.py onto the micro:bit.

  • Copy the contents of the badge folder to the badge.

Here's a picture giving an impression of my assembly of the hardware:

Badge and micro:bit viewed from the side

Playing the game

The aim is to survive as long as possible. The screen will display the current high score and time.

With a gradually decreasing interval you will be attacked by three types of enemies, each having a different way to be handled:

  • Tilt the device to dodge the green beam!
  • Use button A on the micro:bit to fire your energy field at the right time when attacked by the evil but nice looking smiley rocket!
  • Use the four badge buttons to activate your water shields and tilt to push the wall of fire out of the area!

Weapon and shields are only active for a limited time and must recharge for some hundred milliseconds before being available again, so you can't just win by clicking constantly.

When you're dead, use button B on the micro:bit to restart.

About

Simple arcade game using a BornHack 2022 badge and a micro:bit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published