Skip to content

minciyaks/Pygame_first_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โš”๏ธ Pygame_first_project

๐ŸŽฎ My first 2D project built using Python and Pygame while learning from TechWithTim tutorials

This project is a simple 2D side-scrolling shooter created to learn and practice core Pygame concepts such as object-oriented programming (OOP), sprite animation, collision detection, sound handling, and basic game mechanics.

โœจ Features

  • Player Health System (HP)
    The player uses a health bar instead of a traditional score counter.

  • Enemy Health Bar
    The enemy (Goblin) displays its remaining health above its head.

  • Collision Handling
    Playerโ€“enemy collisions reduce player health smoothly without freezing or repeated instant damage.

  • Sprite Animation
    Separate walking animations for both the player and the enemy.

  • Enemy Patrol Movement
    The enemy automatically moves back and forth between two boundary points.

  • Sound Effects & Background Music
    Includes shooting sounds, hit sounds, and looping background music.

๐Ÿš€ How to Run

Requirements

  • Python 3.x
  • Pygame library

Install Pygame using pip:

pip install pygame

๐Ÿ•น๏ธ Controls

Key Action
Left Arrow Move character left
Right Arrow Move character right
Up Arrow Jump
Spacebar Shoot projectile

โš™๏ธ Project Structure

Pygame_first_project/
โ”œโ”€โ”€ game.py
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ R1.png, R2.png, R3.png, ...
โ”œโ”€โ”€ L1.png, L2.png, L3.png, ...
โ”œโ”€โ”€ bg.jpg
โ”œโ”€โ”€ bullet.mp3
โ”œโ”€โ”€ hit.mp3
โ””โ”€โ”€ music.mp3

๐ŸŒŸ Learning Credits

This project was developed while learning Pygame through tutorials from the YouTube channel:

Tech With Tim

Special thanks to TechWithTim for the clear, beginner-friendly tutorials that guided the development of this project.

About

๐ŸŽฎ My first 2D project built using Python and Pygame while learning from TechWithTim tutorials.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages