tiny-pong

command module
v0.0.0-...-cf021ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 3 Imported by: 0

README

Tiny Pong

Go License

Tiny Pong for micro:bit-v2. There is a code walkthrough on my website.

tinypong-preview

Flash Tiny Pong to the micro:bit-v2

To flash Tiny Tetris to your micro:bit-v2, type the following from inside the directory:

tinygo build -o=/run/media/{USERNAME}/MICROBIT/flash.hex -target=microbit-v2 main.go

Status

Currently the game is a human player against a naive computer opponent.

  • Human player starts with the ball, whoever scores a point gets to launch the ball next
  • Computer paddle bounds from side to side without consideration for ball location
  • Game ends when either player accumulates 5 points, and point counts are displayed one row out from each player's paddle

Possible Enhancements

  • Computer strategy (follow ball trajectory, anticipate human location when launching ball)
  • Allow human player to change direction with button input
  • Mode for 2 human players (with menu to select 1 or 2 human players)
  • Increase update speed over time
  • Opening splash animation
  • Option to play again? (maintain win count across games?)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL