How uzairexy/sfml_c-_simple_games works
Project type and purpose
• This is a desktop C++ monolithic application that bundles several simple 2D games built on top of the SFML multimedia library.
• Each “Game” (Game 1, Game 2, Game 3) lives in its own subfolder under SFML_C++_Simple_Games/SFML_C++_Simple_Games but reuses common engine components (Game base class, Entity classes, Tile/TileMap).
File structure
• Top-level SFML_C++_Simple_Games folder:
• .vs (Visual Studio solution metadata)
• Release (compiled .exe, .pdb, .ipdb for shipping)
• SFML_C++_Simple_Games (actual source tree)
• Inside source tree:
• Fonts/Textures (static assets)
• Game 1, Game 2, Game 3 (per-game entry points and overrides)
• Core classes: Game.cpp/.h, Player.cpp/.h, Tile.cpp/.h, TileMap.cpp/.h, etc.
• stdafx.* (precompiled header support)
• main.cpp (application entry, chooses/runs a Game)
README
• Confirms “Simple games made in C++ and SFML.”
• No higher-level architecture docs, so we infer a shared engine + per-game specialization design.
a. Main components
• Application (main.cpp)
• Core Engine Subsystem
– Game Loop Manager
– Input Handler
– Renderer
– Resource Manager (loads from Fonts/Textures)
• Game Modules
– Game1, Game2, Game3 (inherit from Game base class)
• Domain Entities
– Player, Enemy, Bullet, SwagBall
• System
– Tile, TileMap
• External Dependency
– SFML Library (Graphics, Window, Audio, System)
b. Relationships & interactions
• Application → initializes SFML::RenderWindow
• Application → instantiates chosen Game module
• Entities and Map System interact during update/render phases
c. Architectural patterns / design principles
• Monolithic modular structure: a shared “engine” with plug-in style Game subclasses
• Base class polymorphism: Game interface, overridden by each Game N
• Resource centralization: Resource Manager loads and caches fonts/textures
d. Key technologies / frameworks
• C++17 (or C++14)
• SFML (Graphics, Window, System, Audio modules)
• Visual Studio solution (precompiled headers, Debug/Release folders)
Capturing essential elements
• You include deployment artifacts (Release folder with .exe) off to one side
• Build-time PCH optimization (stdafx) as a footnote