gpiozero is a requirement that can be installed on any system, regardless of whether the Pi GPIO is available. gpiozero provides mock pins, so the dispenser can be mocked even when not running on the Pi
49 lines
1.6 KiB
Markdown
49 lines
1.6 KiB
Markdown
BiTFiT
|
|
======
|
|
|
|
Land the triangles without touching the rods
|
|
|
|
Controls
|
|
--------
|
|
|
|
* Left/Right - Move rods
|
|
* Down - Increase fall speed
|
|
* F11 - Full screen
|
|
|
|
Requirements
|
|
------------
|
|
|
|
* [Python 3+](https://python.org/downloads)
|
|
* [Pygame 2](https://pygame.org/wiki/GettingStarted)
|
|
* [gpiozero](https://gpiozero.readthedocs.io/en/stable/)
|
|
|
|
On Debian Linux, these can be installed with `apt`
|
|
|
|
> sudo apt install python3 python3-pygame python3-gpiozero
|
|
|
|
Running
|
|
-------
|
|
|
|
Once Python and Pygame have been installed, clone the repository, and run `OPEN-GAME`. The `--recursive` flag includes the PGFW project as submodule.
|
|
|
|
git clone --recursive https://open.shampoo.ooo/shampoo/ibitfit
|
|
cd ibitfit/
|
|
./OPEN-GAME
|
|
|
|
Raspberry Pi
|
|
------------
|
|
|
|
If running on a Raspberry Pi, it is possible to control left and right using buttons connected to the Raspberry Pi pins GPIO 24 and GPIO 23. It should work automatically as long as [RPi.GPIO](https://sourceforge.net/p/raspberry-gpio-python/wiki/Home/) is installed, which should be installed by default.
|
|
|
|
BiTFiT is the first [Playzing](https://shampoo.ooo/playzing) compatible game. See the [Playzing builder's manual][] for detailed instructions on how to get it running.
|
|
|
|
Headless
|
|
--------
|
|
|
|
If running on Linux without X-Windows (for example, Raspberry Pi Lite OS), there are two options for launching:
|
|
|
|
* add `--kms` to the command line if the newer KMS driver and Pygame 2 are being used
|
|
* add `--fb` to use the framebuffer if using Pygame 1
|
|
|
|
[Playzing builder's manual]: https://open.shampoo.ooo/shampoo/playzing/src/branch/main/doc/Playzing_builder's_manual.md
|