Skip to content

Jalpan04/Grappling-using-Pygame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Grappling using Pygame

Python Pygame GitHub repo size License: GPL v3

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.

Features

  • 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.

Controls

  • 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.

File Structure

├── grappling.py          # Core Pygame script including game loop, physics, and rendering
├── .gitignore            # Git ignore patterns
└── LICENSE               # MIT License

Getting Started

Prerequisites

  • Python 3.7 or higher.
  • pygame library.

Installation

  1. Clone the repository:
    git clone https://github.com/Jalpan04/Grappling-using-Pygame.git
  2. Navigate to the project directory:
    cd Grappling-using-Pygame
  3. Install Pygame:
    pip install pygame

Execution

Run the game script:

python grappling.py

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

About

A 2D physics-based procedurally generated infinite platformer game built in Python using Pygame, featuring dynamic physics, camera tracking, and a mouse-aimed grappling hook mechanic.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages