Update 'Raspberry Pi'
parent
f757c09c50
commit
8ace399ac9
|
@ -42,15 +42,73 @@ Click "WRITE" in the Imager window
|
|||
4. Power up the Pi (note: an [official power adapter](https://raspberrypi.com/products/type-c-power-supply) is recommended)
|
||||
5. Login with the username and password set during installation
|
||||
6. (Optional) run `sudo apt update && sudo apt upgrade` to update the operating system
|
||||
7. (Optional) adjust the size of the console text using `sudo dpkg-reconfigure console-setup`
|
||||
8. The system is ready for installing the game software and other software requirements
|
||||
7. The system is ready for installing the game software and other software requirements
|
||||
|
||||
Installing the software
|
||||
-----------------------
|
||||
|
||||
Install Python, Git, Pygame, and PIL through the package manager
|
||||
Install Python, Git, and PIL through the package manager
|
||||
|
||||
sudo apt install python3 git python3-pygame python3-pil
|
||||
|
||||
### Resolution
|
||||
|
||||
To set the resolution to game resolution `800x450`, edit `/boot/cmdline.txt` by adding a custom video definition to the end of the file
|
||||
|
||||
video=HDMI-A-1:800x450M@60
|
||||
|
||||
Reboot to use the new resolution
|
||||
|
||||
sudo reboot
|
||||
|
||||
### Pygame 2
|
||||
|
||||
It is recommended to install Pygame 2 and SDL manually, following the steps below.
|
||||
|
||||
Install initial Pygame dependencies
|
||||
|
||||
sudo apt install build-essential libfreetype6-dev libportmidi-dev libjpeg-dev python3-setuptools python3-dev python3-numpy
|
||||
|
||||
Download [SDL2 source](https://github.com/libsdl-org/SDL/releases). For example, this will download version 2.24.2.
|
||||
|
||||
wget https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-2.24.2.tar.gz
|
||||
tar -xf SDL2-2.24.2.tar.gz
|
||||
cd SDL2-2.24.2/
|
||||
|
||||
Enable `deb-src` repositories by uncommenting the `deb-src` lines in `/etc/apt/sources.list`.
|
||||
|
||||
Install everything necessary to build SDL2.
|
||||
|
||||
sudo apt update && sudo apt build-dep libsdl2
|
||||
|
||||
Configure, make, and install
|
||||
|
||||
./configure && make && sudo make install
|
||||
|
||||
Download and compile [SDL image](https://github.com/libsdl-org/SDL_image/releases), [SDL ttf](https://github.com/libsdl-org/SDL_ttf/releases), and [SDL mixer](https://github.com/libsdl-org/SDL_mixer/releases)
|
||||
|
||||
wget https://github.com/libsdl-org/SDL_image/releases/download/release-2.6.2/SDL2_image-2.6.2.tar.gz
|
||||
wget https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.20.1/SDL2_ttf-2.20.1.tar.gz
|
||||
wget https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.6.2/SDL2_mixer-2.6.2.tar.gz
|
||||
tar -xf SDL2_image-2.6.2.tar.gz
|
||||
cd SDL2_image-2.6.2/
|
||||
./configure && make && sudo make install
|
||||
cd ..
|
||||
tar -xf SDL2_ttf-2.20.1.tar.gz
|
||||
cd SDL2_ttf-2.20.1/
|
||||
./configure && make && sudo make install
|
||||
cd ..
|
||||
tar -xf SDL2_mixer-2.6.2.tar.gz
|
||||
cd SDL2_mixer-2.6.2/
|
||||
./configure && make && sudo make install
|
||||
sudo ldconfig
|
||||
|
||||
Build Pygame
|
||||
|
||||
git clone https://github.com/pygame/pygame
|
||||
cd pygame
|
||||
python3 setup.py -config -auto
|
||||
python3 setup.py install --user
|
||||
|
||||
### Audio configuration
|
||||
|
||||
|
|
Loading…
Reference in New Issue