Skip to content

TuriSc/BeamPong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beampong

A tabletop arcade game for two players, with multiple play modes

Beampong is a two-player tabletop game featuring LED light effects, sounds and music, and three unique play modes: Beampong (Pong-style), Beamshot (combat game), and Beamhop (rhythm game). It's battery powered and it's built on the Raspberry Pi Pico (RP2040 or RP2350).

YouTube Video Video link

Hardware requirements

Components

  • Raspberry Pi Pico (RP2040 or RP2350)
  • WS2812B LED Strip. 60PPM, 16 pixels (configurable via NUM_PIXELS)
  • 6x 12x12mm Push Buttons (with red, green, and blue caps)
  • I²S Audio DAC + Amp (Adafruit MAX98357 or compatible module)
  • Speaker (4Ω 3W recommended, but 8Ω 2W is fine)
  • Li-Po battery (2000mAh recommended)
  • TP4056 (battery charger module)
  • Electrical wire
  • 3D-printed enclosure (printable files are provided, as well as OpenSCAD sources)
  • M1 screws, M24 screws, countersunk M2.5x4 screws, M2.54 threaded inserts

Assembly instructions

For a detailed, step-by-step guide on how to put everything together, see hardware/Assembly instructions.md

Schematic and pin configuration

Component GPIO Pin Description
LED Strip Data 2 WS2812B data line
I2S DIN (Data) 10 I2S data output
I2S BCK (Clock) 11 I2S bit clock
I2S LRCK (WS) 12 I2S word select
Player 1 Red 15 Button input
Player 1 Green 14 Button input
Player 1 Blue 13 Button input
Player 2 Red 8 Button input
Player 2 Green 7 Button input
Player 2 Blue 6 Button input

All pins are configurable in config.h.

Schematic

Schematic, PDF

Game modes

🔴 Beampong

A colored pixel "ball" bounces between players. Hit the ball by pressing color button(s) when it reaches your home LED (the LED closest to you).

Rules:

  • The server (who served the point) can choose any of the 7 colors on any return
  • The receiver must match the exact color sent to them
  • Press single button for primary colors (red/green/blue)
  • Press multiple buttons simultaneously for secondary colors (yellow/cyan/magenta/white)
  • Ball accelerates with each successful bounce
  • Missing or incorrect color is a point for the opponent
  • First player to score 8 points wins (configurable via BP_SCORE_TO_WIN)

Configuration:

  • BP_DEFAULT_DELAY - Starting ball speed (180ms default)
  • BP_MIN_DELAY - Maximum speed (50ms)
  • BP_DELAY_INC - Acceleration per bounce (10ms)
  • BP_FORGIVENESS - Multi-button press window (50ms)

🟢 Beamshot

Fire colored pixels toward your opponent. Defend by shooting matching colors to neutralize incoming attacks.

Rules:

  • Press buttons to shoot colored pixels
  • Press single button for primary colors (red/green/blue)
  • Press multiple buttons simultaneously for secondary colors (yellow/cyan/magenta/white)
  • Pixels of the same color collide and disappear
  • Pixels that reach opponent's boundary score a goal
  • Maximum 3 active pixels per player
  • First player to score to 8 goals wins (configurable via BS_SCORE_TO_WIN)

Configuration:

  • BS_DELAY - Pixel movement speed (220ms default)
  • BS_MAX_PIXELS - Maximum total simultaneous pixels (6 by default)

🔵 Beamhop

A musical rhythm challenge. A melody plays while colored notes scroll across the LED strip. Press the matching color button exactly when the note reaches your position.

Rules:

  • Notes appear in time with the music
  • Press the correct color button at the right moment
  • Each mistake gives opponent a point
  • 50ms forgiveness window for early presses
  • First player to make 16 mistakes loses, or draw if melody completes (configurable via BH_SCORE_TO_WIN)

Configuration:

  • BH_DELAY - Note scroll speed (600ms default)
  • BH_FORGIVENESS - Early press tolerance (50ms)

Volume and LED brightness control

Hold any red button while powering on the device to reduce the output volume. Hold any green button while powering on the device to to increase the LED brightness.

Compiling

If you want to change any default configuration options, you'll need to compile the sources and generate your own uf2 file to flash to the Pico.

Prerequisites

  • CMake 3.13+
  • Pico SDK
  • ARM GCC toolchain

Build instructions

git clone https://github.com/TuriSc/Beampong.git
cd Beampong
git submodule update --init --recursive
mkdir build && cd build
cmake ..
make

If you're building for Raspberry Pi Pico 2, the cmake line becomes: cmake -DPICO_PLATFORM=rp2350 ..

Deployment

  1. Hold BOOTSEL button on Pico while connecting USB
  2. Copy the correct Beampong-*.uf2 for your pico version to the mounted Pico drive
  3. Pico automatically reboots and runs the game

Dependencies

All dependencies are included as git submodules:

Version history

  • 2026.03.29 - v1.0.0 - First release

More Information

Beampong is an original project. All melodies have been composed specifically for this game.

For more information and similar projects, visit turiscandurra.com/circuits

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages