Skip to content

Khabi project

khakikha requested to merge khakikha/ppy1-2025:khabi-project into main

My Game )

Game Overview: Space Game is a simple 2D arcade-style game where the player controls a spaceship and avoids falling asteroids. The game is implemented in Python using the pygame library. It demonstrates core programming concepts such as collision detection, animation loops, and event handling.

Main Features:

  • A player-controlled spaceship moves left and right across the bottom of the screen
  • Asteroids fall from the top with random horizontal positions
  • Collision detection ends the game and displays the final score
  • Score increases as the player avoids asteroids
  • No external images — all graphics are generated using basic shapes (rectangles and ellipses)

Covered Topics:

  • Event handling with pygame (keyboard input, quit event)
  • Game loop with real-time updates using clock.tick(60)
  • Object movement and boundary checks
  • Collision detection with pygame.Rect and colliderect
  • Drawing shapes and text on screen
  • Score tracking with live rendering using pygame.font

Merge request reports