How creusator/projet-minesmash works
Game Engine
• Game.py: Main execution loop.
• Variables_Globales.py: Configuration and global variables.
Asset Management
• Asset Directory: Images, sprites, and palettes.
• Piskel Folder: Sprite animations and interfaces.
Gameplay Mechanics
• Blocs.py: Block creation and grid management.
• Personnage.py: Player character management.
• cycle_jour_nuit.py: Day-night cycle management.
User Interface
• Interface.py: Inventory, health bars, and other UI elements.
Save/Load System
• Save Directory: Managing saved game states.
Utility Components
• Item.py: Item management and interactions.
b. Relationships and Interactions
• Game Engine interacts with Asset Management to load assets.
• Game Engine orchestrates Gameplay Mechanics and User Interface.
• Gameplay Mechanics (e.g., Blocs, Personnage) rely on Variables_Globales for configurations.
• User Interface displays data managed by Gameplay Mechanics.
• Save/Load System interacts with Gameplay Mechanics to persist and retrieve game states.
• Utility Components support Gameplay Mechanics by managing items and their interactions.
c. Architectural Patterns and Design Principles
• Modular Design: Each script handles a specific aspect of the game, promoting maintainability and scalability.
• Object-Oriented Programming (OOP): Utilization of classes and inheritance (Bloc, Solide, Liquide, Personnage) for structured code.
• Separation of Concerns: Clear division between game logic, asset management, and user interface.
• MVC Pattern: Implicit separation where models (game data), views (UI), and controllers (game loop) interact cohesively.
d. Relevant Technologies, Frameworks, or Libraries
• Python 3.13: Core programming language.
• Pygame 2.6: Library for game development, handling rendering, input, and more.
• JSON: Data format used in the Save system for serialization.
Elements
• Clear Labels for Each Component:
• Name each component (e.g., Game Engine, Asset Manager, Player Controller) clearly.
Top Layer: Game Engine
• Game.py
• Variables_Globales.py
Middle Layer: Core Components
• Blocs.py (connected to Game Engine)
• Personnage.py (connected to Game Engine)
• cycle_jour_nuit.py (connected to Game Engine)
Side Layers: Supporting Systems
• Interface.py (connected to Game Engine and Core Components)
• Item.py (connected to Core Components)
Bottom Layer: Asset and Save Systems
• Asset Management (linked to Game Engine and Core Components)
• Save Directory (linked to Core Components)