GITHUB PROJECT: https://github.com/Pi4J/pi4j-example-fxgl
As described on the previous page you can use JavaFX to build user interfaces which behave exactly the same on your PC and Raspberry Pi. Let’s go a step further and make a game with an “Arcade” controller.
For this project, we will be using FXGL, an opensource library on top of JavaFX to build games.
Connect the USB power to the hat instead of your Raspberry Pi, and use the power button on the hat to start your Raspberry Pi.
Pimoroni provides a GitHub project with software to use this hat with RetroPie, but this project aims to take full control of the hardware with Java.
The GPIO numbers are defined by the hat and can be found on pinout.xyz
TODO, currently only minimal implementation is done based on Snake game created by Almas and Frank