Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Raspberry Pi Pico - graphics tank game

In this project I have ported graphical game that I created in Pygame Zero to the Raspberry Pi Pico with a Pimoroni Display Pack.

Tank Game on Raspberry Pi Pico with Pimoroni Display Pack

It’s a simple artillery based game based on projectile targetting. This a simplified version of other tank games, or even games based on killing worm like creatures.

2022 Updates

Pimoroni have changed the software library used for controlling the Pico Display as well as other graphics displays for the Pico. The different screens now use a single graphics library. This meant making some significant changes to the game. This video explains those changes.

The updated source code is included on my github project.

Original Design

This is a turn based pass and play version of the game. Firstly, tank 1 can adjust the aim and power before firing. If the shell hits the enemy tank then that’s a victory, if not then play changes to the other player.

Pimoroni Pico Display Pack

The Raspberry Pi Pico is a small microcontroller board. It's not a full desktop style computer in the same way that the traditional Raspberry Pi is and it doesn't work with a normal screen.

Unlike a Raspberry Pi HAT which fits on top of the Raspberry Pi computer, this is called a pack because it goes on the back of the Pico like a back pack. The display pack is one of the less expensive add-ons which is a bit surprising considering it’s capability. Although it’s still many times more than the cost of a Pico.

The display pack a miniature screen a little over an inch in size. with a resolution of 240 x 130 pixels. It also has 4 buttons and a single RGB LED.

Tank Game

The tank game was originally created as part of my book Beginning Games Programming with Pygame Zero. It’s a demonstration of how you can created games in pygame zero using vector images.

I first converted the game to use object oriented programming. I then ported it to work on the Raspberry Pi Pico and the Pimoroni Display Pack.

The source code for both the Pygame Zero and the Raspberry Pi Pico Display Pack is available from github.

Future projects

For the latest updates please:
Subscribe to the PenguinTutor YouTube Channel
Follow @penguintutor on Twitter

Previous Games for RetroPie
Games for RetroPie
Next Raspberry Pi Pico Space Game
Raspberry Pi Pico Space Game