Skip to content

xjeoo/2d-platformer-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍄 2D Platformer Game

A 2D platformer developed in Python using the Pygame library. This project was built as a practical exercise to explore Object-Oriented Programming (OOP) and game development mechanics.

📸 Screenshots

image

💡 Key Concepts & Mechanics

This project served as a hands-on introduction to structuring Python applications. The codebase demonstrates:

  • OOP Principles: Using Python classes to manage game entities (Player, Enemies, Level Tiles).
  • The Game Loop: Handling real-time event processing, logic updates, and frame rendering.
  • Physics & Collisions: Implementing gravity, jumping mechanics, and tile-based collision detection.
  • Level Generation: Utilizing a level editor to parse and render dynamic game environments.

🛠️ Tech Stack

  • Language: Python 3
  • Library: Pygame

🚀 How to Run Locally

Note: Python 3.10.x or newer is required

1. Clone the repository

git clone <link-of-this-repository>

2. Activate the virtual environment

cd <repository-folder-name>

On Windows:

python -m venv .venv
.venv\Scripts\activate

On macOS/Linux:

python3 -m venv .venv
source .venv/bin/activate

3. Install dependencies

pip install pygame==2.6.1

4. Run the game

python joc.py

🎮 Controls

  • A: Walk left
  • D: Walk right
  • W: Jump
  • Space: Shoot
  • L-Ctrl: Throw Grenade
  • Escape: Pause

📝 Acknowledgements

  • Tutorial Reference: The core mechanics, physics, and level editor were built following the Pygame Platformer Tutorial by russs123 as a learning reference for Pygame.
  • Art Assets: Free, open-source assets provided via the tutorial's repository here.

About

A complete 2D platformer game built to apply Object-Oriented Programming principles.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages