Description • Prerequisites • Important Information • Setup • How To Use • Contributing • License • Disclaimer
This Python script allows you to control games, such as Pokémon, using comments from YouTube and TikTok videos. It captures the comments from both platforms and maps them to keypresses that are then used to control the game.
To clone and run this application, you'll need -
- Python 3.6 or higher
- keyboard library
pip install keyboard
- TikTokLive library
pip install TikTokLive
- pytchat library
pip install pytchat
-
The script uses the keyboard library to simulate keypresses. Ensure that the game you want to control is compatible with keypress inputs.
-
The script utilizes the TikTokLive library to capture TikTok comments and the pytchat library to capture YouTube comments.
-
Comments containing the specified key events ("up", "down", "left", "right", "a", "b") will be detected and used for game control.
- Clone the repository or download the script file to your local machine.
git clone https://github.com/maddox05/Comment-Game-Controller.git
- Install the required libraries using the commands mentioned in the "Prerequisites" section.
-
Run the script using the command
python game_controller.py
-
If you want to use comments from
-
TikTok -
- Obtain the TikTok username that you want to use for the live comments. Enter it when prompted by the script.
-
YouTube -
- Provide the URL of the YouTube video (End ID) that you want to capture comments from. Enter it when prompted by the script.
-
-
The script will start capturing comments from chosen platforms.
-
Whenever a comment containing a specific key event (e.g., "up", "down", "left", "right", "a", "b") is detected, the corresponding key will be simulated as a keypress.
-
The simulated keypress will be sent to the game, allowing you to control it using the comments.
-
The script will display the name of the user and the comment for each detected key event.
Note: Make sure the game window is active and in focus while running the script for the keypresses to be recognized correctly.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This script is provided as-is, without any warranty or guarantee. Use it at your own risk. The author is not responsible for any damages or consequences caused by using this script.
Note: Please ensure that you comply with the terms of service of YouTube and TikTok when using this script.
GitHub @maddox05