Ensure a USB keyboard is plugged into the USB Host port wired up previously. Reset the board by cycling power or pressing the Reset button if you happen to plug in a keyboard after power up.
Be sure you connect the DVI breakout to an HDMI monitor and the monitor is on. You might need a long cable if your monitor is not near the Metro RP2350 (like a television). The cables are standard and may be obtained from any trusted retail outlet. Also reset the Metro if you plug in HDMI after powering the Metro.
Once connections are all set, power the Metro RP2350 either via USB C (5 volts) or the barrel connection (5.5 to 17 volts DC, center positive).
The game should auto start if all the software was loaded in the previous step. The colored blocks at the top, the paddle below.
On-screen keys used in the game are displayed. The typical WASD directional keys are used (caps lock or not, no matter) and since the paddle only goes left and right, only A and D are used. The spacebar is used to start the game and when a turn is lost.
The goal is to keep hitting the bouncing ball, aiming to "break" (eliminate) all the colored blocks.
While the ball is falling, position the paddle so the ball will hit it and bounce up again.
If the ball hits the end of the paddle it may bounce in a shallow angle (glancing blow). If the paddle is moving when the ball hits it, the ball may not bounce at an equal and opposite angle but have "some english" from the paddle momentum.
Sound effects are played with each action on screen (if you have the piezo installed).
For each colored brick removed, you score 10 points. You win by eliminating all the bricks with the lives you have, scoring 500.
Changing the Code
There are values in the code to adjust various parameters in the game if you want to simplify things or make things more challenging:
lives
is the number of chances you have to get all the bricks cleared and is set by default at 3
.
BALL_SPEED_INITIAL
is the speed the ball moves at the start. Increase or decrease for faster or slower play.
PADDLE_WIDTH
is the width of the paddle in pixels. Making the paddle smaller makes things more challenging.
PADDLE_SPEED
affects the speed at which the paddle can move when the A and D keys are pressed.
BALL_RADIUS
changes the ball size.
Page last edited March 04, 2025
Text editor powered by tinymce.