Skip to content

matejapp/SpaceExplorer

Repository files navigation

Space Explorer

Space Explorer is a Python/Pygame arcade game where the player controls a spaceship, collects stars, avoids enemy ships, and saves per-user high scores in SQLite.

Features

  • Keyboard-controlled spaceship movement with animated thrust.
  • Collectible resources that increase the player's score.
  • Dynamic enemy obstacle spawning, movement, collision detection, and fade-out behavior.
  • Username entry and SQLite-backed high-score persistence.
  • Background music and game-over sound effects with safe fallback behavior if audio is unavailable.

Project Structure

assets/                         Game sprites, background, and audio assets
src/space_explorer/
  app.py                         Main game loop and state management
  assets.py                      Central image loading and fallback surfaces
  audio.py                       Music and sound-effect management
  database.py                    SQLite high-score repository
  screens.py                     Username screen UI
  settings.py                    Centralized game configuration
  entities/
    player.py                    Player sprite behavior
    obstacle.py                  Enemy obstacle behavior
    resource.py                  Collectible resource behavior
main.py                          Project launcher

Running the Game

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python main.py

Controls:

  • W, A, S, D: move the spaceship
  • Space: spawn an obstacle while playing
  • R: spawn a resource while playing
  • Enter: submit username or restart after game over
  • Q: quit

About

Python/Pygame 2d game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages