How salman-3107/game works
Project type and purpose
• This is a small, single‐player desktop game written in C++.
• It uses a custom “iGraphics” library (wrapping OpenGL/SDL calls) for rendering and input, plus a simple sound interface (iSound).
• Purpose: implement a classic “Bounce” arcade game with levels, obstacles, scoring and sound.
File structure
Top-level of interest (ignore the huge MINGW/OpenGL SDK folders—they are external toolchains):
• bounce_classic.cpp – main game implementation (game loop, logic, menu, levels)
• iGraphics.h / iSound.h / iFont.h – interfaces to graphics, sound, font subsystems
• assets/ – images (BMPs) and sounds (WAV), organized by function (menus, levels)
• obj/ – compiled object files (e.g., opengl.o)
• bin / release / runner scripts (.bat, .sh) – packaging, launching, build helpers
• highscore.txt, saves/names.txt – persistent storage for leaderboards
README for insights
• Confirms C++ + iGraphics library (which under the hood uses OpenGL/SDL).
• Describes game features: menu, levels, physics, scoring.
Components
a. Main components
• Game Client (desktop executable)
• Asset Manager (images, sounds, fonts loader)
• Graphics Subsystem (iGraphics → SDL/OpenGL)
• Audio Subsystem (iSound → SDL_mixer or WAV playback)
• Input Handler (keyboard/mouse events via SDL)
• Game Logic / Physics Engine (ball movement, collisions, level progression)
• Persistence Layer (reads/writes highscore.txt, names.txt)
• Build Toolchain (GCC via MinGW)
b. Relationships & data flow
1. At build time:
Source files (bounce_classic.cpp + headers)
→ compiled by GCC (MinGW)
→ linked with iGraphics, OpenGL, SDL libs
→ produces Game Client binary
2. At runtime:
Game Client
→ calls Asset Manager to load bitmaps/WAVs
→ Input Handler polls SDL events → passes to Game Logic
→ Graphics Subsystem renders frames
→ Audio Subsystem plays sound effects/music
→ On leaderboard update, Persistence Layer writes files
c. Architectural patterns / principles
• Monolithic C++ application with clear separation of subsystems (graphics, audio, input, logic).
• Event‐loop architecture (single thread processing input → update → render → sound).
• Asset Manager as a resource cache.
• Simple file‐based persistence (text files for highscores).
d. Key technologies
• C++
• iGraphics library (wrapper over SDL + OpenGL)
• SDL2 / OpenGL (for rendering & event/input)
• MinGW GCC toolchain (build)
• WAV sound playback (via iSound)
• BMP image format