Linux Format

Build your own fortune teller

One of my earliest commissioned projects was for a coin-operated fortune teller, which lives in an arcade in Blackpool. I wanted to make a modern version, so I dug out a Raspberry Pi 4 and dusted off my old Pygame knowledge. We are making a fortune teller video game in 55 lines of Python.

Prepare thy Pi

First, we need to set up our environment. Raspberry Pi OS Bookworm follows PEP668, which forces us to set up virtual environments (virtualenv) to install Python packages. This is so our manually installed packages do not conflict with the Python setup for the OS.

Open a terminal and first update

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format8 min read
Create A Fyne Journaling App
Credit: https://fyne.io Over the past decade, we have seen great improvements in the graphical software user experience and corresponding advancements in the tools that are used to create compelling apps for our phones and tablets. Unfortunately, bui
Linux Format1 min read
Tom’s HARDWARE
No matter if you're building a PC, buying a laptop or learning about robots, Tom’s Hardware has all the comprehensive knowledge you need. Scan & Subscribe for free! ■
Linux Format10 min read
Create A Play-by-mail User Interface
This is the second article in our series about creating play-by-mail games. These are games that are now played over the web (or by email), and we’ll be looking at various aspects of this, including user input, use of JSON, clans, and free versus pai

Related Books & Audiobooks