{"id":21566758,"url":"https://github.com/lukewait/rps-app","last_synced_at":"2025-03-18T05:27:35.132Z","repository":{"id":244904313,"uuid":"816609111","full_name":"LukeWait/rps-app","owner":"LukeWait","description":"A GUI-based LAN game application for Rock Paper Scissors, featuring user profiles, chat functionality, and customizable settings. Each instance is standalone and can function as both a server and client.","archived":false,"fork":false,"pushed_at":"2024-06-25T08:18:59.000Z","size":2675,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T12:13:58.141Z","etag":null,"topics":["customtkinter","gui","lan","networking","python","rock-paper-scissors"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LukeWait.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-18T04:44:49.000Z","updated_at":"2024-06-25T08:19:02.000Z","dependencies_parsed_at":"2024-06-25T09:48:47.803Z","dependency_job_id":"c6cdbd1b-1e46-410e-83b9-94ba4e252e8b","html_url":"https://github.com/LukeWait/rps-app","commit_stats":null,"previous_names":["lukewait/rps-app"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeWait%2Frps-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeWait%2Frps-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeWait%2Frps-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeWait%2Frps-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LukeWait","download_url":"https://codeload.github.com/LukeWait/rps-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244162477,"owners_count":20408537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["customtkinter","gui","lan","networking","python","rock-paper-scissors"],"created_at":"2024-11-24T10:27:59.698Z","updated_at":"2025-03-18T05:27:35.107Z","avatar_url":"https://github.com/LukeWait.png","language":"Python","readme":"# Rock Paper Scissors LAN App\n\n## Description\nThe 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.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LukeWait/rps-app/raw/main/assets/screenshots/rps-app-login.png\" alt=\"App Screenshot\" width=\"600\"\u003e\n\u003c/p\u003e\n\n## Table of Contents\n- [Installation](#installation)\n- [Usage](#usage)\n- [Development](#development)\n- [License](#license)\n- [Acknowledgments](#acknowledgments)\n- [Source Code](#source-code)\n- [Dependencies](#dependencies)\n\n## Installation\n\n### Executable\n#### Windows\n1. Download the latest Windows release from the [releases page](https://github.com/LukeWait/rps-app/releases).\n2. Extract the contents to a desired location.\n3. Run the `RPSApp.exe` file.\n\n#### Linux\n1. Download the latest Linux release from the [releases page](https://github.com/LukeWait/rps-app/releases).\n2. Extract the contents to a desired location.\n3. Make the RPSApp file executable by running the following command in the terminal:\n    ```sh\n    chmod +x RPSApp\n    ```\n4. Run the RPSApp file by navigating to the directory in the terminal and executing:\n    ```sh\n    ./RPSApp\n    ```\n\n### From Source\nTo install and run the application from source:\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/LukeWait/rps-app.git\n    cd rps-app\n    ```\n\n2. (Optional) Create and activate a virtual environment:\n    - **Windows**:\n      ```sh\n      python -m venv rps_app_venv\n      rps_app_venv\\Scripts\\activate\n      ```\n    - **Linux**:\n      ```sh\n      python3 -m venv rps_app_venv\n      source rps_app_venv/bin/activate\n      ```\n\n3. Install the dependencies:\n    - **Windows**:\n      ```sh\n      pip install -r requirements.txt\n      ```\n    - **Linux**:\n      ```sh\n      sudo apt-get install python3-gi\n      sudo apt-get install python3-gi-cairo gir1.2-gtk-3.0\n      sudo apt-get install libcairo2-dev\n      sudo apt install libgirepository1.0-dev\n      pip install pygobject==3.42.2\n      pip install -r requirements.txt\n      ``` \n\n4. Run the application:\n    - **Windows**:\n      ```sh\n      python src\\rps_app.py\n      ```\n    - **Linux**:\n      ```sh\n      python src/rps_app.py\n      ```\n\n## Usage\nAfter 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.\n\n- **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:\n    - **Windows**:\n      ```sh\n      C:\\Users\\\u003cYourUsername\u003e\\AppData\\Roaming\\rps-app\\user_data.txt\n      ```\n    - **Linux**:\n      ```sh\n      /home/\u003cYourUsername\u003e/.local/share/rps-app/user_data.txt\n      ```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LukeWait/rps-app/raw/main/assets/screenshots/rps-app-new-user.png\" alt=\"New User Screenshot\" width=\"600\"\u003e\n\u003c/p\u003e\n\n- **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.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LukeWait/rps-app/raw/main/assets/screenshots/rps-app-hosting.png\" alt=\"Hosting Screenshot\" width=\"600\"\u003e\n\u003c/p\u003e\n\n- **Joining A Game**: From the `Join` tab you can search for anyone waiting to host a session on the network.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LukeWait/rps-app/raw/main/assets/screenshots/rps-app-joining.png\" alt=\"Joining Screenshot\" width=\"600\"\u003e\n\u003c/p\u003e\n\n- **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.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/LukeWait/rps-app/raw/main/assets/screenshots/rps-app-playing.png\" alt=\"Playing Screenshot\" width=\"600\"\u003e\n\u003c/p\u003e\n\n- **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.\n\n- **Changing User \u0026 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.\n\n- **Settings**: From the `Settings` tab you can choose to turn on/off audio options and select network ports.\n\n## Development\n### Building Executables with PyInstaller\n#### Windows\nRun the following command from the project main directory:\n```sh\npyinstaller --onefile --add-data \"assets/images:assets/images\" --add-data \"assets/fonts:assets/fonts\" --add-data \"assets/audio:assets/audio\" --noconsole src/rps_app.py\n```\n#### Linux\nFor Linux, you need to create a hook-PIL.py file to handle the PIL library correctly. Follow these steps:\n1. Create a file named hook-PIL.py in the main directory of your project with the following content:\n    ```sh\n    from PyInstaller.utils.hooks import copy_metadata, collect_submodules\n\n    datas = copy_metadata('Pillow')\n    hiddenimports = collect_submodules('PIL')\n    ```\n2. Run the following command from the project main directory:\n    ```sh\n    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\n    ```\n\nThis 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.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Acknowledgments\nIcons used in the app are designed by Freepik - [www.freepik.com](https://www.freepik.com).\n\nFonts used in the app are open source Google Fonts.\n\n## Source Code\nThe source code for this project can be found in the GitHub repository: [https://github.com/LukeWait/rps-app](https://www.github.com/LukeWait/rps-app).\n\n## Dependencies\nFor those building from source, the dependencies listed in `requirements.txt` are:\n- customtkinter==5.2.1\n- CTkMessagebox==2.5\n- CTkListbox==0.10\n- CTkToolTip==0.8\n- Pillow==10.1.0\n- gTTS==2.4.0\n- playsound==1.2.2\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewait%2Frps-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukewait%2Frps-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewait%2Frps-app/lists"}