How sergiolneves/mountainshooter works
Project type and purpose
• This is a desktop 2D arcade game (“Mountain Shooter”) written in Python, built on Pygame.
• It comprises a main game loop (main.py → Game), two playable levels, a coop-mode menu, sound assets, and a SQLite3 DB for persisting high scores.
File structure
• Top-level:
• asset/ → MP3 files for music and effects
• code/ → all the Python modules for game logic
• DBScore → the SQLite database file holding score data
• main.py → entry point, initializes Pygame and kicks off Game
• requirements.txt → external dependencies (pygame, sqlite3 built-in)
• code/:
• Game.py, Menu.py, Level.py → high-level orchestration of menu flow, levels, and the main loop
• EntityFactory.py → factory that instantiates Player, Enemy, Shots, etc.
• EntityMediator.py → implements the mediator pattern to route events between entities
• Entity.py, Player.py, Enemy.py, PlayerShot.py, EnemyShot.py → core domain objects
• Background.py, Const.py → static resources & constants
• Score.py, DBProxy.py → score model and persistence layer
README for additional insights
• Confirms Pygame as rendering & event engine
• Two levels with timeout events
• Coop play for two players
• SQLite3 DB for score storage