Skip to content

Conversation

@Sourav328
Copy link

No description provided.

Sourav328 and others added 22 commits July 18, 2025 18:04
Introduced GameWindowManager class to encapsulate SFML window creation, rendering, and lifecycle management. Updated Main.cpp to use the new manager, and modified project files to include the new source and header. Removed placeholder SFML directory file.
Add GameWindowManager for window handling
Changed game window creation to use desktop fullscreen mode and updated the clear colour from black to red. Also performed minor code formatting improvements.
Update game window to fullscreen and change clear color
Introduced EventManager class to encapsulate event polling and key press detection using SFML. Updated Main.cpp to use EventManager for handling window events, and changed the game window title. Project files updated to include new source and header files.
Add EventManager for handling window events
Introduced isLeftMouseButtonClicked() to EventManager and updated event polling to detect and log left mouse button clicks with their positions. Also changed game window creation to use a fixed size and windowed mode instead of fullscreen.
Add left mouse button click handling to EventManager
Introduced a new GameLoop class to encapsulate the main game loop logic, including initialization, event polling, updating, and rendering. Refactored Main.cpp to use GameLoop, updated GameWindowManager with clearer window management methods, and adjusted project files to include the new class.
Add GameLoop class and refactor main loop structure
Introduced Ball, Paddle, and GameplayManager classes to handle core gameplay elements. Updated GameLoop to integrate GameplayManager and render gameplay objects. Project files updated to include new source and header files.
Replaced Ball's CircleShape with a Sprite using a texture for improved visuals. Added texture loading and initialization methods, updated member variables, and adjusted render logic to draw the textured sprite instead of a simple shape.
Refactored the game loop and window management to use stack-allocated objects instead of pointers, removed unnecessary global using statements, and improved encapsulation. Updated Ball and Paddle classes to use SFML shapes and textures directly, added movement logic for paddles, and centralized event handling. The GameplayManager now updates paddle positions based on keyboard input, and rendering is streamlined for better maintainability.
Introduced a Boundary class to handle game boundaries and center line rendering. Integrated boundary rendering into GameplayManager, updated project structure to move Paddle files into a subdirectory, and performed minor code style improvements and constructor additions for GameWindowManager.
Implemented ball movement and collision detection with paddles in Ball class. Added velocity handling, boundary checks, and ball reset on out-of-bounds. Paddle class now exposes paddle sprite for collision and includes reset functionality. Updated GameplayManager to call new ball update and collision methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant