Turn your smartphone into a game controller with this simple app! This project utilizes the Godot game engine for the Android client app and a Python server to seamlessly connect your smartphone to your PC.
This project consists of two main components: the client (Android app) and the server. The client is developed using Godot Engine and GDScript, while the server is written in Python. Together, they allow you to use your smartphone as a game controller for your PC.
Behind the scenes, the Python server starts a UDP socket server, waiting for connections from any device within the local IPv4 network at a specified port. The client app can establish a connection with the server using a password, and it sends the UI inputs from your smartphone to the server. The server leverages the vgamepad library to emulate keypresses on your PC, effectively turning your smartphone into a virtual gamepad.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Download and Install the latest release of PlayPulse Desktop application GUI from here.
- The first time you open the application you will have to download the ViGem drivers to emulate the virtual gamepad.
- After installation restart your computer for the effects to take place.
- Open the PlayPulse Desktop.
- Download and Install the latest release of PlayPulse Connect APK from here.
- Open the desktop PlayPulse Desktop Application.
- Open the android app and enter the PIN.
- Press Proceed and Enjoy!.
The underlying library only supports windows at the moment. So use a windows PC while running the server app.
- Android Smartphone for Client Appp
- Windows PC
- Godot Game Engine
- Python 3
- ViGem Drivers
--
Step by step series of Instructions get a development env running.
- Clone the repo
git clone https://github.com/zan-keith/PlayPulse-Connect.git
Navigate to the installation folder
- Change Directory
cd Server/
- Install Requirements
pip install -r requirements.txt
- Install Requirements
- Import the Godot project
cd Client/
- For android export follow these instructions
- Install the requirements
cd Server/CLI/
python main.py -h
python main.py --ip [your_local_ip_address] --port [custom_port] --pin [4_digit_pin] --autokill [true/false]
All are optional arguments
Commands | What it does | Usage | DataType |
---|---|---|---|
--ip | Specify the IP address for the socket server. | --ip [yourlocalipaddress] | String |
--port | Specify the port for the socket server to run on. | --port [customport] | Integer |
--pin | Specify the PIN authentication code. ( The code must be 4 digits ). | --pin [4digitpin] | Integer |
--autokill | Automatically closes the server once the client presses disconnect | --autokill [true/false] | Boolean |
--timeout | Specifies the time to automatically close the server due to inactivity | --timeout [seconds] | Integer |
- Install the requirements
cd "Server/Gui App/"
python main.py
- Add rumble mechanics. guide.
- Get LED outputs to change the color theme in godot.
- Thats it .. for now
- Python 3.11 - Server Side
- Godot - Client Interface
- Vgamepad - Virtual Controller
- @zan-keith - Idea & Work