How adam97-1/pong works
Pong is an SFML desktop game whose main loop updates a graphic interface and displays its active view. Users navigate the main, settings, and information screens, then play either two-player or computer-opponent Pong. The game view handles keyboard input, timing, scoring, movement, collision responses, and sound; settings propagate resolution and audio changes through listeners. The graph follows the documented class ownership and the shown gameplay calls. Some screen-dispatch and settings wiring is represented only by declarations, so unverified calls are omitted.
Main entry points: graphicInterface.cpp Graphic Interface · gameview.cpp Game View · view.cpp View Base · settingsmenu.cpp Settings Menu
Components 14
Application and Screens
- Main Loop
src/main.cpp - Graphic Interface
src/Gui/graphicInterface.cpp - Main Menu
src/Gui/mainmenu.cpp - Game Info
src/Gui/gameinfo.cpp - View Base
src/Gui/view.cpp - Text Rendering
src/Gui/text.cpp
Pong Gameplay
- Game View
src/Gui/gameview.cpp - Court Bounds
src/gamebounds.cpp - Game Data
src/Gui/gameinfo.cpp
Settings Events
- Settings Menu
src/Gui/settingsmenu.cpp - Settings Listeners
inc/settingseventlisteners.h
Shared Game Objects
- Paddle Players
src/player.cpp - Collision Objects
src/rectangleobject.cpp
Other components
- Player
Connections 19
- Player → Main Loop: starts game
README.md - Main Loop → Graphic Interface: updates and displays
src/main.cpp - Graphic Interface → Main Menu: owns screen
- Graphic Interface → Settings Menu: owns screen
- Graphic Interface → Game View: owns screen
- Graphic Interface → Game Info: owns screen
- Main Menu → View Base: inherits
- Settings Menu → View Base: inherits
- Game Info → View Base: inherits
- Game View → View Base: inherits
- View Base → Text Rendering: uses
- View Base → Settings Listeners: implements
- Settings Menu → Settings Listeners: notifies
- Graphic Interface → Settings Listeners: receives changes
- Game View → Court Bounds: checks collisions
src/Gui/gameview.cpp - Game View → Paddle Players: updates and scores
src/Gui/gameview.cpp - Game View → Collision Objects: checks collisions
src/Gui/gameview.cpp - Paddle Players → Collision Objects: inherits
- Game View → Game Data: uses game data