Conversation
…Protected, Explode)
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the core game management system and main application entry point for BounceVerse, a breakout-style game built with FXGL. The update establishes the foundational architecture for brick-based gameplay with various brick types and power-up mechanics.
- Added GameManager class for handling game logic including brick spawning, score management, and level progression
- Implemented comprehensive brick system with multiple types (normal, strong, explode, protected) and factory pattern
- Created paddle hierarchy with specialized variants (laser, shrink, expand) and main FXGL application setup
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| BounceVerseApp.java | Main FXGL application entry point with game window configuration and initialization |
| GameManager.java | Core game logic manager handling brick spawning, scoring, and game state |
| BrickFactory.java | Factory class for creating different brick entity types with visual components |
| BrickComponent.java | Base brick component with HP system, visual updates, and destruction logic |
| ExplodeBrick.java | Specialized brick that triggers explosion effects on nearby bricks when destroyed |
| ProtectedBrick.java | Brick variant with directional shields that block hits from specific sides |
| PowerBrick.java | Power-up brick component (placeholder implementation) |
| Paddle.java | Base paddle class with movement and positioning capabilities |
| LaserPaddle.java | Paddle variant capable of shooting bullets (placeholder bullet management) |
| ShrinkPaddle.java | Narrower paddle variant using scale factor |
| ExpendPaddle.java | Wider paddle variant using scale factor |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| */ | ||
| public class LaserPaddle extends Paddle { | ||
| /** List of bullets currently fired by the paddle. */ | ||
| private List<LaserPaddle> bullets; |
There was a problem hiding this comment.
The bullets list should contain bullet entities, not LaserPaddle instances. This should be List<Entity> or a dedicated bullet class type.
| /** Updates all bullets when them get off-screen or hit the brick. */ | ||
| public void updateBullets() {} | ||
|
|
||
| public List<LaserPaddle> getBullets() { |
There was a problem hiding this comment.
The return type should match the bullets field type. If bullets should be Entity objects, this should return List<Entity>.
| // The scale factor applied to the paddle's width. | ||
| private static final double SCALE = 1.5; | ||
|
|
||
| // Create a new expended paddle. |
There was a problem hiding this comment.
Comment should say 'expanded paddle' instead of 'expended paddle' to match the intended functionality.
| // Create a new expended paddle. | |
| // Create a new expanded paddle. |
src/main/java/com/github/codestorm/bounceverse/BounceVerseApp.java
Outdated
Show resolved
Hide resolved
|
|
||
| /** Create a rectangular visual for brick. */ | ||
| public void onAdded() { | ||
| // Lấy view của Entity |
There was a problem hiding this comment.
Comment is in Vietnamese. Should be in English: '// Get the Entity's view'
| // Lấy view của Entity | |
| // Get the Entity's view |
| List<Entity> entites = FXGL.getGameWorld().getEntities(); | ||
| for (Entity e : entites) { |
There was a problem hiding this comment.
Variable name 'entites' should be 'entities' (missing 'i').
| List<Entity> entites = FXGL.getGameWorld().getEntities(); | |
| for (Entity e : entites) { | |
| List<Entity> entities = FXGL.getGameWorld().getEntities(); | |
| for (Entity e : entities) { |
# Conflicts: # src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java # src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java
- Renamed `BounceVerseApp` to `Bounceverse` for consistency. - Set the game title to the new class name. - Integrated `BrickFactory` for spawning bricks in the game. - Updated `build.gradle` for application configuration and added release tasks.
- Added permissions to `buildRelease.yml`, `build.yml`, and `setup.yml` (to manage content access). - Created new log files for debugging (to assist in troubleshooting). - Updated `Readme.txt` to clarify the purpose of the directory.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.
Files not reviewed (1)
- .idea/misc.xml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| FXGL.getGameWorld().addEntityFactory(new BrickFactory()); | ||
|
|
||
| var brick1 = FXGL.spawn("normalBrick", 100, 100); | ||
| var brick2 = FXGL.spawn("normalBrick", 100, 100); |
There was a problem hiding this comment.
Both bricks are spawned at the exact same position (100, 100), causing them to overlap. The second brick should be positioned differently.
| var brick2 = FXGL.spawn("normalBrick", 100, 100); | |
| var brick2 = FXGL.spawn("normalBrick", 150, 100); |
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: .github/workflows/setup.yml |
There was a problem hiding this comment.
Cannot use a workflow file as a step. Use 'uses: ./.github/workflows/setup.yml' for a reusable workflow or convert setup.yml to an action.
| - uses: .github/workflows/setup.yml | |
| - uses: ./.github/workflows/setup.yml | |
| with: {} | |
| secrets: {} |
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: .github/workflows/setup.yml |
There was a problem hiding this comment.
Cannot use a workflow file as a step. Use 'uses: ./.github/workflows/setup.yml' for a reusable workflow or convert setup.yml to an action.
| - uses: .github/workflows/setup.yml | |
| - uses: ./.github/workflows/setup.yml |
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: .github/workflows/setup.yml |
There was a problem hiding this comment.
Cannot use a workflow file as a step. Use 'uses: ./.github/workflows/setup.yml' for a reusable workflow or convert setup.yml to an action.
| - uses: .github/workflows/setup.yml | |
| - uses: ./.github/workflows/setup.yml@main |
Expanded the guidelines for writing commit messages, detailing structure, types, and examples to ensure clarity and consistency in commit history.
thnhmai06
left a comment
There was a problem hiding this comment.
lgtm nhưng @ManhTanTran cần bám sát sườn vào các đối tượng trong engine nhé
* feat: Brick * feat(brick): add PowerBrick and update Brick, ExoplodeBrick, ProtectedBrick * docs(brick): add Javadoc for Brick, ExoplodeBrick, PowerBrick, ProtectedBrick * refactor(brick): remove NormalBrick and StrongBrick * feat(paddle): add ExpendPaddle, LaserPaddle, ShrinkPaddle and update Paddle * feat(paddle): add ExpendPaddle, LaserPaddle, ShrinkPaddle and update Paddle * refactor: remove brick and gameManager packages * feat(brick): refactor and document brick module (Factory, Component, Protected, Explode) * feat(game): add GameManager and BounceVerseApp for game initialization * refactor: Refactor GameManager, build/run scripts and update ci/cd - Renamed `BounceVerseApp` to `Bounceverse` for consistency. - Set the game title to the new class name. - Integrated `BrickFactory` for spawning bricks in the game. - Updated `build.gradle` for application configuration and added release tasks. * ci: add specific workflow permission - Added permissions to `buildRelease.yml`, `build.yml`, and `setup.yml` (to manage content access). - Created new log files for debugging (to assist in troubleshooting). - Updated `Readme.txt` to clarify the purpose of the directory. * docs: update git commit instructions to align with Conventional Commits Expanded the guidelines for writing commit messages, detailing structure, types, and examples to ensure clarity and consistency in commit history. --------- Co-authored-by: Mai Thành <62001770+thnhmai06@users.noreply.github.com>
🎮 Summary
Introduced the core game management system and the main FXGL application entry point.
This update lays the foundation for gameplay initialization, brick spawning, and runtime management.
✨ Changes
GameManagerclass to handle:BrickFactoryBounceVerseApp: