A customizable game center built with CustomTkinter, designed to launch automatically on Raspberry Pi startup.
- Modern and intuitive user interface
- Auto-launch capability on system startup
- Built using CustomTkinter for enhanced visual appeal
- Optimized for Raspberry Pi systems
- Auto-update system to keep the application up-to-date with the latest changes
sudo nano /boot/config.txtCopy the config.txt file from the repository root folder and replace everything in your config file with its contents. Then, save the changes:
- Press
Ctrl + X - Press
Y - Hit
Enter
If the Pi isnβt booting, remove the SD card, insert it into another computer, and find config.txt in the /boot/ partition. Replace it with the new config.txt from the repository.
Before cloning the repository, install Git if itβs not already installed:
sudo apt install git -yGit allows us to download and manage the latest version of Game Center directly from the repository. This ensures we always have access to the newest features, bug fixes, and improvements. By using Git, we can easily update our application without manually downloading files. Additionally, our auto-update system relies on Git to fetch updates seamlessly.
To download the latest version of Game Center, clone the repository using Git:
git clone <REPO_URL>Navigate into the project directory:
cd <REPO_FOLDER>To pull updates in the future, run:
git pullIf you encounter permission issues while updating, try:
git reset --hardTo make the setup process easier, we've created an automated Python script that installs all required libraries and dependencies for Game Center. Instead of installing each package manually, simply run the script and let it handle everything for you. This ensures a smooth and hassle-free installation experience.
python3 install_dependencies.py
If you prefer manual installation:
sudo apt update
sudo python3 -m pip install --upgrade pipCheck your current Python version:
python3 --versionUpdate Python if needed:
sudo apt install python3 -yEnsure pip is installed and updated:
sudo apt install python3-pip -y
sudo python3 -m pip install --upgrade pipsudo apt install python3-tk -y
sudo pip3 install customtkinter --break-system-packagessudo pip3 install pygame --break-system-packagessudo apt install python3-dev libsdl2-dev libsdl2-image-dev \
libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev \
libjpeg-dev -ypython3-rpi.gpio allows Game Center to read input from physical buttons connected to the Raspberry Pi's GPIO pins.
sudo apt install python3-rpi.gpio -yThe keyboard library is used to emulate key presses based on GPIO input, letting physical buttons control games as if you're using a keyboard.
sudo pip3 install keyboard --break-system-packagesmgba-qt is a lightweight emulator used in Game Center to run external Game Boy Advance (GBA) games seamlessly within the console.
sudo apt install mgba-qtxdotool is used to simulate key presses or mouse clicks. In Game Center, it ensures that the application window gains focus automatically upon startup.
sudo apt install xdotool -ygrim is a lightweight screenshot utility used in Game Center to capture and save screenshots of the application or games. It's especially useful for logging or sharing gameplay moments.
sudo apt install grim -y
Replace PATH with your actual path of Game Center Path.
cd <PATH>
sudo mkdir -p /usr/share/fonts/truetype/orbitron
sudo cp fonts/Orbitron.ttf /usr/share/fonts/truetype/orbitron/
sudo fc-cache -f -v
Automatically launches Game Center on boot via systemd.
sudo nano /etc/systemd/system/gamecenter.servicePaste and update the following (replace <USER> and <PATH>):
Description=Game Center GUI Application
After=multi-user.target
[Service]
User=<USER>
Group=<USER>
WorkingDirectory=<PATH>
ExecStart=/usr/bin/python3 <PATH>/main.py
Environment=DISPLAY=:0
Restart=always
[Install]
WantedBy=multi-user.target`
Enable and start the service:
sudo systemctl enable gamecenter.service
sudo systemctl start gamecenter.service`
Check status:
sudo systemctl status gamecenter.service
After setup, reboot to verify auto-launch:
sudo reboot
pip3 install --break-system-packages --upgrade --force-reinstall pillow
Check logs:
sudo systemctl status gamecenter.service
Check that key packages are available:
import pygame, customtkinter, RPi.GPIO, keyboard
-
Double-check paths and permissions
-
Make sure you're running Python 3
-
For bugs or issues, check logs or re-run the installer
Want to update Game Center later?
cd <REPO_FOLDER>
git pull