Code used on a touchscreen connected to a Raspberry Pi for High scores
Tested functional on a Raspberry Pi 4B connected to a BIGTREETECH PITFT50 V2.1 touchscreen.
Notes on getting the install functional:
- Install Raspbian Lite
- Set a static IP for connecting to it later. Either do this by setting a static IP on the Pi, or a DHCP reservation on your network.
- Install Openbox as the front-end GUI (It is extremely lightweight without any menus, thus not having any overhead).
- Upon boot-up, use "sudo raspi-config" to configure the pi to login automatically to the gui. Reboot.
- Either SSH to the Pi (easiest to not need a second keyboard), or plug a keyboard into the Pi along with a mouse to open the terminal.
- Install Vulkan and all its dependencies (Just Google this. Pi 4 is a single command after dependencies, Pi 3 and earlier is harder).
- When packaging the game, use the "Include PCK" option and make sure you are building it for "arm64"
- Transfer the compiled game to the Raspberry Pi; I recommend using SFTP
- In a terminal window, perform "sudo chmod a+x Pinball.*" to make the *.sh and *.arm64 files executable.
- Note: Anytime you update these files (such as a re-upload via SFTP from a recompile), you will need to do #10 again
- Add Pinball.sh to Openbox's autostart list.
- Reboot.
CONGRATS! You're all done!