Let’s update the README for your vibe-controls package to include the new flappy mode, along with its controls, while keeping the existing instructions for the fly and shoot modes. The README will now cover all three modes (fly, shoot, and flappy), providing clear usage instructions and control details for each.
Here’s the updated README:
Vibe Controls
A Python package to control games using hand gestures via webcam. Supports three modes: fly for controlling a Three.js flying game (like fly.pieter.com), shoot for controlling first-person shooter (FPS) games, and flappy for controlling games like Flappy Bird.
Installation
Prerequisites
- Python 3.11+
Step 1: Install UV
- macOS:
brew install uv
- Windows/Linux:
pip install uv
Step 2: Run Vibe Controls
To run the app, use the uvx command with the --mode argument to specify the control mode (fly, shoot, or flappy). The app will activate your webcam for hand gesture detection.
Command Syntax
uvx vibe-controls --mode [fly|shoot|flappy]
- Fly Mode (default): Control a Three.js flying game.
uvx vibe-controls --mode fly
- Shoot Mode: Control an FPS game.
uvx vibe-controls --mode shoot
- Flappy Mode: Control a game like Flappy Bird.
uvx vibe-controls --mode flappy
Wait until the webcam is turned on and a window titled "Hand Tracking - Fly Mode", "Hand Tracking - Shoot Mode", or "Hand Tracking - Flappy Mode" appears.
Controls
Fly Mode (--mode fly)
Designed for controlling a Three.js flying game like fly.pieter.com.
-
Hand Detection:
- One Hand: Holds the 'W' key to move forward.
- Two Hands: Holds the Space key to perform an action (e.g., jump or boost, depending on the game).
- No Hands: Releases all keys.
-
Gestures:
- Flat Hand: No directional input (neutral).
- Tilt Up: Presses the Down arrow key (pitch down).
- Tilt Down: Presses the Up arrow key (pitch up).
- Tilt Left: Presses the 'D' key (yaw right).
- Tilt Right: Presses the 'A' key (yaw left).
- Rotate Left: Presses the Left arrow key (roll left).
- Rotate Right: Presses the Right arrow key (roll right).
-
Exit: Press the ESC key to close the app.
Shoot Mode (--mode shoot)
Designed for controlling FPS games.
-
Hand Detection:
- One Hand: Holds the 'W' key to move forward.
- No Hands: Releases the 'W' key.
-
Gestures:
- Two Fingers Extended (Pointing): Moves the mouse in the direction you point.
- Point up: Mouse moves up (look up).
- Point down: Mouse moves down (look down).
- Point left: Mouse moves left (look left).
- Point right: Mouse moves right (look right).
- Point diagonally: Mouse moves diagonally (look in that direction).
- Four Fingers Extended: Holds the left mouse button to shoot.
- Two Fingers Extended (Pointing): Moves the mouse in the direction you point.
-
Exit: Press the ESC key to close the app.
Flappy Mode (--mode flappy)
Designed for controlling games like Flappy Bird.
-
Gestures:
- All Fingers Extended (Hand Spread): Triggers a flap by pressing and releasing the Space key. The hand should resemble a bird’s wing with fingers spread apart. A flap occurs approximately every 0.5 seconds while the gesture is held.
-
Exit: Press the ESC key to close the app.
Notes
- Ensure your webcam is properly connected and has sufficient lighting for accurate hand detection.
- For FPS games in
shootmode, you may need to adjust the in-game mouse sensitivity to match the gesture controls for a smoother experience. - In
flappymode, the flapping frequency can be adjusted by modifying the cooldown period in the code if needed (default is 0.5 seconds between flaps). - If gesture detection is inconsistent, ensure your hand is clearly visible to the webcam and matches the expected gesture for the mode.
Explanation of Changes
- Added Flappy Mode to Command Syntax: Included
flappyas a valid option for the--modeargument with an example command (uvx vibe-controls --mode flappy). - Added Flappy Mode Controls Section: Created a new subsection under "Controls" for
flappymode, describing the gesture (all fingers extended and spread) and the action (Space key press for a flap every 0.5 seconds). - Updated Notes: Added a note about the flapping frequency in
flappymode and the possibility to adjust the cooldown period in the code. - Kept Existing Sections: Retained the instructions and controls for
flyandshootmodes, ensuring the README covers all three modes comprehensively.
Metadata
Release files for vibe-controls 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| vibe_controls-0.1.7.tar.gz | 9.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vibe_controls-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.5 kB
Release files / vibe_controls-0.1.7.tar.gz
| Download URL | vibe_controls-0.1.7.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a96e3a8a37dc42ee0763e862f7fa04c06c4448a1c1200b35050f3ceaf65a16d
|
|
BLAKE2b-256 checksum How to use checksums |
4d34c780920e71baad461430ddab3affbad76c3cf7817005e507a8f54fe90537
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / vibe_controls-0.1.7-py3-none-any.whl
| Download URL | vibe_controls-0.1.7-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b95eccb4e0b987ad68dbd47ba00d391c4f589b4e6f66650a336812a05f22679
|
|
BLAKE2b-256 checksum How to use checksums |
2c77b79b8ac5d18929f5e38733cf9a7ca54756ba6c96ea17895dd618e0f98eb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Security for vibe-controls 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.