Skip to the content.

Fruit Jam Pong

Tutorial code for how to make a simple pong game for the Adafruit Fruit Jam in CircuitPython

Sections

0. Getting Started

Not yet familiar with your Fruit Jam or CircuitPython? We will quickly go over how to get your device set up and running with CircuitPython.

1. Bootstrap

Using the relic-se/Fruit_Jam_Application template to skip a few steps…

2. Graphics

Getting straight to it by using displayio to set up our pong playing field.

3. Controls

Support a variety of user inputs to control the paddles and the game state including keyboard, mouse, gamepad, and hardware buttons.

4. Ball Movement

Control the pong ball’s position with velocity and handle collisions.

5. Scoring

Determine when a player has scored and handle win conditions.

6. Increasing Difficulty

Increase ball speed with each paddle hit.

7. Sound Effects - Coming Soon

Using synthio to create basic sound effects which closely resemble the original arcade game.

8. Computer Control - Coming Soon

Control the CPU in a single-player match using simple logic.

9. NeoPixels - Coming Soon

Add some icing on top by displaying the ball position on the Fruit Jam’s NeoPixels.

Building Project Bundle

Ensure that you have python 3.x installed system-wide and all the prerequisite libraries installed using the following command:

pip install circup requests

Download all CircuitPython libraries and package the application using the following command:

python build/build.py

The project bundle should be found within ./dist as a .zip file with the same name as your repository.