The Rock Paper Scissors LAN App is an interactive GUI tool that allows users to connect over a local area network (LAN) to play Rock Paper Scissors and communicate via text messages.
- Download the latest Windows release from the releases page.
- Extract the contents to a desired location.
- Run the
RPSApp.exe
file.
- Download the latest Linux release from the releases page.
- Extract the contents to a desired location.
- Make the RPSApp file executable by running the following command in the terminal:
chmod +x RPSApp
- Run the RPSApp file by navigating to the directory in the terminal and executing:
./RPSApp
To install and run the application from source:
-
Clone the repository:
git clone https://github.com/LukeWait/rps-app.git cd rps-app
-
(Optional) Create and activate a virtual environment:
- Windows:
python -m venv rps_app_venv rps_app_venv\Scripts\activate
- Linux:
python3 -m venv rps_app_venv source rps_app_venv/bin/activate
- Windows:
-
Install the dependencies:
- Windows:
pip install -r requirements.txt
- Linux:
sudo apt-get install python3-gi sudo apt-get install python3-gi-cairo gir1.2-gtk-3.0 sudo apt-get install libcairo2-dev sudo apt install libgirepository1.0-dev pip install pygobject==3.42.2 pip install -r requirements.txt
- Windows:
-
Run the application:
- Windows:
python src\rps_app.py
- Linux:
python src/rps_app.py
- Windows:
After running the application, you can log in with your username and password or create a new account. Once connected to the network, you can challenge other users to a game of Rock Paper Scissors and chat with them using the built-in messaging system.
- Add New User: When playing for the first time you will need to create a profile. Click the
Add New User
button on the login page. Choose an avatar, username and password. Note: Passwords must contain at least 8 characters, 1 number, and 1 symbol. User information, including hashed passwords, is stored in a plain text file (user_data.txt) with the system files:- Windows:
C:\Users\<YourUsername>\AppData\Roaming\rps-app\user_data.txt
- Linux:
/home/<YourUsername>/.local/share/rps-app/user_data.txt
- Windows:
- Hosting A Game: From the
Host
tab you can choose to host a game that others can connect to. You can also select the number of rounds to be played.
- Joining A Game: From the
Join
tab you can search for anyone waiting to host a session on the network.
- Playing A Game: Once you're connected to another player, the connection status display will update. You can now freely use the text chat feature to communicate. Choose Rock, Paper, and Scissors from the buttons at the top of the output. Once the pre-determined rounds are completed, you will be disconnected.
-
Disconnecting: To stop a current network connection, click on the green network icon in the bottom right corner. Note: disconnecting mid-game will result in forfeiting the remaining rounds.
-
Changing User & Exiting: To log out or exit the application, click on the profile icon in the top left corner. Note: disconnecting mid-game will result in forfeiting the remaining rounds.
-
Settings: From the
Settings
tab you can choose to turn on/off audio options and select network ports.
Run the following command from the project main directory:
pyinstaller --onefile --add-data "assets/images:assets/images" --add-data "assets/fonts:assets/fonts" --add-data "assets/audio:assets/audio" --noconsole src/rps_app.py
For Linux, you need to create a hook-PIL.py file to handle the PIL library correctly. Follow these steps:
- Create a file named hook-PIL.py in the main directory of your project with the following content:
from PyInstaller.utils.hooks import copy_metadata, collect_submodules datas = copy_metadata('Pillow') hiddenimports = collect_submodules('PIL')
- Run the following command from the project main directory:
pyinstaller --onefile --add-data "assets/images:assets/images" --add-data "assets/fonts:assets/fonts" --add-data "assets/audio:assets/audio" --additional-hooks-dir=. --noconsole src/rps_app.py
This will generate the executable in the dist
directory. It will also create a build
directory and .spec
file. These are used in the build process and can be safely removed.
This project is licensed under the MIT License. See the LICENSE file for details.
Icons used in the app are designed by Freepik - www.freepik.com.
Fonts used in the app are open source Google Fonts.
The source code for this project can be found in the GitHub repository: https://github.com/LukeWait/rps-app.
For those building from source, the dependencies listed in requirements.txt
are:
- customtkinter==5.2.1
- CTkMessagebox==2.5
- CTkListbox==0.10
- CTkToolTip==0.8
- Pillow==10.1.0
- gTTS==2.4.0
- playsound==1.2.2