A 2D physics-based procedurally generated infinite platformer game built in Python using Pygame, featuring dynamic physics, smooth camera tracking, and a mouse-aimed grappling hook mechanic.
- Grappling Hook Mechanic: Shoot a tether hook in any direction using the mouse, attaching to floating platforms and pulling the player towards the hook.
- Infinite Procedural Generation: Platforms are dynamically generated ahead of and above the player as they navigate the game world horizontally or vertically, offering infinite progression.
- Dynamic Physics System: Simulated gravity, inertia, elastic pull force, and horizontal friction to create a realistic swinging movement.
- Smooth Camera Tracking: The view coordinates adjust dynamically to keep the player centered on the screen.
- Collision Detection: Real-time bounding-box collisions for landable surfaces.
- Left Mouse Click (Hold): Shoot the grappling hook towards the mouse cursor. Keep the button held down to continue pulling yourself towards the attachment point.
- Release Left Mouse: Release the grappling hook, enabling the player to launch off or fall under gravity.
- Aiming: Aim with the mouse pointer.
├── grappling.py # Core Pygame script including game loop, physics, and rendering
├── .gitignore # Git ignore patterns
└── LICENSE # MIT License
- Python 3.7 or higher.
pygamelibrary.
- Clone the repository:
git clone https://github.com/Jalpan04/Grappling-using-Pygame.git
- Navigate to the project directory:
cd Grappling-using-Pygame - Install Pygame:
pip install pygame
Run the game script:
python grappling.pyThis project is licensed under the GPL-3.0 License - see the LICENSE file for details.