From 6229cc2699fd9c8cc82afbf3248c6d06a4e2e998 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Mon, 29 Sep 2025 17:13:19 +0700 Subject: [PATCH 01/53] feat: Brick --- .../com/github/codestorm/brick/Brick.java | 65 +++++++++++++++++++ .../github/codestorm/brick/ExoplodeBrick.java | 18 +++++ .../github/codestorm/brick/NormalBrick.java | 20 ++++++ .../codestorm/brick/ProtectedBrick.java | 5 ++ .../github/codestorm/brick/StrongBrick.java | 28 ++++++++ .../codestorm/gameManager/GameManager.java | 24 +++++++ .../com/github/codestorm/paddle/Paddle.java | 5 ++ 7 files changed, 165 insertions(+) create mode 100644 src/main/java/com/github/codestorm/brick/Brick.java create mode 100644 src/main/java/com/github/codestorm/brick/ExoplodeBrick.java create mode 100644 src/main/java/com/github/codestorm/brick/NormalBrick.java create mode 100644 src/main/java/com/github/codestorm/brick/ProtectedBrick.java create mode 100644 src/main/java/com/github/codestorm/brick/StrongBrick.java create mode 100644 src/main/java/com/github/codestorm/gameManager/GameManager.java create mode 100644 src/main/java/com/github/codestorm/paddle/Paddle.java diff --git a/src/main/java/com/github/codestorm/brick/Brick.java b/src/main/java/com/github/codestorm/brick/Brick.java new file mode 100644 index 0000000..63f663e --- /dev/null +++ b/src/main/java/com/github/codestorm/brick/Brick.java @@ -0,0 +1,65 @@ +package com.github.codestorm.brick; + +public abstract class Brick { + protected int x, y, width, height; + protected boolean destroyed; + + public Brick() {} + + /** + * constructor + */ + public Brick(int x, int y, int width, int height){ + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.destroyed = false; + } + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public boolean isDestroyed() { + return destroyed; + } + + public void setDestroyed(boolean destroyed) { + this.destroyed = destroyed; + } + + public void hit() {} + + public int getScore() { + return 0; + } +} \ No newline at end of file diff --git a/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java b/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java new file mode 100644 index 0000000..b9a07e5 --- /dev/null +++ b/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java @@ -0,0 +1,18 @@ +package com.github.codestorm.brick; + +public class ExoplodeBrick extends Brick { + private int radius = 1; + + public ExoplodeBrick(int x, int y, int width, int height, int radius){ + super(x, y, width, height); + this.radius = radius; + } + + @Override + public void hit(){ + this.destroyed = true; + explode(); + } + + private void explode{}; +} diff --git a/src/main/java/com/github/codestorm/brick/NormalBrick.java b/src/main/java/com/github/codestorm/brick/NormalBrick.java new file mode 100644 index 0000000..7e95763 --- /dev/null +++ b/src/main/java/com/github/codestorm/brick/NormalBrick.java @@ -0,0 +1,20 @@ +package com.github.codestorm.brick; + +public class NormalBrick extends Brick { + + public NormalBrick(int x, int y, int width, int height){ + super(x, y, width, height); + } + + @Override + public void hit(){ + this.destroyed = true; + } + + @Override + public int getScore(){ + return 10; + } + + +} diff --git a/src/main/java/com/github/codestorm/brick/ProtectedBrick.java b/src/main/java/com/github/codestorm/brick/ProtectedBrick.java new file mode 100644 index 0000000..6a4c0a7 --- /dev/null +++ b/src/main/java/com/github/codestorm/brick/ProtectedBrick.java @@ -0,0 +1,5 @@ +package com.github.codestorm.brick; + +public class ProtectedBrick extends Brick{ + +} diff --git a/src/main/java/com/github/codestorm/brick/StrongBrick.java b/src/main/java/com/github/codestorm/brick/StrongBrick.java new file mode 100644 index 0000000..008ed8f --- /dev/null +++ b/src/main/java/com/github/codestorm/brick/StrongBrick.java @@ -0,0 +1,28 @@ +package com.github.codestorm.brick; + +public class StrongBrick extends Brick { + private int hp; + private final int initialHp; + + public StrongBrick(int x, int y, int width, int height, int hp){ + super(x, y, width, height); + this.hp = hp; + this.initialHp = hp; + } + + @Override + public void hit(){ + if(!destroyed && hp >0){ + hp--; + if(hp == 0){ + destroyed = true; + } + + } + } + + @Override + public int getScore(){ + return initialHp*10; + } +} diff --git a/src/main/java/com/github/codestorm/gameManager/GameManager.java b/src/main/java/com/github/codestorm/gameManager/GameManager.java new file mode 100644 index 0000000..12d8d40 --- /dev/null +++ b/src/main/java/com/github/codestorm/gameManager/GameManager.java @@ -0,0 +1,24 @@ +package com.github.codestorm.gameManager; + +import java.util.List; + +import com.github.codestorm.brick.Brick; +import com.github.codestorm.paddle.Paddle; + +public class GameManager { + private Paddle paddle; + private Ball ball; + private List bricks; + private List powerups; + private int score; + private int lives; + private int level; + + public void updateScore() { + for (Brick x : bricks) { + if (x.isDestroyed()) { + score += x.getScore(); + } + } + } +} diff --git a/src/main/java/com/github/codestorm/paddle/Paddle.java b/src/main/java/com/github/codestorm/paddle/Paddle.java new file mode 100644 index 0000000..1dae678 --- /dev/null +++ b/src/main/java/com/github/codestorm/paddle/Paddle.java @@ -0,0 +1,5 @@ +package com.github.codestorm.paddle; + +public class Paddle { + +} From 9dc0071e5d049c20d23bf23146a7622d2e830ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Mon, 29 Sep 2025 17:58:14 +0700 Subject: [PATCH 02/53] ci: remove ratchetFrom configuration in spotless (#2) - Deleted the 'ratchetFrom' line from the spotless configuration (to simplify the build.gradle file). --- build.gradle | 2 -- settings.gradle | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index daafa3e..09d51af 100644 --- a/build.gradle +++ b/build.gradle @@ -25,8 +25,6 @@ test { } spotless { - ratchetFrom 'origin/main' - format 'misc', { target '*.gradle', '.gitattributes', '.gitignore' diff --git a/settings.gradle b/settings.gradle index 874f5c6..7508ff0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -rootProject.name = 'bounceverse' \ No newline at end of file +rootProject.name = 'bounceverse' From 7418ab18472511659043702d7e9f49b864219776 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 30 Sep 2025 08:15:19 +0700 Subject: [PATCH 03/53] feat(brick): add PowerBrick and update Brick, ExoplodeBrick, ProtectedBrick --- .../com/github/codestorm/brick/Brick.java | 42 ++++++++++++------- .../github/codestorm/brick/ExoplodeBrick.java | 21 ++++++---- .../github/codestorm/brick/PowerBrick.java | 17 ++++++++ .../codestorm/brick/ProtectedBrick.java | 26 +++++++++++- 4 files changed, 82 insertions(+), 24 deletions(-) create mode 100644 src/main/java/com/github/codestorm/brick/PowerBrick.java diff --git a/src/main/java/com/github/codestorm/brick/Brick.java b/src/main/java/com/github/codestorm/brick/Brick.java index 63f663e..dffbff8 100644 --- a/src/main/java/com/github/codestorm/brick/Brick.java +++ b/src/main/java/com/github/codestorm/brick/Brick.java @@ -1,19 +1,18 @@ package com.github.codestorm.brick; -public abstract class Brick { - protected int x, y, width, height; - protected boolean destroyed; - - public Brick() {} - - /** - * constructor - */ - public Brick(int x, int y, int width, int height){ +public class Brick { + private int x, y, width, height; + private int hp; + private final int initialHp; + private boolean destroyed; + + public Brick(int x, int y, int width, int height, int hp) { this.x = x; this.y = y; this.width = width; this.height = height; + this.hp = hp; + this.initialHp = hp; this.destroyed = false; } @@ -49,17 +48,32 @@ public void setHeight(int height) { this.height = height; } + public int getHp(){ + return hp; + } + + public void setHp(int hp){ + this.hp = hp; + } + public boolean isDestroyed() { - return destroyed; + return hp <= 0; } public void setDestroyed(boolean destroyed) { this.destroyed = destroyed; } - public void hit() {} + public void hit() { + if(!destroyed && hp >0){ + hp--; + if(hp == 0){ + this.destroyed = true; + } + } + } public int getScore() { - return 0; + return initialHp*10; } -} \ No newline at end of file +} diff --git a/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java b/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java index b9a07e5..c6d0ac8 100644 --- a/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java +++ b/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java @@ -1,18 +1,23 @@ package com.github.codestorm.brick; public class ExoplodeBrick extends Brick { - private int radius = 1; + private static final int radius = 1; - public ExoplodeBrick(int x, int y, int width, int height, int radius){ - super(x, y, width, height); - this.radius = radius; + public ExoplodeBrick(int x, int y, int width, int height, int hp, int radius) { + super(x, y, width, height, hp); + } + + public int getRadius(){ + return radius; } @Override - public void hit(){ - this.destroyed = true; - explode(); + public void hit() { + super.hit(); + if(isDestroyed()){ + explode(); + } } - private void explode{}; + private void explode() {} } diff --git a/src/main/java/com/github/codestorm/brick/PowerBrick.java b/src/main/java/com/github/codestorm/brick/PowerBrick.java new file mode 100644 index 0000000..85ee6ce --- /dev/null +++ b/src/main/java/com/github/codestorm/brick/PowerBrick.java @@ -0,0 +1,17 @@ +package com.github.codestorm.brick; + +public class PowerBrick extends Brick { + public PowerBrick (int x, int y, int width, int height, int hp){ + super(x, y, width, height, hp); + } + + @Override + public void hit(){ + super.hit(); + if(isDestroyed()){ + activePower(); + } + } + + public void activePower() {}; +} diff --git a/src/main/java/com/github/codestorm/brick/ProtectedBrick.java b/src/main/java/com/github/codestorm/brick/ProtectedBrick.java index 6a4c0a7..cd86864 100644 --- a/src/main/java/com/github/codestorm/brick/ProtectedBrick.java +++ b/src/main/java/com/github/codestorm/brick/ProtectedBrick.java @@ -1,5 +1,27 @@ package com.github.codestorm.brick; -public class ProtectedBrick extends Brick{ - +public class ProtectedBrick extends Brick { + private String shieldSide; + + public ProtectedBrick(int x, int y, int width, int height, int hp, String shieldSide) { + super(x, y, width, height, hp); + this.shieldSide = shieldSide; + } + + public String getShieldSide(){ + return shieldSide; + } + + public void setShieldSide(String shieldSide){ + this.shieldSide = shieldSide; + } + + public void hit(String direction) { + if (!isDestroyed()) { + if (!direction.equalsIgnoreCase(shieldSide)) { + super.hit(); + } + } + } + } From b4f06227f6472b4d7fb0ffc466b870d89a21fa70 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 30 Sep 2025 09:16:27 +0700 Subject: [PATCH 04/53] docs(brick): add Javadoc for Brick, ExoplodeBrick, PowerBrick, ProtectedBrick --- .../com/github/codestorm/brick/Brick.java | 16 +++++++++++----- .../github/codestorm/brick/ExoplodeBrick.java | 15 +++++++++++++-- .../github/codestorm/brick/PowerBrick.java | 19 +++++++++++++++---- .../codestorm/brick/ProtectedBrick.java | 9 +++++++-- 4 files changed, 46 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/github/codestorm/brick/Brick.java b/src/main/java/com/github/codestorm/brick/Brick.java index dffbff8..99ddacd 100644 --- a/src/main/java/com/github/codestorm/brick/Brick.java +++ b/src/main/java/com/github/codestorm/brick/Brick.java @@ -48,11 +48,11 @@ public void setHeight(int height) { this.height = height; } - public int getHp(){ + public int getHp() { return hp; } - public void setHp(int hp){ + public void setHp(int hp) { this.hp = hp; } @@ -64,16 +64,22 @@ public void setDestroyed(boolean destroyed) { this.destroyed = destroyed; } + /** + * Reduces the brick's hit points by one when hit. + * + *

If hit points reach zero, the brick is marked as destroyed. + */ public void hit() { - if(!destroyed && hp >0){ + if (!destroyed && hp > 0) { hp--; - if(hp == 0){ + if (hp == 0) { this.destroyed = true; } } } + // Calculates the score awarded for destroying this brick. public int getScore() { - return initialHp*10; + return initialHp * 10; } } diff --git a/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java b/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java index c6d0ac8..6c0134d 100644 --- a/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java +++ b/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java @@ -7,17 +7,28 @@ public ExoplodeBrick(int x, int y, int width, int height, int hp, int radius) { super(x, y, width, height, hp); } - public int getRadius(){ + public int getRadius() { return radius; } + /** + * Handles a hit on this brick. + * + *

Decreases hit points using the parent logic. If the brick is destroyed after the hit, it + * triggers an explosion. + */ @Override public void hit() { super.hit(); - if(isDestroyed()){ + if (isDestroyed()) { explode(); } } + /** + * Triggers the explosion effect of this brick. + * + *

This method can be extended to apply damage to surrounding bricks + */ private void explode() {} } diff --git a/src/main/java/com/github/codestorm/brick/PowerBrick.java b/src/main/java/com/github/codestorm/brick/PowerBrick.java index 85ee6ce..46b0b20 100644 --- a/src/main/java/com/github/codestorm/brick/PowerBrick.java +++ b/src/main/java/com/github/codestorm/brick/PowerBrick.java @@ -1,17 +1,28 @@ package com.github.codestorm.brick; public class PowerBrick extends Brick { - public PowerBrick (int x, int y, int width, int height, int hp){ + public PowerBrick(int x, int y, int width, int height, int hp) { super(x, y, width, height, hp); } + /** + * Handles a hit on this power brick. + * + *

Executes the normal hit logic from the parent class. If the brick is destroyed after the + * hit, it will randomly spawn its power-up. + */ @Override - public void hit(){ + public void hit() { super.hit(); - if(isDestroyed()){ + if (isDestroyed()) { activePower(); } } - public void activePower() {}; + /** + * Spawns the power-up associated with this brick. + * + *

Subclasses should override this method to define the specific power-up effect. + */ + public void activePower() {} } diff --git a/src/main/java/com/github/codestorm/brick/ProtectedBrick.java b/src/main/java/com/github/codestorm/brick/ProtectedBrick.java index cd86864..4018d64 100644 --- a/src/main/java/com/github/codestorm/brick/ProtectedBrick.java +++ b/src/main/java/com/github/codestorm/brick/ProtectedBrick.java @@ -8,14 +8,15 @@ public ProtectedBrick(int x, int y, int width, int height, int hp, String shield this.shieldSide = shieldSide; } - public String getShieldSide(){ + public String getShieldSide() { return shieldSide; } - public void setShieldSide(String shieldSide){ + public void setShieldSide(String shieldSide) { this.shieldSide = shieldSide; } + /** Handles a hit on this protected brick from a given direction. */ public void hit(String direction) { if (!isDestroyed()) { if (!direction.equalsIgnoreCase(shieldSide)) { @@ -24,4 +25,8 @@ public void hit(String direction) { } } + // Score from protected brick have more than 20 points. + public int getScore() { + return super.getScore() + 20; + } } From 89c507ad5f2a493f942cf6b167195a98654be3ff Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 30 Sep 2025 09:22:30 +0700 Subject: [PATCH 05/53] refactor(brick): remove NormalBrick and StrongBrick --- .../github/codestorm/brick/NormalBrick.java | 20 ------------- .../github/codestorm/brick/StrongBrick.java | 28 ------------------- 2 files changed, 48 deletions(-) delete mode 100644 src/main/java/com/github/codestorm/brick/NormalBrick.java delete mode 100644 src/main/java/com/github/codestorm/brick/StrongBrick.java diff --git a/src/main/java/com/github/codestorm/brick/NormalBrick.java b/src/main/java/com/github/codestorm/brick/NormalBrick.java deleted file mode 100644 index 7e95763..0000000 --- a/src/main/java/com/github/codestorm/brick/NormalBrick.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.github.codestorm.brick; - -public class NormalBrick extends Brick { - - public NormalBrick(int x, int y, int width, int height){ - super(x, y, width, height); - } - - @Override - public void hit(){ - this.destroyed = true; - } - - @Override - public int getScore(){ - return 10; - } - - -} diff --git a/src/main/java/com/github/codestorm/brick/StrongBrick.java b/src/main/java/com/github/codestorm/brick/StrongBrick.java deleted file mode 100644 index 008ed8f..0000000 --- a/src/main/java/com/github/codestorm/brick/StrongBrick.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.github.codestorm.brick; - -public class StrongBrick extends Brick { - private int hp; - private final int initialHp; - - public StrongBrick(int x, int y, int width, int height, int hp){ - super(x, y, width, height); - this.hp = hp; - this.initialHp = hp; - } - - @Override - public void hit(){ - if(!destroyed && hp >0){ - hp--; - if(hp == 0){ - destroyed = true; - } - - } - } - - @Override - public int getScore(){ - return initialHp*10; - } -} From 24534174b4e0623eef2fd34092a9d361101c812e Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 30 Sep 2025 15:35:24 +0700 Subject: [PATCH 06/53] feat(paddle): add ExpendPaddle, LaserPaddle, ShrinkPaddle and update Paddle --- .../github/codestorm/paddle/ExpendPaddle.java | 12 +++ .../github/codestorm/paddle/LaserPaddle.java | 29 ++++++++ .../com/github/codestorm/paddle/Paddle.java | 73 ++++++++++++++++++- .../github/codestorm/paddle/ShrinkPaddle.java | 12 +++ 4 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/github/codestorm/paddle/ExpendPaddle.java create mode 100644 src/main/java/com/github/codestorm/paddle/LaserPaddle.java create mode 100644 src/main/java/com/github/codestorm/paddle/ShrinkPaddle.java diff --git a/src/main/java/com/github/codestorm/paddle/ExpendPaddle.java b/src/main/java/com/github/codestorm/paddle/ExpendPaddle.java new file mode 100644 index 0000000..ab67d66 --- /dev/null +++ b/src/main/java/com/github/codestorm/paddle/ExpendPaddle.java @@ -0,0 +1,12 @@ +package com.github.codestorm.paddle; + +/** A special type of {@link Paddle} that is wider than the normal paddle. */ +public class ExpendPaddle extends Paddle { + // The scale factor applied to the paddle's width. + private static final double SCALE = 1.5; + + // Create a new expended paddle. + public ExpendPaddle(int x, int y, int width, int height, double speed) { + super(x, y, (int) (width * SCALE), height, speed); + } +} diff --git a/src/main/java/com/github/codestorm/paddle/LaserPaddle.java b/src/main/java/com/github/codestorm/paddle/LaserPaddle.java new file mode 100644 index 0000000..9f4ff9f --- /dev/null +++ b/src/main/java/com/github/codestorm/paddle/LaserPaddle.java @@ -0,0 +1,29 @@ +package com.github.codestorm.paddle; + +import java.util.ArrayList; +import java.util.List; + +/** + * A special type of {@link Paddle} that can shoot bullets upward to destroy bricks. This is usually + * activated by a power-up. + */ +public class LaserPaddle extends Paddle { + /** List of bullets currently fired by the paddle. */ + private List bullets; + + // Create a new LaserPaddle instance + public LaserPaddle(int x, int y, int width, int height, double speed) { + super(x, y, width, height, speed); + this.bullets = new ArrayList<>(); + } + + // Shoots bullet from paddle. + public void shoot() {} + + /** Updates all bullets when them get off-screen or hit the brick. */ + public void updateBullets() {} + + public List getBullets() { + return bullets; + } +} diff --git a/src/main/java/com/github/codestorm/paddle/Paddle.java b/src/main/java/com/github/codestorm/paddle/Paddle.java index 1dae678..ff91be9 100644 --- a/src/main/java/com/github/codestorm/paddle/Paddle.java +++ b/src/main/java/com/github/codestorm/paddle/Paddle.java @@ -1,5 +1,76 @@ package com.github.codestorm.paddle; +/** + * Represents the paddle controlled by the player in the game. + * + *

The paddle can move horizontally, reset its position, and is the base class for other paddle + * variants (expand, shrink, laser, etc.). + */ public class Paddle { - + private int x; + private int y; + private int width; + private int height; + private double speed; + + public Paddle(int x, int y, int width, int height, double speed) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.speed = speed; + } + + // getter & setter. + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + // Move the paddle left. + public void moveLeft() {} + + // Move the paddle right. + public void moveRight() {} + + // Reset the paddle to a specific position. + public void resetPosition(int startX, int startY) { + this.x = startX; + this.y = startY; + } } diff --git a/src/main/java/com/github/codestorm/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/paddle/ShrinkPaddle.java new file mode 100644 index 0000000..6bc8c62 --- /dev/null +++ b/src/main/java/com/github/codestorm/paddle/ShrinkPaddle.java @@ -0,0 +1,12 @@ +package com.github.codestorm.paddle; + +/** A special type of {@link Paddle} that is narrower than the normal paddle. */ +public class ShrinkPaddle extends Paddle { + // The scale factor applied to the paddle's width. + private static final double SCALE = 0.7; + + // Create a new shrunk paddle. + public ShrinkPaddle(int x, int y, int width, int height, double speed) { + super(x, y, (int) (width * SCALE), height, speed); + } +} From 90d06b7e08be1ab88afc401b73b581857a0e3cf4 Mon Sep 17 00:00:00 2001 From: minngoc1213 <156768586+minngoc1213@users.noreply.github.com> Date: Wed, 1 Oct 2025 00:19:44 +0700 Subject: [PATCH 07/53] Implement abstract class Ball (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: implement abstract class Ball * refactor: update Ball class package and documentation - Renamed package from `com.github.codestorm.ball` to `com.github.codestorm.bounceverse.ball` (to reflect project structure) - Enhanced class documentation to clarify the purpose and functionality of the Ball class --------- Co-authored-by: Mai Thành <62001770+thnhmai06@users.noreply.github.com> --- .idea/google-java-format.xml | 1 + src/main/java/com/github/codestorm/.gitkeep | 0 .../codestorm/bounceverse/ball/Ball.java | 103 ++++++++++++++++++ 3 files changed, 104 insertions(+) delete mode 100644 src/main/java/com/github/codestorm/.gitkeep create mode 100644 src/main/java/com/github/codestorm/bounceverse/ball/Ball.java diff --git a/.idea/google-java-format.xml b/.idea/google-java-format.xml index 8b57f45..05946a8 100644 --- a/.idea/google-java-format.xml +++ b/.idea/google-java-format.xml @@ -2,5 +2,6 @@ \ No newline at end of file diff --git a/src/main/java/com/github/codestorm/.gitkeep b/src/main/java/com/github/codestorm/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/java/com/github/codestorm/bounceverse/ball/Ball.java b/src/main/java/com/github/codestorm/bounceverse/ball/Ball.java new file mode 100644 index 0000000..9995f70 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/ball/Ball.java @@ -0,0 +1,103 @@ +package com.github.codestorm.bounceverse.ball; + +/** + * + * + *

Ball

+ * + * Ball is a player-controlled object used to hit other objects via the Paddle. A ball has position + * (x, y), velocity (vx, vy), and a radius. + * + *

This class provides utility methods for resetting position, setting velocity, checking bounds, + * and accessing attributes. Subclasses must implement movement and bounce behaviors. + */ +public abstract class Ball { + private double x; + private double y; + private double vx; + private double vy; + private double radius; + + /** Default constructor. */ + public Ball() {} + + /** Constructor with full parameters. */ + public Ball(double x, double y, double vx, double vy, double radius) { + this.x = x; + this.y = y; + this.vx = vx; + this.vy = vy; + this.radius = radius; + } + + /** Draws the ball on the screen. */ + public void draw() {} + + /** + * Resets the ball to a new position and velocity. + * + * @param startX new X coordinate + * @param startY new Y coordinate + * @param startVx new horizontal velocity + * @param startVy new vertical velocity + */ + public void reset(double startX, double startY, double startVx, double startVy) { + this.x = startX; + this.y = startY; + this.vx = startVx; + this.vy = startVy; + } + + /** Updates the position of the ball according to its velocity. */ + public abstract void move(); + + /** Handles behavior when the ball bounces against a horizontal wall. */ + public abstract void bounceHorizontal(); + + /** Handles behavior when the ball bounces against a vertical wall. */ + public abstract void bounceVertical(); + + /** + * Sets the velocity of the ball. + * + * @param vx horizontal velocity + * @param vy vertical velocity + */ + public void setVelocity(double vx, double vy) { + this.vx = vx; + this.vy = vy; + } + + /** + * Checks whether the ball is out of bounds. + * + * @return {@code true} if the ball is outside the allowed boundary, {@code false} otherwise + */ + public boolean isOutOfBounds() { + return true; + } + + public double getX() { + return x; + } + + public double getY() { + return y; + } + + public double getVx() { + return vx; + } + + public double getVy() { + return vy; + } + + public double getRadius() { + return radius; + } + + public void setRadius(double radius) { + this.radius = radius; + } +} From b0844dff1e76ef1f36f64334b1ac15b509909b48 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Wed, 1 Oct 2025 00:42:38 +0700 Subject: [PATCH 08/53] feat: Brick (#1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * refactor(brick): rename packages and update formatting settings - Renamed package from `com.github.codestorm.brick` to `com.github.codestorm.bounceverse.brick` for consistency. - Updated Google Java Format settings to use AOSP style. --------- Co-authored-by: Mai Thành <62001770+thnhmai06@users.noreply.github.com> --- .../codestorm/bounceverse/brick/Brick.java | 85 +++++++++++++++++++ .../bounceverse/brick/ExoplodeBrick.java | 34 ++++++++ .../bounceverse/brick/PowerBrick.java | 28 ++++++ .../bounceverse/brick/ProtectedBrick.java | 32 +++++++ 4 files changed, 179 insertions(+) create mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/Brick.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/ExoplodeBrick.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/Brick.java b/src/main/java/com/github/codestorm/bounceverse/brick/Brick.java new file mode 100644 index 0000000..9b80e18 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/brick/Brick.java @@ -0,0 +1,85 @@ +package com.github.codestorm.bounceverse.brick; + +public class Brick { + private int x, y, width, height; + private int hp; + private final int initialHp; + private boolean destroyed; + + public Brick(int x, int y, int width, int height, int hp) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.hp = hp; + this.initialHp = hp; + this.destroyed = false; + } + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public int getHp() { + return hp; + } + + public void setHp(int hp) { + this.hp = hp; + } + + public boolean isDestroyed() { + return hp <= 0; + } + + public void setDestroyed(boolean destroyed) { + this.destroyed = destroyed; + } + + /** + * Reduces the brick's hit points by one when hit. + * + *

If hit points reach zero, the brick is marked as destroyed. + */ + public void hit() { + if (!destroyed && hp > 0) { + hp--; + if (hp == 0) { + this.destroyed = true; + } + } + } + + // Calculates the score awarded for destroying this brick. + public int getScore() { + return initialHp * 10; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/ExoplodeBrick.java b/src/main/java/com/github/codestorm/bounceverse/brick/ExoplodeBrick.java new file mode 100644 index 0000000..c215265 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/brick/ExoplodeBrick.java @@ -0,0 +1,34 @@ +package com.github.codestorm.bounceverse.brick; + +public class ExoplodeBrick extends Brick { + private static final int explodeRadius = 1; + + public ExoplodeBrick(int x, int y, int width, int height, int hp) { + super(x, y, width, height, hp); + } + + public int getRadius() { + return explodeRadius; + } + + /** + * Handles a hit on this brick. + * + *

Decreases hit points using the parent logic. If the brick is destroyed after the hit, it + * triggers an explosion. + */ + @Override + public void hit() { + super.hit(); + if (isDestroyed()) { + explode(); + } + } + + /** + * Triggers the explosion effect of this brick. + * + *

This method can be extended to apply damage to surrounding bricks + */ + private void explode() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java b/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java new file mode 100644 index 0000000..42afcea --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java @@ -0,0 +1,28 @@ +package com.github.codestorm.bounceverse.brick; + +public class PowerBrick extends Brick { + public PowerBrick(int x, int y, int width, int height, int hp) { + super(x, y, width, height, hp); + } + + /** + * Handles a hit on this power brick. + * + *

Executes the normal hit logic from the parent class. If the brick is destroyed after the + * hit, it will randomly spawn its power-up. + */ + @Override + public void hit() { + super.hit(); + if (isDestroyed()) { + activePower(); + } + } + + /** + * Spawns the power-up associated with this brick. + * + *

Subclasses should override this method to define the specific power-up effect. + */ + public void activePower() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java b/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java new file mode 100644 index 0000000..3e67912 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java @@ -0,0 +1,32 @@ +package com.github.codestorm.bounceverse.brick; + +public class ProtectedBrick extends Brick { + private String shieldSide; + + public ProtectedBrick(int x, int y, int width, int height, int hp, String shieldSide) { + super(x, y, width, height, hp); + this.shieldSide = shieldSide; + } + + public String getShieldSide() { + return shieldSide; + } + + public void setShieldSide(String shieldSide) { + this.shieldSide = shieldSide; + } + + /** Handles a hit on this protected brick from a given direction. */ + public void hit(String direction) { + if (!isDestroyed()) { + if (!direction.equalsIgnoreCase(shieldSide)) { + super.hit(); + } + } + } + + // Score from protected brick have more than 20 points. + public int getScore() { + return super.getScore() + 20; + } +} From bfd553456ba4f6c8a1a4735bce36bd5e5319eb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 1 Oct 2025 01:31:06 +0700 Subject: [PATCH 09/53] feat: Add PowerUp class (#5) * feat: add PowerUp class - Introduced PowerUp class to manage special effects and abilities for game objects (provides lazy-update functionality). - Updated build.gradle to include JavaFX plugin and specified version. - Modified project configuration files for compatibility with new features. * docs: update PowerUp class documentation - Corrected the description of PowerUps to use plural form for consistency. - Improved clarity in the apply and unapply method descriptions (automatically used when power up becomes active/ends). --- .idea/misc.xml | 2 +- build.gradle | 6 + .../bounceverse/powerup/PowerUp.java | 125 ++++++++++++++++++ 3 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java diff --git a/.idea/misc.xml b/.idea/misc.xml index b861657..3b7dc99 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 09d51af..b7b5d40 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ plugins { id 'java' + id 'org.openjfx.javafxplugin' version '0.1.0' id 'com.diffplug.spotless' version "8.0.0" } @@ -24,6 +25,11 @@ test { useJUnitPlatform() } +javafx { + version = "25" + modules = [ 'javafx.base' ] +} + spotless { format 'misc', { target '*.gradle', '.gitattributes', '.gitignore' diff --git a/src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java b/src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java new file mode 100644 index 0000000..27ad5e7 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java @@ -0,0 +1,125 @@ +package com.github.codestorm.bounceverse.powerup; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.time.TimerAction; +import javafx.util.Duration; +import org.jetbrains.annotations.NotNull; + +/** + * + * + *

PowerUp

+ * + * PowerUps provide special effects and abilities to playable objects. They are designed to + * update based on events (lazy-update). + * + *

You need to extend this class to create another class that can provide effects though + * {@code apply()} and {@code doApply()} method. + */ +public abstract class PowerUp { + private TimerAction waitAction; + private TimerAction activeAction; + private double startAt; + private double endAt; + + /** Update {@code waitAction} when {@code startAt} is changed. */ + private void updateWaitAction() { + final var gameTimer = FXGL.getGameTimer(); + final var currentTime = gameTimer.getNow(); + // when not executed + if (currentTime < startAt) { + if (waitAction != null) { + waitAction.expire(); + } + final var timeLeft = Duration.millis(startAt - currentTime); + waitAction = gameTimer.runOnceAfter(this::doApply, timeLeft); + } + } + + /** Update {@code activeAction} when {@code endAt} is changed. */ + private void updateActiveAction() { + final var gameTimer = FXGL.getGameTimer(); + final var currentTime = gameTimer.getNow(); + // when not executed + if (currentTime < endAt) { + if (activeAction != null) { + activeAction.expire(); + } + final var timeLeft = Duration.millis(endAt - currentTime); + activeAction = gameTimer.runOnceAfter(this::doUnapply, timeLeft); + } + } + + /** Wrapper for {@code apply()} method. */ + protected void doApply() { + apply(); + } + + /** Wrapper for {@code unapply()} method. */ + protected void doUnapply() { + unapply(); + } + + /** + * Apply PowerUp effects. + * + *

Automatically used when power up becomes active. + */ + protected abstract void apply(); + + /** + * Unapply PowerUp effects. + * + *

Automatically used when power up ends. + */ + protected abstract void unapply(); + + public double getStartAt() { + return startAt; + } + + public double getEndAt() { + return endAt; + } + + public void setStartAt(double startAt) { + this.startAt = startAt; + updateWaitAction(); + } + + public void setEndAt(double endAt) { + this.endAt = endAt; + updateActiveAction(); + } + + /** + * Create PowerUp object. + * + * @param startAt Time that PowerUp start + * @param endAt Time that PowerUp end + */ + public PowerUp(double startAt, double endAt) { + setStartAt(startAt); + setEndAt(endAt); + } + + /** + * Create PowerUp object. + * + * @param duration Duration + * @param after Duration to wait before active + */ + public PowerUp(@NotNull Duration duration, @NotNull Duration after) { + final var currentTime = FXGL.getGameTimer().getNow(); + this(currentTime + after.toMillis(), currentTime + after.toMillis() + duration.toMillis()); + } + + /** + * Create PowerUp object and active. + * + * @param duration Duration + */ + public PowerUp(@NotNull Duration duration) { + this(duration, Duration.ZERO); + } +} From bac5f52c4ad53a0eaf358899934005d39caa32bf Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Wed, 1 Oct 2025 08:05:17 +0700 Subject: [PATCH 10/53] feat(paddle): add ExpendPaddle, LaserPaddle, ShrinkPaddle and update Paddle --- .../bounceverse/paddle/ExpendPaddle.java | 12 +++ .../bounceverse/paddle/LaserPaddle.java | 29 +++++++ .../codestorm/bounceverse/paddle/Paddle.java | 76 +++++++++++++++++++ .../bounceverse/paddle/ShrinkPaddle.java | 12 +++ 4 files changed, 129 insertions(+) create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java new file mode 100644 index 0000000..635e78f --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java @@ -0,0 +1,12 @@ +package com.github.codestorm.bounceverse.paddle; + +/** A special type of {@link Paddle} that is wider than the normal paddle. */ +public class ExpendPaddle extends Paddle { + // The scale factor applied to the paddle's width. + private static final double SCALE = 1.5; + + // Create a new expended paddle. + public ExpendPaddle(int x, int y, int width, int height, double speed) { + super(x, y, (int) (width * SCALE), height, speed); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java new file mode 100644 index 0000000..762ff61 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java @@ -0,0 +1,29 @@ +package com.github.codestorm.bounceverse.paddle; + +import java.util.ArrayList; +import java.util.List; + +/** + * A special type of {@link Paddle} that can shoot bullets upward to destroy bricks. This is usually + * activated by a power-up. + */ +public class LaserPaddle extends Paddle { + /** List of bullets currently fired by the paddle. */ + private List bullets; + + // Create a new LaserPaddle instance + public LaserPaddle(int x, int y, int width, int height, double speed) { + super(x, y, width, height, speed); + this.bullets = new ArrayList<>(); + } + + // Shoots bullet from paddle. + public void shoot() {} + + /** Updates all bullets when them get off-screen or hit the brick. */ + public void updateBullets() {} + + public List getBullets() { + return bullets; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java new file mode 100644 index 0000000..f13ea11 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java @@ -0,0 +1,76 @@ +package com.github.codestorm.bounceverse.paddle; + +/** + * Represents the paddle controlled by the player in the game. + * + *

The paddle can move horizontally, reset its position, and is the base class for other paddle + * variants (expand, shrink, laser, etc.). + */ +public class Paddle { + private int x; + private int y; + private int width; + private int height; + private double speed; + + public Paddle(int x, int y, int width, int height, double speed) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.speed = speed; + } + + // getter & setter. + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + // Move the paddle left. + public void moveLeft() {} + + // Move the paddle right. + public void moveRight() {} + + // Reset the paddle to a specific position. + public void resetPosition(int startX, int startY) { + this.x = startX; + this.y = startY; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java new file mode 100644 index 0000000..42ac850 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java @@ -0,0 +1,12 @@ +package com.github.codestorm.bounceverse.paddle; + +/** A special type of {@link Paddle} that is narrower than the normal paddle. */ +public class ShrinkPaddle extends Paddle { + // The scale factor applied to the paddle's width. + private static final double SCALE = 0.7; + + // Create a new shrunk paddle. + public ShrinkPaddle(int x, int y, int width, int height, double speed) { + super(x, y, (int) (width * SCALE), height, speed); + } +} From 30010132220a31c6d7eafc81f29f099ae6c81e45 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Wed, 1 Oct 2025 08:08:21 +0700 Subject: [PATCH 11/53] refactor: remove brick and gameManager packages --- .../com/github/codestorm/brick/Brick.java | 85 ------------------- .../github/codestorm/brick/ExoplodeBrick.java | 34 -------- .../github/codestorm/brick/PowerBrick.java | 28 ------ .../codestorm/brick/ProtectedBrick.java | 32 ------- .../codestorm/gameManager/GameManager.java | 24 ------ 5 files changed, 203 deletions(-) delete mode 100644 src/main/java/com/github/codestorm/brick/Brick.java delete mode 100644 src/main/java/com/github/codestorm/brick/ExoplodeBrick.java delete mode 100644 src/main/java/com/github/codestorm/brick/PowerBrick.java delete mode 100644 src/main/java/com/github/codestorm/brick/ProtectedBrick.java delete mode 100644 src/main/java/com/github/codestorm/gameManager/GameManager.java diff --git a/src/main/java/com/github/codestorm/brick/Brick.java b/src/main/java/com/github/codestorm/brick/Brick.java deleted file mode 100644 index 99ddacd..0000000 --- a/src/main/java/com/github/codestorm/brick/Brick.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.github.codestorm.brick; - -public class Brick { - private int x, y, width, height; - private int hp; - private final int initialHp; - private boolean destroyed; - - public Brick(int x, int y, int width, int height, int hp) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.hp = hp; - this.initialHp = hp; - this.destroyed = false; - } - - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getHp() { - return hp; - } - - public void setHp(int hp) { - this.hp = hp; - } - - public boolean isDestroyed() { - return hp <= 0; - } - - public void setDestroyed(boolean destroyed) { - this.destroyed = destroyed; - } - - /** - * Reduces the brick's hit points by one when hit. - * - *

If hit points reach zero, the brick is marked as destroyed. - */ - public void hit() { - if (!destroyed && hp > 0) { - hp--; - if (hp == 0) { - this.destroyed = true; - } - } - } - - // Calculates the score awarded for destroying this brick. - public int getScore() { - return initialHp * 10; - } -} diff --git a/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java b/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java deleted file mode 100644 index 6c0134d..0000000 --- a/src/main/java/com/github/codestorm/brick/ExoplodeBrick.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.github.codestorm.brick; - -public class ExoplodeBrick extends Brick { - private static final int radius = 1; - - public ExoplodeBrick(int x, int y, int width, int height, int hp, int radius) { - super(x, y, width, height, hp); - } - - public int getRadius() { - return radius; - } - - /** - * Handles a hit on this brick. - * - *

Decreases hit points using the parent logic. If the brick is destroyed after the hit, it - * triggers an explosion. - */ - @Override - public void hit() { - super.hit(); - if (isDestroyed()) { - explode(); - } - } - - /** - * Triggers the explosion effect of this brick. - * - *

This method can be extended to apply damage to surrounding bricks - */ - private void explode() {} -} diff --git a/src/main/java/com/github/codestorm/brick/PowerBrick.java b/src/main/java/com/github/codestorm/brick/PowerBrick.java deleted file mode 100644 index 46b0b20..0000000 --- a/src/main/java/com/github/codestorm/brick/PowerBrick.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.github.codestorm.brick; - -public class PowerBrick extends Brick { - public PowerBrick(int x, int y, int width, int height, int hp) { - super(x, y, width, height, hp); - } - - /** - * Handles a hit on this power brick. - * - *

Executes the normal hit logic from the parent class. If the brick is destroyed after the - * hit, it will randomly spawn its power-up. - */ - @Override - public void hit() { - super.hit(); - if (isDestroyed()) { - activePower(); - } - } - - /** - * Spawns the power-up associated with this brick. - * - *

Subclasses should override this method to define the specific power-up effect. - */ - public void activePower() {} -} diff --git a/src/main/java/com/github/codestorm/brick/ProtectedBrick.java b/src/main/java/com/github/codestorm/brick/ProtectedBrick.java deleted file mode 100644 index 4018d64..0000000 --- a/src/main/java/com/github/codestorm/brick/ProtectedBrick.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.github.codestorm.brick; - -public class ProtectedBrick extends Brick { - private String shieldSide; - - public ProtectedBrick(int x, int y, int width, int height, int hp, String shieldSide) { - super(x, y, width, height, hp); - this.shieldSide = shieldSide; - } - - public String getShieldSide() { - return shieldSide; - } - - public void setShieldSide(String shieldSide) { - this.shieldSide = shieldSide; - } - - /** Handles a hit on this protected brick from a given direction. */ - public void hit(String direction) { - if (!isDestroyed()) { - if (!direction.equalsIgnoreCase(shieldSide)) { - super.hit(); - } - } - } - - // Score from protected brick have more than 20 points. - public int getScore() { - return super.getScore() + 20; - } -} diff --git a/src/main/java/com/github/codestorm/gameManager/GameManager.java b/src/main/java/com/github/codestorm/gameManager/GameManager.java deleted file mode 100644 index 12d8d40..0000000 --- a/src/main/java/com/github/codestorm/gameManager/GameManager.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.github.codestorm.gameManager; - -import java.util.List; - -import com.github.codestorm.brick.Brick; -import com.github.codestorm.paddle.Paddle; - -public class GameManager { - private Paddle paddle; - private Ball ball; - private List bricks; - private List powerups; - private int score; - private int lives; - private int level; - - public void updateScore() { - for (Brick x : bricks) { - if (x.isDestroyed()) { - score += x.getScore(); - } - } - } -} From 9ebb12d9a886fe01389fcc66ff65f87c60b7e1c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 1 Oct 2025 10:03:43 +0700 Subject: [PATCH 12/53] chore: Update .gitignore and add commit instructions - Added 'target/' to .gitignore to exclude build artifacts. - Updated .gitignore to simplify IntelliJ IDEA configuration exclusions. - Created git-commit-instructions.md for standardized commit message guidelines. --- .github/git-commit-instructions.md | 8 ++++++ .gitignore | 6 ++--- .idea/.gitignore | 8 ------ .idea/betterCommentsSettings.xml | 31 ---------------------- .idea/copilot.data.migration.agent.xml | 6 ----- .idea/copilot.data.migration.ask.xml | 6 ----- .idea/copilot.data.migration.ask2agent.xml | 6 ----- .idea/copilot.data.migration.edit.xml | 6 ----- .idea/dictionaries/project.xml | 7 ----- .idea/discord.xml | 7 ----- .idea/google-java-format.xml | 7 ----- .idea/gradle.xml | 17 ------------ .idea/material_theme_project_new.xml | 12 --------- .idea/misc.xml | 10 ------- .idea/vcs.xml | 6 ----- docs/dev/guide.md | 2 +- 16 files changed, 11 insertions(+), 134 deletions(-) create mode 100644 .github/git-commit-instructions.md delete mode 100644 .idea/.gitignore delete mode 100644 .idea/betterCommentsSettings.xml delete mode 100644 .idea/copilot.data.migration.agent.xml delete mode 100644 .idea/copilot.data.migration.ask.xml delete mode 100644 .idea/copilot.data.migration.ask2agent.xml delete mode 100644 .idea/copilot.data.migration.edit.xml delete mode 100644 .idea/dictionaries/project.xml delete mode 100644 .idea/discord.xml delete mode 100644 .idea/google-java-format.xml delete mode 100644 .idea/gradle.xml delete mode 100644 .idea/material_theme_project_new.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/vcs.xml diff --git a/.github/git-commit-instructions.md b/.github/git-commit-instructions.md new file mode 100644 index 0000000..118d487 --- /dev/null +++ b/.github/git-commit-instructions.md @@ -0,0 +1,8 @@ +Viết commit message bằng tiếng Anh, theo chuẩn Commit Conventional: +- Tiêu đề: + Đầu tiên là loại commit + Tiếp theo là tóm lược commit không quá 50 từ +- Mô tả: + Theo sau là các chỉnh sửa chính trong commit, kèm theo công dụng của nó (nếu cần) trong cặp dấu ngoặc đơn +- Ghi chú + Cuối cùng là ghi chú nếu cần thiết \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1fac4d5..7a603b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,13 @@ .gradle build/ +target/ !gradle/wrapper/gradle-wrapper.jar !**/src/main/**/build/ !**/src/test/**/build/ .kotlin ### IntelliJ IDEA ### -.idea/modules.xml -.idea/jarRepositories.xml -.idea/compiler.xml -.idea/libraries/ +.idea/ *.iws *.iml *.ipr diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/betterCommentsSettings.xml b/.idea/betterCommentsSettings.xml deleted file mode 100644 index 4f152ed..0000000 --- a/.idea/betterCommentsSettings.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/copilot.data.migration.agent.xml b/.idea/copilot.data.migration.agent.xml deleted file mode 100644 index 4ea72a9..0000000 --- a/.idea/copilot.data.migration.agent.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask.xml b/.idea/copilot.data.migration.ask.xml deleted file mode 100644 index 7ef04e2..0000000 --- a/.idea/copilot.data.migration.ask.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask2agent.xml b/.idea/copilot.data.migration.ask2agent.xml deleted file mode 100644 index 1f2ea11..0000000 --- a/.idea/copilot.data.migration.ask2agent.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/copilot.data.migration.edit.xml b/.idea/copilot.data.migration.edit.xml deleted file mode 100644 index 8648f94..0000000 --- a/.idea/copilot.data.migration.edit.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/dictionaries/project.xml b/.idea/dictionaries/project.xml deleted file mode 100644 index 344b076..0000000 --- a/.idea/dictionaries/project.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - codestorm - - - \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml deleted file mode 100644 index d8e9561..0000000 --- a/.idea/discord.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/google-java-format.xml b/.idea/google-java-format.xml deleted file mode 100644 index 05946a8..0000000 --- a/.idea/google-java-format.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 0d296b7..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/material_theme_project_new.xml b/.idea/material_theme_project_new.xml deleted file mode 100644 index d8193df..0000000 --- a/.idea/material_theme_project_new.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 3b7dc99..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/docs/dev/guide.md b/docs/dev/guide.md index cd4b57a..a5cd5c3 100644 --- a/docs/dev/guide.md +++ b/docs/dev/guide.md @@ -2,7 +2,7 @@ ## 📋 Yêu cầu -* **JDK** (Khuyến nghị: [OpenJDK 21](https://openjdk.org/projects/jdk/21/)) +* **[Oracle OpenJDK 25](https://openjdk.org/projects/jdk/25/)** (Language level: 25) * **[Gradle](https://gradle.org/)** ## 🚀 Setup From f803b3c0c7acc6a262095e73beb96e0adcb05994 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Wed, 1 Oct 2025 10:33:55 +0700 Subject: [PATCH 13/53] Merge pull request #6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Brick * feat(brick): add PowerBrick and update Brick, ExoplodeBrick, Protecte… * docs(brick): add Javadoc for Brick, ExoplodeBrick, PowerBrick, Protec… * refactor(brick): remove NormalBrick and StrongBrick * feat(paddle): add ExpendPaddle, LaserPaddle, ShrinkPaddle and update … * feat(paddle): add ExpendPaddle, LaserPaddle, ShrinkPaddle and update … * feat(paddle): add ExpendPaddle, LaserPaddle, ShrinkPaddle and update … * refactor: remove brick and gameManager packages * refactor(paddle): enhance documentation for Paddle and its variants --- .../bounceverse/paddle/ExpendPaddle.java | 18 +++++ .../bounceverse/paddle/LaserPaddle.java | 19 +++++ .../codestorm/bounceverse/paddle/Paddle.java | 79 +++++++++++++++++++ .../bounceverse/paddle/ShrinkPaddle.java | 18 +++++ 4 files changed, 134 insertions(+) create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java new file mode 100644 index 0000000..17e3879 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java @@ -0,0 +1,18 @@ +package com.github.codestorm.bounceverse.paddle; + +/** + * + * + *

ExpendPaddle

+ * + * A special type of {@link Paddle} that is wider than the normal paddle. + */ +public class ExpendPaddle extends Paddle { + /** The scale factor applied to the paddle's width. */ + private static final double SCALE = 1.5; + + /** Create a new expended paddle. */ + public ExpendPaddle(int x, int y, int width, int height, double speed) { + super(x, y, (int) (width * SCALE), height, speed); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java new file mode 100644 index 0000000..1f87ef1 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java @@ -0,0 +1,19 @@ +package com.github.codestorm.bounceverse.paddle; + +/** + * + * + *

LaserPaddle

+ * + * A special type of {@link Paddle} that can shoot bullets upward to destroy bricks. This is usually + * activated by a {@link com.github.codestorm.bounceverse.powerup.PowerUp} (not available). + */ +public class LaserPaddle extends Paddle { + /** Create a new LaserPaddle instance. */ + public LaserPaddle(int x, int y, int width, int height, double speed) { + super(x, y, width, height, speed); + } + + /** Shoots bullet from paddle. */ + public void shoot() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java new file mode 100644 index 0000000..a2a4559 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java @@ -0,0 +1,79 @@ +package com.github.codestorm.bounceverse.paddle; + +/** + * + * + *

Paddle

+ * + * {@link Paddle} is an object directly controlled by the player, used to interact with {@link + * com.github.codestorm.bounceverse.ball.Ball}. + * + *

The paddle can move horizontally and reset its position. + */ +public class Paddle { + private int x; + private int y; + private int width; + private int height; + private double speed; + + public Paddle(int x, int y, int width, int height, double speed) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.speed = speed; + } + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + /** Move Paddle to left. */ + public void moveLeft() {} + + /** Move Paddle to right. */ + public void moveRight() {} + + /** Reset paddle to a specific position. */ + public void resetPosition(int startX, int startY) { + this.x = startX; + this.y = startY; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java new file mode 100644 index 0000000..cd7b867 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java @@ -0,0 +1,18 @@ +package com.github.codestorm.bounceverse.paddle; + +/** + * + * + *

ShrinkPaddle

+ * + * A special type of {@link Paddle} that is narrower than the normal paddle. + */ +public class ShrinkPaddle extends Paddle { + /** The scale factor applied to the paddle's width. */ + private static final double SCALE = 0.7; + + /** Create a new shrunk paddle. */ + public ShrinkPaddle(int x, int y, int width, int height, double speed) { + super(x, y, (int) (width * SCALE), height, speed); + } +} From 5d7487b65570dfbdcca93869dd8991ab8d9d0144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 1 Oct 2025 10:47:51 +0700 Subject: [PATCH 14/53] docs: Update documentation links in PowerUp and Ball classes - Changed method references in PowerUp class documentation to use {@link} instead of {@code} for better clarity. - Updated JDK version in guide.md from 25 to 24. - Improved formatting in Ball class for consistency. --- docs/dev/guide.md | 2 +- .../com/github/codestorm/bounceverse/ball/Ball.java | 5 +++-- .../github/codestorm/bounceverse/powerup/PowerUp.java | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/dev/guide.md b/docs/dev/guide.md index a5cd5c3..6411499 100644 --- a/docs/dev/guide.md +++ b/docs/dev/guide.md @@ -2,7 +2,7 @@ ## 📋 Yêu cầu -* **[Oracle OpenJDK 25](https://openjdk.org/projects/jdk/25/)** (Language level: 25) +* **[Oracle OpenJDK 24](https://openjdk.org/projects/jdk/24/)** (Language level: 24 Preview) * **[Gradle](https://gradle.org/)** ## 🚀 Setup diff --git a/src/main/java/com/github/codestorm/bounceverse/ball/Ball.java b/src/main/java/com/github/codestorm/bounceverse/ball/Ball.java index 9995f70..1ba67c1 100644 --- a/src/main/java/com/github/codestorm/bounceverse/ball/Ball.java +++ b/src/main/java/com/github/codestorm/bounceverse/ball/Ball.java @@ -5,8 +5,9 @@ * *

Ball

* - * Ball is a player-controlled object used to hit other objects via the Paddle. A ball has position - * (x, y), velocity (vx, vy), and a radius. + * Ball is a player-controlled object used to hit other objects via the {@link + * com.github.codestorm.bounceverse.paddle.Paddle}. A ball has position (x, y), velocity (vx, vy), + * and a radius. * *

This class provides utility methods for resetting position, setting velocity, checking bounds, * and accessing attributes. Subclasses must implement movement and bounce behaviors. diff --git a/src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java b/src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java index 27ad5e7..a162838 100644 --- a/src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java +++ b/src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java @@ -14,7 +14,7 @@ * update based on events (lazy-update). * *

You need to extend this class to create another class that can provide effects though - * {@code apply()} and {@code doApply()} method. + * {@link #apply()} and {@link #unapply()} method. */ public abstract class PowerUp { private TimerAction waitAction; @@ -22,7 +22,7 @@ public abstract class PowerUp { private double startAt; private double endAt; - /** Update {@code waitAction} when {@code startAt} is changed. */ + /** Update {@link #waitAction} when {@link #startAt} is changed. */ private void updateWaitAction() { final var gameTimer = FXGL.getGameTimer(); final var currentTime = gameTimer.getNow(); @@ -36,7 +36,7 @@ private void updateWaitAction() { } } - /** Update {@code activeAction} when {@code endAt} is changed. */ + /** Update {@link #activeAction} when {@link #endAt} is changed. */ private void updateActiveAction() { final var gameTimer = FXGL.getGameTimer(); final var currentTime = gameTimer.getNow(); @@ -50,12 +50,12 @@ private void updateActiveAction() { } } - /** Wrapper for {@code apply()} method. */ + /** Wrapper for {@link #apply()} method. */ protected void doApply() { apply(); } - /** Wrapper for {@code unapply()} method. */ + /** Wrapper for {@link #unapply()} method. */ protected void doUnapply() { unapply(); } From 43bcfc580692c079aa63677842c3e22e712e7b7c Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Sun, 5 Oct 2025 17:12:35 +0700 Subject: [PATCH 15/53] feat(brick): refactor and document brick module (Factory, Component, Protected, Explode) --- .../bounceverse/brick/BrickComponent.java | 104 ++++++++++++++++++ .../bounceverse/brick/BrickFactory.java | 92 ++++++++++++++++ .../bounceverse/brick/ExplodeBrick.java | 64 +++++++++++ .../bounceverse/brick/PowerBrick.java | 9 +- .../bounceverse/brick/ProtectedBrick.java | 9 +- 5 files changed, 272 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/BrickComponent.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/BrickFactory.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/ExplodeBrick.java diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/BrickComponent.java b/src/main/java/com/github/codestorm/bounceverse/brick/BrickComponent.java new file mode 100644 index 0000000..00f4fa0 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/brick/BrickComponent.java @@ -0,0 +1,104 @@ +package com.github.codestorm.bounceverse.brick; + +import com.almasb.fxgl.entity.component.Component; +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; + +public class BrickComponent extends Component { + private final int width; + private final int height; + private final int initialHp; + private final Color baseColor; + private int hp; + private boolean destroyed; + private Rectangle view; + + /** Represents the core behavior and appearance of a brick in the game. */ + public BrickComponent(int width, int height, int hp, Color baseColor) { + this.width = width; + this.height = height; + this.hp = hp; + this.initialHp = hp; + this.baseColor = baseColor; + this.destroyed = false; + } + + public int getWidth() { + return width; + } + + public int getHeight() { + return height; + } + + public int getHp() { + return hp; + } + + public void setHp(int hp) { + this.hp = hp; + } + + public boolean isDestroyed() { + return hp <= 0; + } + + public void setDestroyed(boolean destroyed) { + this.destroyed = destroyed; + } + + /** Create a rectangular visual for brick. */ + public void onAdded() { + // Lấy view của Entity + view = new Rectangle(width, height); + view.setArcWidth(8); + view.setArcHeight(8); + updateColor(); + getEntity().getViewComponent().addChild(view); + } + + /** + * Reduces the brick's hit points by one when hit. + * + *

If hit points reach zero, the brick is marked as destroyed. + */ + public void hit() { + if (!destroyed && hp > 0) { + hp--; + if (hp == 0) { + destroyed = true; + onDestroyed(); + } else { + updateColor(); + } + } + } + + /** + * Updates the brick’s color based on remaining HP. + * + *

The color gradually darkens as HP decreases, while keeping the base hue consistent across + * brick types. + */ + private void updateColor() { + float ratio = (float) hp / initialHp; + Color dimmed = baseColor.deriveColor(0, 1, 0.6 + 0.4 * ratio, 1); + view.setFill(dimmed); + view.setStroke(Color.BLACK); + } + + /** + * Handles destruction behavior when the brick is fully broken. + * + *

By default, removes the brick entity from the game world. Subclasses may override this for + * custom effects (e.g. explosions). + */ + protected void onDestroyed() { + getEntity().removeFromWorld(); + } + + // Return the score gained by destroying the brick. + public int getScore() { + return initialHp * 10; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/brick/BrickFactory.java new file mode 100644 index 0000000..fe06937 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/brick/BrickFactory.java @@ -0,0 +1,92 @@ +package com.github.codestorm.bounceverse.brick; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.EntityFactory; +import javafx.scene.Group; +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; + +/** Factory class responsible for creating various types of brick entities used in the game. */ +public class BrickFactory implements EntityFactory { + private static final int DEFAULT_WIDTH = 80; + private static final int DEFAULT_HEIGHT = 30; + private static final int DEFAULT_HP = 1; + + // Normal Brick. + public static Entity newBrick(double x, double y) { + return FXGL.entityBuilder() + .at(x, y) + .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT)) + .with( + new BrickComponent( + DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_HP, Color.LIGHTBLUE)) + .build(); + } + + // Strong Brick. + public static Entity newStrongBrick(double x, double y) { + return FXGL.entityBuilder() + .at(x, y) + .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT)) + .with( + new BrickComponent( + DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_HP * 3, Color.ORANGE)) + .build(); + } + + // Explode Brick. + public static Entity newExplodeBrick(double x, double y) { + return FXGL.entityBuilder() + .at(x, y) + .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT)) + .with(new ExplodeBrick(DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_HP, Color.RED)) + .build(); + } + + // Protected Brick. + public static Entity newProtectedBrick(double x, double y, String shieldSide) { + ProtectedBrick protectedBrick = + new ProtectedBrick( + DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_HP, Color.WHITE, shieldSide); + + Rectangle body = new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT); + body.setArcWidth(8); + body.setArcHeight(8); + + Rectangle shield = null; + double thickness = 8; + + switch (protectedBrick.getShieldSide().toLowerCase()) { + case "top" -> shield = new Rectangle(-0.5, -1.5, DEFAULT_WIDTH + 1, thickness); + case "bottom" -> + shield = + new Rectangle( + -0.5, + DEFAULT_HEIGHT - thickness + 1, + DEFAULT_WIDTH + 1, + thickness); + case "left" -> shield = new Rectangle(-1.5, -0.5, thickness, DEFAULT_HEIGHT + 1); + case "right" -> + shield = + new Rectangle( + DEFAULT_WIDTH - thickness + 1, + -0.5, + thickness, + DEFAULT_HEIGHT + 1); + } + + if (shield != null) { + shield.setFill(Color.GOLD); + } + + Group view = new Group(); + if (shield == null) { + view = new Group(body); + } else { + view = new Group(body, shield); + } + + return FXGL.entityBuilder().at(x, y).viewWithBBox(view).with(protectedBrick).build(); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/ExplodeBrick.java b/src/main/java/com/github/codestorm/bounceverse/brick/ExplodeBrick.java new file mode 100644 index 0000000..6067533 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/brick/ExplodeBrick.java @@ -0,0 +1,64 @@ +package com.github.codestorm.bounceverse.brick; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import java.util.List; +import javafx.scene.paint.Color; + +public class ExplodeBrick extends BrickComponent { + + public ExplodeBrick(int width, int height, int hp, Color baseColor) { + super(width, height, hp, baseColor); + } + + private static final int EXPLODE_RADIUS = 1; + + public int getRadius() { + return EXPLODE_RADIUS; + } + + /** + * Handles a hit on this brick. + * + *

Decreases hit points using the parent logic. If the brick is destroyed after the hit, it + * triggers an explosion. + */ + @Override + public void hit() { + super.hit(); + if (isDestroyed()) { + explode(); + } + } + + /** + * Triggers the explosion effect of this brick. + * + *

This method can be extended to apply damage to surrounding bricks + */ + private void explode() { + double cx = getEntity().getCenter().getX(); + double cy = getEntity().getCenter().getY(); + + List entites = FXGL.getGameWorld().getEntities(); + for (Entity e : entites) { + if (e == getEntity()) continue; + if (!e.hasComponent(BrickComponent.class)) continue; + + BrickComponent brick = e.getComponent(BrickComponent.class); + if (brick.isDestroyed()) { + continue; + } + + double ex = e.getCenter().getX(); + double ey = e.getCenter().getY(); + + double dx = Math.abs(ex - cx) / getWidth(); + double dy = Math.abs(ey - cy) / getHeight(); + + if (dx <= EXPLODE_RADIUS && dy <= EXPLODE_RADIUS) { + brick.hit(); + } + } + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java b/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java index 42afcea..93eba23 100644 --- a/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java +++ b/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java @@ -1,8 +1,11 @@ package com.github.codestorm.bounceverse.brick; -public class PowerBrick extends Brick { - public PowerBrick(int x, int y, int width, int height, int hp) { - super(x, y, width, height, hp); +import javafx.scene.paint.Color; + +public class PowerBrick extends BrickComponent { + + public PowerBrick(int width, int height, int hp, Color baseColor) { + super(width, height, hp, baseColor); } /** diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java b/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java index 3e67912..5f2e104 100644 --- a/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java +++ b/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java @@ -1,10 +1,12 @@ package com.github.codestorm.bounceverse.brick; -public class ProtectedBrick extends Brick { +import javafx.scene.paint.Color; + +public class ProtectedBrick extends BrickComponent { private String shieldSide; - public ProtectedBrick(int x, int y, int width, int height, int hp, String shieldSide) { - super(x, y, width, height, hp); + public ProtectedBrick(int width, int height, int hp, Color baseColor, String shieldSide) { + super(width, height, hp, baseColor); this.shieldSide = shieldSide; } @@ -26,6 +28,7 @@ public void hit(String direction) { } // Score from protected brick have more than 20 points. + @Override public int getScore() { return super.getScore() + 20; } From 106fcb6b9e110f728ef896531f8f439ef8c6c63d Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Sun, 5 Oct 2025 17:13:47 +0700 Subject: [PATCH 16/53] feat(game): add GameManager and BounceVerseApp for game initialization --- .../codestorm/bounceverse/BounceVerseApp.java | 30 +++++++ .../bounceverse/gameManager/GameManager.java | 90 +++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 src/main/java/com/github/codestorm/bounceverse/BounceVerseApp.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java diff --git a/src/main/java/com/github/codestorm/bounceverse/BounceVerseApp.java b/src/main/java/com/github/codestorm/bounceverse/BounceVerseApp.java new file mode 100644 index 0000000..a77f8c6 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/BounceVerseApp.java @@ -0,0 +1,30 @@ +package com.github.codestorm.bounceverse; + +import com.almasb.fxgl.app.GameApplication; +import com.almasb.fxgl.app.GameSettings; +import com.almasb.fxgl.dsl.FXGL; +import com.github.codestorm.bounceverse.gameManager.GameManager; +import javafx.scene.paint.Color; + +public class BounceVerseApp extends GameApplication { + private GameManager gameManager; + + @Override + protected void initSettings(GameSettings settings) { + settings.setWidth(900); + settings.setHeight(600); + settings.setTitle(""); + } + + @Override + protected void initGame() { + gameManager = new GameManager(); + + FXGL.getGameScene().setBackgroundColor(Color.web("#2B2B2B")); + gameManager.spawnBricks(); + } + + public static void main(String[] args) { + launch(args); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java b/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java new file mode 100644 index 0000000..7d107af --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java @@ -0,0 +1,90 @@ +package com.github.codestorm.bounceverse.gameManager; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import com.github.codestorm.bounceverse.ball.Ball; +import com.github.codestorm.bounceverse.brick.BrickComponent; +import com.github.codestorm.bounceverse.brick.BrickFactory; +import com.github.codestorm.bounceverse.paddle.Paddle; +import com.github.codestorm.bounceverse.powerup.PowerUp; +import java.util.ArrayList; +import java.util.List; + +/** + * Manages the main game logic of BounceVerse, including the paddle, ball, bricks, power-ups, score, + * and level state. + */ +public class GameManager { + private Paddle paddle; + private Ball ball; + private List bricks = new ArrayList<>(); + private List powerups; + private int score; + private int lives; + private int level; + + /** Spawns a predefined pattern of brick rows into the game world. */ + public void spawnBricks() { + clearBricks(); + + double startX = 100; + double startY = 100; + double offsetX = 85; + double offsetY = 40; + + // Row 1: Normal Bricks + for (int i = 0; i < 8; i++) { + Entity brick = BrickFactory.newBrick(startX + i * offsetX, startY); + FXGL.getGameWorld().addEntity(brick); + bricks.add(brick); + } + + // Row 2: Strong Brick + for (int i = 0; i < 8; i++) { + Entity brick = BrickFactory.newStrongBrick(startX + i * offsetX, startY + offsetY); + FXGL.getGameWorld().addEntity(brick); + bricks.add(brick); + } + + // Row 3: Explode Brick + for (int i = 0; i < 8; i++) { + Entity brick = BrickFactory.newExplodeBrick(startX + i * offsetX, startY + offsetY * 2); + FXGL.getGameWorld().addEntity(brick); + bricks.add(brick); + } + + // Row 4: Protected Bricks (with directional shields) + String[] shields = {"top", "left", "right", "bottom"}; + for (int i = 0; i < 8; i++) { + String shieldSide = shields[i % shields.length]; + Entity brick = + BrickFactory.newProtectedBrick( + startX + i * offsetX, startY + offsetY * 3, shieldSide); + FXGL.getGameWorld().addEntity(brick); + bricks.add(brick); + } + } + + /** Removes all existing bricks from the game world and clears the internal brick list. */ + public void clearBricks() { + bricks.forEach(Entity::removeFromWorld); + bricks.clear(); + } + + public List getBricks() { + return bricks; + } + + /** Update the player's score based on destroyed bricks. */ + public void updateScore() { + for (Entity brickEntity : bricks) { + if (!brickEntity.hasComponent(BrickComponent.class)) continue; + + BrickComponent brick = brickEntity.getComponent(BrickComponent.class); + if (brick.isDestroyed()) { + score += brick.getScore(); + brickEntity.removeFromWorld(); + } + } + } +} From f0211c30142df1ee2362690b62df930c2f8cd962 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Wed, 8 Oct 2025 00:57:46 +0700 Subject: [PATCH 17/53] feat(paddle): add PaddleComponent and variants (Expand, Shrink, Laser, Bullet) with factory integration --- .../bounceverse/paddle/BulletComponent.java | 20 +++++ .../bounceverse/paddle/ExpandPaddle.java | 18 +++++ .../bounceverse/paddle/ExpendPaddle.java | 12 --- .../bounceverse/paddle/LaserPaddle.java | 65 +++++++++++++--- .../codestorm/bounceverse/paddle/Paddle.java | 76 ------------------- .../bounceverse/paddle/PaddleComponent.java | 66 ++++++++++++++++ .../bounceverse/paddle/PaddleFactory.java | 62 +++++++++++++++ .../bounceverse/paddle/ShrinkPaddle.java | 19 +++-- 8 files changed, 234 insertions(+), 104 deletions(-) create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/BulletComponent.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ExpandPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/PaddleComponent.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/PaddleFactory.java diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/BulletComponent.java b/src/main/java/com/github/codestorm/bounceverse/paddle/BulletComponent.java new file mode 100644 index 0000000..a6261ad --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/BulletComponent.java @@ -0,0 +1,20 @@ +package com.github.codestorm.bounceverse.paddle; + +import com.almasb.fxgl.entity.component.Component; + +public class BulletComponent extends Component { + private double speed; + + public BulletComponent(double speed) { + this.speed = speed; + } + + @Override + public void onUpdate(double tpf) { + entity.translateY(-speed * tpf); + + if (entity.getY() < -10) { + entity.removeFromWorld(); + } + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ExpandPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ExpandPaddle.java new file mode 100644 index 0000000..92112ee --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/ExpandPaddle.java @@ -0,0 +1,18 @@ +package com.github.codestorm.bounceverse.paddle; + +/** A special type of {@link Paddle} that is wider than the normal paddle. */ +public class ExpandPaddle extends PaddleComponent { + // constructor. + public ExpandPaddle(double speed) { + super(speed); + } + + @Override + public void onAdded() { + entity.setScaleX(1.5); + } + + public void resetSize() { + entity.setScaleX(1.0); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java deleted file mode 100644 index 635e78f..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -/** A special type of {@link Paddle} that is wider than the normal paddle. */ -public class ExpendPaddle extends Paddle { - // The scale factor applied to the paddle's width. - private static final double SCALE = 1.5; - - // Create a new expended paddle. - public ExpendPaddle(int x, int y, int width, int height, double speed) { - super(x, y, (int) (width * SCALE), height, speed); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java index 762ff61..98a6b11 100644 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java @@ -1,29 +1,74 @@ package com.github.codestorm.bounceverse.paddle; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.components.TransformComponent; +import com.github.codestorm.bounceverse.gameManager.BounceverseType; + /** - * A special type of {@link Paddle} that can shoot bullets upward to destroy bricks. This is usually + * A special type of {@link Paddle} that can shoot bullets upward to destroy + * bricks. This is usually * activated by a power-up. */ -public class LaserPaddle extends Paddle { +public class LaserPaddle extends PaddleComponent { /** List of bullets currently fired by the paddle. */ - private List bullets; + private final List bullets = new ArrayList<>(); - // Create a new LaserPaddle instance - public LaserPaddle(int x, int y, int width, int height, double speed) { - super(x, y, width, height, speed); - this.bullets = new ArrayList<>(); + // constructor. + public LaserPaddle(double speed) { + super(speed); } // Shoots bullet from paddle. - public void shoot() {} + public void shoot() { + TransformComponent t = entity.getTransformComponent(); + double paddleX = t.getX(); + double paddleY = t.getY(); + double width = entity.getWidth(); + + // Create bullet gun on the left paddle. + double bulletLeftX = paddleX + 10; + double bulletLeftY = paddleY - 10; + + Entity bulletLeft = FXGL.entityBuilder() + .at(bulletLeftX, bulletLeftY) + .type(BounceverseType.BULLET) + .viewWithBBox("") + .with(new BulletComponent(500)) + .buildAndAttach(); + + // Create bullet gun on the right paddle. + double bulletRightX = paddleX + width - 18; + double bulletRightY = paddleY - 10; + + Entity bulletRight = FXGL.entityBuilder() + .at(bulletRightX, bulletRightY) + .type(BounceverseType.BULLET) + .viewWithBBox("") + .with(new BulletComponent(500)) + .buildAndAttach(); + + bullets.add(bulletLeft); + bullets.add(bulletRight); + } /** Updates all bullets when them get off-screen or hit the brick. */ - public void updateBullets() {} + public void updateBullets() { + Iterator iterator = bullets.iterator(); + while (iterator.hasNext()) { + Entity bullet = iterator.next(); + if (bullet.getY() < -10) { + bullet.removeFromWorld(); + iterator.remove(); + } + } + } - public List getBullets() { + public List getBullets() { return bullets; } } diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java deleted file mode 100644 index f13ea11..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -/** - * Represents the paddle controlled by the player in the game. - * - *

The paddle can move horizontally, reset its position, and is the base class for other paddle - * variants (expand, shrink, laser, etc.). - */ -public class Paddle { - private int x; - private int y; - private int width; - private int height; - private double speed; - - public Paddle(int x, int y, int width, int height, double speed) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.speed = speed; - } - - // getter & setter. - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public double getSpeed() { - return speed; - } - - public void setSpeed(double speed) { - this.speed = speed; - } - - // Move the paddle left. - public void moveLeft() {} - - // Move the paddle right. - public void moveRight() {} - - // Reset the paddle to a specific position. - public void resetPosition(int startX, int startY) { - this.x = startX; - this.y = startY; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleComponent.java b/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleComponent.java new file mode 100644 index 0000000..d296723 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleComponent.java @@ -0,0 +1,66 @@ +package com.github.codestorm.bounceverse.paddle; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.component.Component; + +/** + * Represents the paddle controlled by the player in the game. + * + *

+ * The paddle can move horizontally, reset its position, and is the base class + * for other paddle + * variants (expand, shrink, laser, etc.). + */ +public class PaddleComponent extends Component { + private double speed; + + public PaddleComponent(double speed) { + this.speed = speed; + } + + // getter & setter. + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + /** + * Moves the paddle to the left based on its speed and the current frame time. + *

+ * Using {@code FXGL.tpf()} (Time Per Frame) ensures that movement is frame + * rate–independent, + * so the paddle moves smoothly even if the FPS varies. + *

+ */ + public void moveLeft() { + double newX = entity.getX() - speed * FXGL.tpf(); + if (newX >= 0) { + entity.setX(newX); + } + } + + /** + * Moves the paddle to the right based on its speed and the current frame time. + *

+ * Using {@code FXGL.tpf()} (Time Per Frame) ensures that movement is frame + * rate–independent, + * so the paddle moves smoothly even if the FPS varies. + *

+ */ + public void moveRight() { + double newX = entity.getX() + speed * FXGL.tpf(); + double maxX = FXGL.getAppWidth() - entity.getWidth(); + if (newX <= maxX) { + entity.setX(newX); + } + } + + // Reset the paddle to a specific position. + public void resetPosition(double startX, double startY) { + entity.setX(startX); + entity.setY(startY); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleFactory.java b/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleFactory.java new file mode 100644 index 0000000..8e47a1c --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleFactory.java @@ -0,0 +1,62 @@ +package com.github.codestorm.bounceverse.paddle; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.EntityFactory; +import com.almasb.fxgl.entity.SpawnData; +import com.almasb.fxgl.entity.Spawns; +import com.almasb.fxgl.entity.components.CollidableComponent; +import com.github.codestorm.bounceverse.gameManager.BounceverseType; + +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; + +public class PaddleFactory implements EntityFactory { + private static final double DEFAULT_WIDTH = 150; + private static final double DEFAULT_HEIGHT = 20; + private static final double DEFAULT_SPEED = 400; + + // Paddle. + @Spawns("paddle") + public Entity newPaddle(SpawnData data) { + return FXGL.entityBuilder(data) + .type(BounceverseType.PADDLE) + .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.DODGERBLUE)) + .with(new CollidableComponent(true)) + .with(new PaddleComponent(DEFAULT_SPEED)) + .build(); + } + + // Shrink Paddle. + @Spawns("shrinkPaddle") + public Entity newShrinkPaddle(SpawnData data) { + return FXGL.entityBuilder(data) + .type(BounceverseType.PADDLE) + .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.ORANGERED)) + .with(new CollidableComponent(true)) + .with(new ShrinkPaddle(DEFAULT_SPEED)) + .build(); + } + + // Expand Paddle. + @Spawns("expandPaddle") + public Entity newExpandPaddle(SpawnData data) { + return FXGL.entityBuilder(data) + .type(BounceverseType.PADDLE) + .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.LIMEGREEN)) + .with(new CollidableComponent(true)) + .with(new ExpandPaddle(DEFAULT_SPEED)) + .build(); + } + + // Bullet Paddle. + @Spawns("bulletPaddle") + public Entity newBulletPaddle(SpawnData data) { + return FXGL.entityBuilder(data) + .type(BounceverseType.PADDLE) + .viewWithBBox(new Rectangle(100, 20, Color.HOTPINK)) + .with(new CollidableComponent(true)) + .with(new LaserPaddle(400)) + .build(); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java index 42ac850..0cc2f5d 100644 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java @@ -1,12 +1,19 @@ package com.github.codestorm.bounceverse.paddle; /** A special type of {@link Paddle} that is narrower than the normal paddle. */ -public class ShrinkPaddle extends Paddle { - // The scale factor applied to the paddle's width. - private static final double SCALE = 0.7; +public class ShrinkPaddle extends PaddleComponent { - // Create a new shrunk paddle. - public ShrinkPaddle(int x, int y, int width, int height, double speed) { - super(x, y, (int) (width * SCALE), height, speed); + // Constructor. + public ShrinkPaddle(double speed) { + super(speed); + } + + @Override + public void onAdded() { + entity.setScaleX(0.7); + } + + public void resetSize() { + entity.setScaleX(1.0); } } From e5f75a492aa436f7c4683da950114c3f3ab4a990 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Wed, 8 Oct 2025 02:43:21 +0700 Subject: [PATCH 18/53] Brick (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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(brick): Introduce brick components and behaviors - Added Brick, BrickHealth, BrickDrop, BrickExplode, and BrickFactory classes to manage brick entities and their behaviors (enhances gameplay mechanics). - Refactored existing classes to align with new component structure. * docs(brick): Corrected spelling of 'nheritance' to 'inheritance' Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor(brick): remove multiple Spawns annotation from newBrick methods Removed the @Spawns annotation from the newBrick methods in BrickFactory to streamline the code and eliminate unnecessary complexity (no functional changes). --------- Co-authored-by: Mai Thành <62001770+thnhmai06@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .idea/misc.xml | 10 +++ .../codestorm/bounceverse/brick/Brick.java | 85 ------------------- .../bounceverse/brick/ExoplodeBrick.java | 34 -------- .../bounceverse/brick/PowerBrick.java | 28 ------ .../bounceverse/brick/ProtectedBrick.java | 32 ------- .../{ => components}/ball/Ball.java | 2 +- .../components/base/BehaviorComponent.java | 15 ++++ .../components/base/EntityComponent.java | 26 ++++++ .../components/base/PropertyComponent.java | 15 ++++ .../components/base/properties/Health.java | 41 +++++++++ .../components/base/properties/Shield.java | 41 +++++++++ .../bounceverse/components/brick/Brick.java | 25 ++++++ .../components/brick/behaviors/BrickDrop.java | 40 +++++++++ .../brick/behaviors/BrickExplode.java | 67 +++++++++++++++ .../brick/properties/BrickHealth.java | 30 +++++++ .../brick/properties/BrickShield.java | 40 +++++++++ .../components/paddle/ExpendPaddle.java | 12 +++ .../components/paddle/LaserPaddle.java | 29 +++++++ .../bounceverse/components/paddle/Paddle.java | 76 +++++++++++++++++ .../components/paddle/ShrinkPaddle.java | 12 +++ .../{ => components}/powerup/PowerUp.java | 2 +- .../bounceverse/data/types/Side.java | 15 ++++ .../bounceverse/factory/BrickFactory.java | 82 ++++++++++++++++++ .../codestorm/bounceverse/tags/ForBrick.java | 7 ++ .../codestorm/bounceverse/tags/Optional.java | 8 ++ 25 files changed, 593 insertions(+), 181 deletions(-) create mode 100644 .idea/misc.xml delete mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/Brick.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/ExoplodeBrick.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java rename src/main/java/com/github/codestorm/bounceverse/{ => components}/ball/Ball.java (97%) create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/base/BehaviorComponent.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/base/EntityComponent.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/base/PropertyComponent.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/base/properties/Health.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/base/properties/Shield.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/brick/Brick.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickDrop.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickShield.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/paddle/ExpendPaddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/paddle/LaserPaddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/paddle/Paddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/paddle/ShrinkPaddle.java rename src/main/java/com/github/codestorm/bounceverse/{ => components}/powerup/PowerUp.java (98%) create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/types/Side.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/tags/ForBrick.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/tags/Optional.java diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..3b7dc99 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/Brick.java b/src/main/java/com/github/codestorm/bounceverse/brick/Brick.java deleted file mode 100644 index 9b80e18..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/brick/Brick.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.github.codestorm.bounceverse.brick; - -public class Brick { - private int x, y, width, height; - private int hp; - private final int initialHp; - private boolean destroyed; - - public Brick(int x, int y, int width, int height, int hp) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.hp = hp; - this.initialHp = hp; - this.destroyed = false; - } - - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public int getHp() { - return hp; - } - - public void setHp(int hp) { - this.hp = hp; - } - - public boolean isDestroyed() { - return hp <= 0; - } - - public void setDestroyed(boolean destroyed) { - this.destroyed = destroyed; - } - - /** - * Reduces the brick's hit points by one when hit. - * - *

If hit points reach zero, the brick is marked as destroyed. - */ - public void hit() { - if (!destroyed && hp > 0) { - hp--; - if (hp == 0) { - this.destroyed = true; - } - } - } - - // Calculates the score awarded for destroying this brick. - public int getScore() { - return initialHp * 10; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/ExoplodeBrick.java b/src/main/java/com/github/codestorm/bounceverse/brick/ExoplodeBrick.java deleted file mode 100644 index c215265..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/brick/ExoplodeBrick.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.github.codestorm.bounceverse.brick; - -public class ExoplodeBrick extends Brick { - private static final int explodeRadius = 1; - - public ExoplodeBrick(int x, int y, int width, int height, int hp) { - super(x, y, width, height, hp); - } - - public int getRadius() { - return explodeRadius; - } - - /** - * Handles a hit on this brick. - * - *

Decreases hit points using the parent logic. If the brick is destroyed after the hit, it - * triggers an explosion. - */ - @Override - public void hit() { - super.hit(); - if (isDestroyed()) { - explode(); - } - } - - /** - * Triggers the explosion effect of this brick. - * - *

This method can be extended to apply damage to surrounding bricks - */ - private void explode() {} -} diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java b/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java deleted file mode 100644 index 42afcea..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.github.codestorm.bounceverse.brick; - -public class PowerBrick extends Brick { - public PowerBrick(int x, int y, int width, int height, int hp) { - super(x, y, width, height, hp); - } - - /** - * Handles a hit on this power brick. - * - *

Executes the normal hit logic from the parent class. If the brick is destroyed after the - * hit, it will randomly spawn its power-up. - */ - @Override - public void hit() { - super.hit(); - if (isDestroyed()) { - activePower(); - } - } - - /** - * Spawns the power-up associated with this brick. - * - *

Subclasses should override this method to define the specific power-up effect. - */ - public void activePower() {} -} diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java b/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java deleted file mode 100644 index 3e67912..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.github.codestorm.bounceverse.brick; - -public class ProtectedBrick extends Brick { - private String shieldSide; - - public ProtectedBrick(int x, int y, int width, int height, int hp, String shieldSide) { - super(x, y, width, height, hp); - this.shieldSide = shieldSide; - } - - public String getShieldSide() { - return shieldSide; - } - - public void setShieldSide(String shieldSide) { - this.shieldSide = shieldSide; - } - - /** Handles a hit on this protected brick from a given direction. */ - public void hit(String direction) { - if (!isDestroyed()) { - if (!direction.equalsIgnoreCase(shieldSide)) { - super.hit(); - } - } - } - - // Score from protected brick have more than 20 points. - public int getScore() { - return super.getScore() + 20; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/ball/Ball.java b/src/main/java/com/github/codestorm/bounceverse/components/ball/Ball.java similarity index 97% rename from src/main/java/com/github/codestorm/bounceverse/ball/Ball.java rename to src/main/java/com/github/codestorm/bounceverse/components/ball/Ball.java index 1ba67c1..10a90cb 100644 --- a/src/main/java/com/github/codestorm/bounceverse/ball/Ball.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/ball/Ball.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.ball; +package com.github.codestorm.bounceverse.components.ball; /** * diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/BehaviorComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/base/BehaviorComponent.java new file mode 100644 index 0000000..32baf94 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/base/BehaviorComponent.java @@ -0,0 +1,15 @@ +package com.github.codestorm.bounceverse.components.base; + +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.component.Component; + +/** + * + * + *

BehaviorComponent

+ * + *

Lớp này đại diện cho một {@link Component} biểu diễn + * hành vi (behavior) của {@link Entity}. + */ +public abstract class BehaviorComponent extends Component {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/EntityComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/base/EntityComponent.java new file mode 100644 index 0000000..4b2ae6c --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/base/EntityComponent.java @@ -0,0 +1,26 @@ +package com.github.codestorm.bounceverse.components.base; + +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.component.Component; + +/** + * + * + *

EntityComponent

+ * + *

Lớp này đại diện cho các {@link Component} chung của {@link Entity} như là một Component. Sau + * khi kế thừa, bên trong nên có các Component buộc cần phải có của Entity, đồng thời thêm Component + * vào Entity thông qua override phương thức {@link Component#onAdded()} bằng cách gọi phương thức + * {@link Entity#addComponent(Component)}. + * + *

Tại sao lại cần có? Nguyên nhân của nhu cầu sinh ra lớp này là vì engine FXGL mà game + * sử dụng tuân theo mô hình Entity-Component-System (ECS), + * khi mà Entity không nên được kế thừa để phát triển thêm mà được xây dựng theo qua nguyên tắc composition over + * inheritance. Ngoài ra ta lại cần nhu cầu xác định kiểu của Entity một cách chặt chẽ nữa. Vậy + * nên, một thuộc tính kiểu trong Entity như này là cần thiết. + * + * @see com.github.codestorm.bounceverse.tags.Optional + */ +public abstract class EntityComponent extends Component {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/PropertyComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/base/PropertyComponent.java new file mode 100644 index 0000000..a218986 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/base/PropertyComponent.java @@ -0,0 +1,15 @@ +package com.github.codestorm.bounceverse.components.base; + +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.component.Component; + +/** + * + * + *

PropertyComponent

+ * + *

Lớp này đại diện cho một {@link Component} biểu diễn dữ + * liệu (data/property) của {@link Entity}. + */ +public abstract class PropertyComponent extends Component {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Health.java b/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Health.java new file mode 100644 index 0000000..175a94f --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Health.java @@ -0,0 +1,41 @@ +package com.github.codestorm.bounceverse.components.base.properties; + +import com.almasb.fxgl.dsl.components.HealthIntComponent; +import com.github.codestorm.bounceverse.components.base.PropertyComponent; + +/** + * + * + *

Health

+ * + *

Lớp này đại diện cho thuộc tính HP của Entity. Khi HP về 0, Entity sẽ bị xóa khỏi thế giới. + */ +public abstract class Health extends PropertyComponent { + private final HealthIntComponent health; + + public Health(int maxHealth) { + health = new HealthIntComponent(maxHealth); + } + + public Health(HealthIntComponent health) { + this.health = health; + } + + public HealthIntComponent getHealth() { + return health; + } + + @Override + public void onAdded() { + super.onAdded(); + entity.addComponent(health); + } + + @Override + public void onUpdate(double tpf) { + super.onUpdate(tpf); + if (health.isZero()) { + entity.removeFromWorld(); + } + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Shield.java b/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Shield.java new file mode 100644 index 0000000..6214439 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Shield.java @@ -0,0 +1,41 @@ +package com.github.codestorm.bounceverse.components.base.properties; + +import com.github.codestorm.bounceverse.components.base.PropertyComponent; +import com.github.codestorm.bounceverse.data.types.Side; +import com.github.codestorm.bounceverse.tags.Optional; +import java.util.Arrays; +import java.util.HashSet; + +/** + * + * + *

Shield

+ * + *

Lớp này đại diện cho Khiên bảo vệ Entity. Khiên có thể bảo vệ Entity từ một hoặc nhiều phía + * khỏi bị tấn công. + */ +public abstract class Shield extends PropertyComponent implements Optional { + private HashSet sides = new HashSet<>(); + + public HashSet getSides() { + return sides; + } + + public void setSides(HashSet sides) { + this.sides = sides; + } + + public void addSide(Side... sides) { + this.sides.addAll(Arrays.asList(sides)); + } + + public void removeSide(Side... sides) { + Arrays.asList(sides).forEach(this.sides::remove); + } + + public Shield() {} + + public Shield(Side... sides) { + addSide(sides); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/Brick.java b/src/main/java/com/github/codestorm/bounceverse/components/brick/Brick.java new file mode 100644 index 0000000..fbf7458 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/brick/Brick.java @@ -0,0 +1,25 @@ +package com.github.codestorm.bounceverse.components.brick; + +import com.github.codestorm.bounceverse.components.base.EntityComponent; +import com.github.codestorm.bounceverse.components.brick.properties.BrickHealth; + +/** + * + * + *

Brick

+ * + *

Lớp này đại diện cho Viên gạch trong trò chơi. + */ +public final class Brick extends EntityComponent { + private final BrickHealth health; + + @Override + public void onAdded() { + super.onAdded(); + entity.addComponent(health); + } + + public Brick(BrickHealth health) { + this.health = health; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickDrop.java b/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickDrop.java new file mode 100644 index 0000000..a35840f --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickDrop.java @@ -0,0 +1,40 @@ +package com.github.codestorm.bounceverse.components.brick.behaviors; + +import com.github.codestorm.bounceverse.components.base.BehaviorComponent; +import com.github.codestorm.bounceverse.components.base.EntityComponent; +import com.github.codestorm.bounceverse.tags.ForBrick; +import com.github.codestorm.bounceverse.tags.Optional; +import java.util.List; + +/** + * + * + *

BrickDrop

+ * + * Lớp này biểu diễn hành vi rơi ra vật phẩm của Viên gạch sau khi bị phá hủy. + */ +public final class BrickDrop extends BehaviorComponent implements ForBrick, Optional { + private List items; + + /** Hành động rơi ra vật phẩm. */ + private void drop() { + // TODO: How to drop? + } + + @Override + public void onRemoved() { + drop(); + } + + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + public BrickDrop(List items) { + this.items = items; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java b/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java new file mode 100644 index 0000000..2dcebeb --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java @@ -0,0 +1,67 @@ +package com.github.codestorm.bounceverse.components.brick.behaviors; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import com.github.codestorm.bounceverse.components.base.BehaviorComponent; +import com.github.codestorm.bounceverse.components.brick.Brick; +import com.github.codestorm.bounceverse.tags.ForBrick; +import com.github.codestorm.bounceverse.tags.Optional; +import java.util.List; + +/** + * + * + *

BrickExplode

+ * + *

Lớp này biểu diễn hành vi nổ của viên gạch. Khi viên gạch bị phá hủy, nó sẽ kích hoạt hiệu ứng + * nổ, có thể gây sát thương đến các viên gạch xung quanh trong bán kính xác định. + */ +public final class BrickExplode extends BehaviorComponent implements ForBrick, Optional { + public static final int DEFAULT_EXPLODE_RADIUS = 1; + private int explodeRadius; + + /** + * Triggers the explosion effect of this brick. + * + *

This method can be extended to apply damage to surrounding bricks + */ + private void explode() { + double cx = getEntity().getCenter().getX(); + double cy = getEntity().getCenter().getY(); + + List entities = FXGL.getGameWorld().getEntities(); + for (var entity : entities) { + if (entity == getEntity()) continue; + if (!entity.hasComponent(Brick.class)) continue; + + var brick = entity.getComponent(Brick.class); + double ex = entity.getCenter().getX(); + double ey = entity.getCenter().getY(); + + double dx = Math.abs(ex - cx) / getEntity().getWidth(); + double dy = Math.abs(ey - cy) / getEntity().getHeight(); + + if (dx <= explodeRadius && dy <= explodeRadius) { + // TODO: Make Explode + } + } + } + + @Override + public void onRemoved() { + explode(); + } + + public int getExplodeRadius() { + return explodeRadius; + } + + public void setExplodeRadius(int explodeRadius) { + this.explodeRadius = explodeRadius; + } + + public BrickExplode(int explodeRadius) { + assert explodeRadius > 0; + this.explodeRadius = explodeRadius; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java b/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java new file mode 100644 index 0000000..628126f --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java @@ -0,0 +1,30 @@ +package com.github.codestorm.bounceverse.components.brick.properties; + +import com.github.codestorm.bounceverse.components.base.properties.Health; +import com.github.codestorm.bounceverse.tags.ForBrick; + +/** + * + * + *

BrickHealth

+ * + *

Lớp này đại diện cho thuộc tính HP của Viên gạch. + */ +public final class BrickHealth extends Health implements ForBrick { + public BrickHealth(int maxHealth) { + super(maxHealth); + } + + // private void updateColor() { + // var ratio = getHealth().getValuePercent() / 100; + // Color dimmed = baseColor.deriveColor(0, 1, 0.6 + 0.4 * ratio, 1); + // view.setFill(dimmed); + // view.setStroke(Color.BLACK); + // } + + @Override + public void onUpdate(double tpf) { + super.onUpdate(tpf); + // updateColor here + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickShield.java b/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickShield.java new file mode 100644 index 0000000..8a84f29 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickShield.java @@ -0,0 +1,40 @@ +package com.github.codestorm.bounceverse.components.brick.properties; + +import com.github.codestorm.bounceverse.components.base.properties.Shield; +import com.github.codestorm.bounceverse.data.types.Side; +import com.github.codestorm.bounceverse.tags.ForBrick; + +/** + * + * + *

BrickShield

+ * + *

Lớp này đại diện cho Khiên bảo vệ Viên gạch. + */ +public final class BrickShield extends Shield implements ForBrick { + private static final int BONUS_SCORE = 20; + + public BrickShield() {} + + // TODO: Add shield view + // case "top" -> shield = new Rectangle(-0.5, -1.5, DEFAULT_WIDTH + 1, thickness); + // case "bottom" -> + // shield = + // new Rectangle( + // -0.5, + // DEFAULT_HEIGHT - thickness + 1, + // DEFAULT_WIDTH + 1, + // thickness); + // case "left" -> shield = new Rectangle(-1.5, -0.5, thickness, DEFAULT_HEIGHT + 1); + // case "right" -> + // shield = + // new Rectangle( + // DEFAULT_WIDTH - thickness + 1, + // -0.5, + // thickness, + // DEFAULT_HEIGHT + 1); + + public BrickShield(Side... sides) { + super(sides); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/paddle/ExpendPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/paddle/ExpendPaddle.java new file mode 100644 index 0000000..07f71f2 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/paddle/ExpendPaddle.java @@ -0,0 +1,12 @@ +package com.github.codestorm.bounceverse.components.paddle; + +/** A special type of {@link Paddle} that is wider than the normal paddle. */ +public class ExpendPaddle extends Paddle { + // The scale factor applied to the paddle's width. + private static final double SCALE = 1.5; + + // Create a new expended paddle. + public ExpendPaddle(int x, int y, int width, int height, double speed) { + super(x, y, (int) (width * SCALE), height, speed); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/paddle/LaserPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/paddle/LaserPaddle.java new file mode 100644 index 0000000..9923395 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/paddle/LaserPaddle.java @@ -0,0 +1,29 @@ +package com.github.codestorm.bounceverse.components.paddle; + +import java.util.ArrayList; +import java.util.List; + +/** + * A special type of {@link Paddle} that can shoot bullets upward to destroy bricks. This is usually + * activated by a power-up. + */ +public class LaserPaddle extends Paddle { + /** List of bullets currently fired by the paddle. */ + private List bullets; + + // Create a new LaserPaddle instance + public LaserPaddle(int x, int y, int width, int height, double speed) { + super(x, y, width, height, speed); + this.bullets = new ArrayList<>(); + } + + // Shoots bullet from paddle. + public void shoot() {} + + /** Updates all bullets when them get off-screen or hit the brick. */ + public void updateBullets() {} + + public List getBullets() { + return bullets; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/paddle/Paddle.java b/src/main/java/com/github/codestorm/bounceverse/components/paddle/Paddle.java new file mode 100644 index 0000000..b2e9853 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/paddle/Paddle.java @@ -0,0 +1,76 @@ +package com.github.codestorm.bounceverse.components.paddle; + +/** + * Represents the paddle controlled by the player in the game. + * + *

The paddle can move horizontally, reset its position, and is the base class for other paddle + * variants (expand, shrink, laser, etc.). + */ +public class Paddle { + private int x; + private int y; + private int width; + private int height; + private double speed; + + public Paddle(int x, int y, int width, int height, double speed) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.speed = speed; + } + + // getter & setter. + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + // Move the paddle left. + public void moveLeft() {} + + // Move the paddle right. + public void moveRight() {} + + // Reset the paddle to a specific position. + public void resetPosition(int startX, int startY) { + this.x = startX; + this.y = startY; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/paddle/ShrinkPaddle.java new file mode 100644 index 0000000..cce53ea --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/paddle/ShrinkPaddle.java @@ -0,0 +1,12 @@ +package com.github.codestorm.bounceverse.components.paddle; + +/** A special type of {@link Paddle} that is narrower than the normal paddle. */ +public class ShrinkPaddle extends Paddle { + // The scale factor applied to the paddle's width. + private static final double SCALE = 0.7; + + // Create a new shrunk paddle. + public ShrinkPaddle(int x, int y, int width, int height, double speed) { + super(x, y, (int) (width * SCALE), height, speed); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java b/src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java similarity index 98% rename from src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java rename to src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java index a162838..687a9af 100644 --- a/src/main/java/com/github/codestorm/bounceverse/powerup/PowerUp.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.powerup; +package com.github.codestorm.bounceverse.components.powerup; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.time.TimerAction; diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java b/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java new file mode 100644 index 0000000..3b62ad7 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java @@ -0,0 +1,15 @@ +package com.github.codestorm.bounceverse.data.types; + +/** + * + * + *

Side

+ * + *

Đại diện cho các cạnh của đối tượng dạng hình chữ nhật. + */ +public enum Side { + LEFT, + RIGHT, + TOP, + BOTTOM +} diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java new file mode 100644 index 0000000..0832f4f --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java @@ -0,0 +1,82 @@ +package com.github.codestorm.bounceverse.factory; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.EntityFactory; +import com.almasb.fxgl.entity.Spawns; +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.brick.Brick; +import com.github.codestorm.bounceverse.components.brick.properties.BrickHealth; +import com.github.codestorm.bounceverse.tags.ForBrick; +import com.github.codestorm.bounceverse.tags.Optional; +import javafx.geometry.Point2D; +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; +import org.jetbrains.annotations.NotNull; + +/** + * + * + *

BrickFactory

+ * + *

Factory để tạo các entity Brick trong trò chơi. + * + * @see EntityFactory + */ +public class BrickFactory implements EntityFactory { + private static final int DEFAULT_X = 80; + private static final int DEFAULT_Y = 30; + private static final Color DEFAULT_COLOR = Color.LIGHTBLUE; + private static final int DEFAULT_HP = 1; + + /** + * Tạo mới một entity brick. + * + * @param pos Vị trí + * @param hp HP + * @param view Khung nhìn + * @param components Các components tùy chọn + * @return Entity Brick mới tạo + * @param Component không bắt buộc phải có của Brick + */ + @NotNull @SafeVarargs + @Spawns("brick") + public static Entity newBrick( + Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { + return FXGL.entityBuilder() + .at(pos) + .viewWithBBox(view) + .with(new Brick(new BrickHealth(hp))) + .with(components) + .build(); + } + + /** + * Tạo mới một entity brick với khung nhìn mặc định. + * + * @param pos Vị trí + * @param hp HP + * @param components Các components tùy chọn + * @return Entity Brick mới tạo + * @param Component không bắt buộc phải có của Brick + */ + @NotNull @SafeVarargs + public static Entity newBrick( + Point2D pos, int hp, OptionalBrickComponent... components) { + return newBrick(pos, hp, new Rectangle(DEFAULT_X, DEFAULT_Y, DEFAULT_COLOR), components); + } + + /** + * Tạo mới một entity brick với khung nhìn và HP mặc định. + * + * @param pos Vị trí + * @param components Các components tùy chọn + * @return Entity Brick mới tạo + * @param Component không bắt buộc phải có của Brick + */ + @NotNull @SafeVarargs + public static Entity newBrick( + Point2D pos, OptionalBrickComponent... components) { + return newBrick(pos, DEFAULT_HP, components); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/tags/ForBrick.java b/src/main/java/com/github/codestorm/bounceverse/tags/ForBrick.java new file mode 100644 index 0000000..4dccdd7 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/tags/ForBrick.java @@ -0,0 +1,7 @@ +package com.github.codestorm.bounceverse.tags; + +/** + * Nhãn cho các thành phần sử dụng trên {@link + * com.github.codestorm.bounceverse.components.brick.Brick}. + */ +public interface ForBrick {} diff --git a/src/main/java/com/github/codestorm/bounceverse/tags/Optional.java b/src/main/java/com/github/codestorm/bounceverse/tags/Optional.java new file mode 100644 index 0000000..740a0a3 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/tags/Optional.java @@ -0,0 +1,8 @@ +package com.github.codestorm.bounceverse.tags; + +/** + * Nhãn cho các thành phần không yêu cầu có ngay từ khi khởi tạo Entity. + * + * @see com.github.codestorm.bounceverse.components.base.EntityComponent + */ +public interface Optional {} From 169ad53693089e2c6d741b018bc8c355481397f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 8 Oct 2025 02:45:58 +0700 Subject: [PATCH 19/53] refactor: remove duplicate `paddle` folder --- .../bounceverse/paddle/ExpendPaddle.java | 18 ----- .../bounceverse/paddle/LaserPaddle.java | 19 ----- .../codestorm/bounceverse/paddle/Paddle.java | 79 ------------------- .../bounceverse/paddle/ShrinkPaddle.java | 18 ----- 4 files changed, 134 deletions(-) delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java deleted file mode 100644 index 17e3879..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/ExpendPaddle.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -/** - * - * - *

ExpendPaddle

- * - * A special type of {@link Paddle} that is wider than the normal paddle. - */ -public class ExpendPaddle extends Paddle { - /** The scale factor applied to the paddle's width. */ - private static final double SCALE = 1.5; - - /** Create a new expended paddle. */ - public ExpendPaddle(int x, int y, int width, int height, double speed) { - super(x, y, (int) (width * SCALE), height, speed); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java deleted file mode 100644 index 1f87ef1..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -/** - * - * - *

LaserPaddle

- * - * A special type of {@link Paddle} that can shoot bullets upward to destroy bricks. This is usually - * activated by a {@link com.github.codestorm.bounceverse.powerup.PowerUp} (not available). - */ -public class LaserPaddle extends Paddle { - /** Create a new LaserPaddle instance. */ - public LaserPaddle(int x, int y, int width, int height, double speed) { - super(x, y, width, height, speed); - } - - /** Shoots bullet from paddle. */ - public void shoot() {} -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java deleted file mode 100644 index a2a4559..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/Paddle.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -/** - * - * - *

Paddle

- * - * {@link Paddle} is an object directly controlled by the player, used to interact with {@link - * com.github.codestorm.bounceverse.ball.Ball}. - * - *

The paddle can move horizontally and reset its position. - */ -public class Paddle { - private int x; - private int y; - private int width; - private int height; - private double speed; - - public Paddle(int x, int y, int width, int height, double speed) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.speed = speed; - } - - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public double getSpeed() { - return speed; - } - - public void setSpeed(double speed) { - this.speed = speed; - } - - /** Move Paddle to left. */ - public void moveLeft() {} - - /** Move Paddle to right. */ - public void moveRight() {} - - /** Reset paddle to a specific position. */ - public void resetPosition(int startX, int startY) { - this.x = startX; - this.y = startY; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java deleted file mode 100644 index cd7b867..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -/** - * - * - *

ShrinkPaddle

- * - * A special type of {@link Paddle} that is narrower than the normal paddle. - */ -public class ShrinkPaddle extends Paddle { - /** The scale factor applied to the paddle's width. */ - private static final double SCALE = 0.7; - - /** Create a new shrunk paddle. */ - public ShrinkPaddle(int x, int y, int width, int height, double speed) { - super(x, y, (int) (width * SCALE), height, speed); - } -} From 84c357f100678ecd20ebba23aeaa9b6483dc5031 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Wed, 8 Oct 2025 11:13:38 +0700 Subject: [PATCH 20/53] feat/GameApplication (#8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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> --- .github/git-commit-instructions.md | 204 +++++++++++++++++- .github/workflows/build.yml | 18 ++ .github/workflows/buildRelease.yml | 25 +++ .github/workflows/linting.yml | 20 ++ .github/workflows/setup.yml | 22 ++ .github/workflows/spotless.yml | 29 --- .idea/misc.xml | 10 - .run/bytecode.run.xml | 24 +++ .run/dependencies.run.xml | 24 +++ .run/release.run.xml | 24 +++ .run/run.run.xml | 24 +++ .run/spotlessApply.run.xml | 17 ++ .run/spotlessCheck.run.xml | 17 ++ build.gradle | 34 ++- .../codestorm/bounceverse/Bounceverse.java | 35 +++ .../components/powerup/PowerUp.java | 5 +- .../bounceverse/factory/BrickFactory.java | 19 +- 17 files changed, 488 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/buildRelease.yml create mode 100644 .github/workflows/linting.yml create mode 100644 .github/workflows/setup.yml delete mode 100644 .github/workflows/spotless.yml delete mode 100644 .idea/misc.xml create mode 100644 .run/bytecode.run.xml create mode 100644 .run/dependencies.run.xml create mode 100644 .run/release.run.xml create mode 100644 .run/run.run.xml create mode 100644 .run/spotlessApply.run.xml create mode 100644 .run/spotlessCheck.run.xml create mode 100644 src/main/java/com/github/codestorm/bounceverse/Bounceverse.java diff --git a/.github/git-commit-instructions.md b/.github/git-commit-instructions.md index 118d487..197a919 100644 --- a/.github/git-commit-instructions.md +++ b/.github/git-commit-instructions.md @@ -1,8 +1,196 @@ -Viết commit message bằng tiếng Anh, theo chuẩn Commit Conventional: -- Tiêu đề: - Đầu tiên là loại commit - Tiếp theo là tóm lược commit không quá 50 từ -- Mô tả: - Theo sau là các chỉnh sửa chính trong commit, kèm theo công dụng của nó (nếu cần) trong cặp dấu ngoặc đơn -- Ghi chú - Cuối cùng là ghi chú nếu cần thiết \ No newline at end of file +--- +draft: false +aliases: ["/en/"] +--- + +# Conventional Commits 1.0.0 + +## Summary + +The Conventional Commits specification is a lightweight convention on top of commit messages. +It provides an easy set of rules for creating an explicit commit history; +which makes it easier to write automated tools on top of. +This convention dovetails with [SemVer](http://semver.org), +by describing the features, fixes, and breaking changes made in commit messages. + +The commit message should be structured as follows: + +--- + +``` +[optional scope]: + +[optional body] + +[optional footer(s)] +``` +--- + +
+The commit contains the following structural elements, to communicate intent to the +consumers of your library: + +1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with [`PATCH`](http://semver.org/#summary) in Semantic Versioning). +1. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with [`MINOR`](http://semver.org/#summary) in Semantic Versioning). +1. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with [`MAJOR`](http://semver.org/#summary) in Semantic Versioning). + A BREAKING CHANGE can be part of commits of any _type_. +1. _types_ other than `fix:` and `feat:` are allowed, for example [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) (based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)) recommends `build:`, `chore:`, + `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others. +1. _footers_ other than `BREAKING CHANGE: ` may be provided and follow a convention similar to + [git trailer format](https://git-scm.com/docs/git-interpret-trailers). + +Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE). +

+A scope may be provided to a commit's type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`. + +## Examples + +### Commit message with description and breaking change footer +``` +feat: allow provided config object to extend other configs + +BREAKING CHANGE: `extends` key in config file is now used for extending other config files +``` + +### Commit message with `!` to draw attention to breaking change +``` +feat!: send an email to the customer when a product is shipped +``` + +### Commit message with scope and `!` to draw attention to breaking change +``` +feat(api)!: send an email to the customer when a product is shipped +``` + +### Commit message with both `!` and BREAKING CHANGE footer +``` +chore!: drop support for Node 6 + +BREAKING CHANGE: use JavaScript features not available in Node 6. +``` + +### Commit message with no body +``` +docs: correct spelling of CHANGELOG +``` + +### Commit message with scope +``` +feat(lang): add Polish language +``` + +### Commit message with multi-paragraph body and multiple footers +``` +fix: prevent racing of requests + +Introduce a request id and a reference to latest request. Dismiss +incoming responses other than from latest request. + +Remove timeouts which were used to mitigate the racing issue but are +obsolete now. + +Reviewed-by: Z +Refs: #123 +``` + +## Specification + +The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt). + +1. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed + by the OPTIONAL scope, OPTIONAL `!`, and REQUIRED terminal colon and space. +1. The type `feat` MUST be used when a commit adds a new feature to your application or library. +1. The type `fix` MUST be used when a commit represents a bug fix for your application. +1. A scope MAY be provided after a type. A scope MUST consist of a noun describing a + section of the codebase surrounded by parenthesis, e.g., `fix(parser):` +1. A description MUST immediately follow the colon and space after the type/scope prefix. + The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were contained in string_. +1. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description. +1. A commit body is free-form and MAY consist of any number of newline separated paragraphs. +1. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of + a word token, followed by either a `:` or `#` separator, followed by a string value (this is inspired by the + [git trailer convention](https://git-scm.com/docs/git-interpret-trailers)). +1. A footer's token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate + the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token. +1. A footer's value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer + token/separator pair is observed. +1. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the + footer. +1. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g., + _BREAKING CHANGE: environment variables now take precedence over config files_. +1. If included in the type/scope prefix, breaking changes MUST be indicated by a + `!` immediately before the `:`. If `!` is used, `BREAKING CHANGE:` MAY be omitted from the footer section, + and the commit description SHALL be used to describe the breaking change. +1. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., _docs: update ref docs._ +1. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase. +1. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer. + +## Why Use Conventional Commits + +* Automatically generating CHANGELOGs. +* Automatically determining a semantic version bump (based on the types of commits landed). +* Communicating the nature of changes to teammates, the public, and other stakeholders. +* Triggering build and publish processes. +* Making it easier for people to contribute to your projects, by allowing them to explore + a more structured commit history. + +## FAQ + +### How should I deal with commit messages in the initial development phase? + +We recommend that you proceed as if you've already released the product. Typically *somebody*, even if it's your fellow software developers, is using your software. They'll want to know what's fixed, what breaks etc. + +### Are the types in the commit title uppercase or lowercase? + +Any casing may be used, but it's best to be consistent. + +### What do I do if the commit conforms to more than one of the commit types? + +Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs. + +### Doesn’t this discourage rapid development and fast iteration? + +It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors. + +### Might Conventional Commits lead developers to limit the type of commits they make because they'll be thinking in the types provided? + +Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time. + +### How does this relate to SemVer? + +`fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases. + +### How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`? + +We recommend using SemVer to release your own extensions to this specification (and +encourage you to make these extensions!) + +### What do I do if I accidentally use the wrong commit type? + +#### When you used a type that's of the spec but not the correct type, e.g. `fix` instead of `feat` + +Prior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use. + +#### When you used a type *not* of the spec, e.g. `feet` instead of `feat` + +In a worst case scenario, it's not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec. + +### Do all my contributors need to use the Conventional Commits specification? + +No! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they're merged—adding no workload to casual committers. +A common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge. + +### How does Conventional Commits handle revert commits? + +Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch? + +Conventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling +authors to use the flexibility of _types_ and _footers_ to develop their logic for handling reverts. + +One recommendation is to use the `revert` type, and a footer that references the commit SHAs that are being reverted: + +``` +revert: let us never again speak of the noodle incident + +Refs: 676104e, a215868 +``` \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3847285 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,18 @@ +name: Build Bytecode + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: .github/workflows/setup.yml + + - name: Build + run: ./gradlew clean build --debug \ No newline at end of file diff --git a/.github/workflows/buildRelease.yml b/.github/workflows/buildRelease.yml new file mode 100644 index 0000000..bf887f6 --- /dev/null +++ b/.github/workflows/buildRelease.yml @@ -0,0 +1,25 @@ +name: Build Release + +on: + release: + types: + - created + - published + +permissions: + contents: write + +jobs: + buildRelease: + runs-on: ubuntu-latest + + steps: + - uses: .github/workflows/setup.yml + + - name: Build release + run: ./gradlew clean buildRelease --debug + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + path: release/*.jar \ No newline at end of file diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..9e5b57b --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,20 @@ +name: Linting + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + spotlessCheck: + runs-on: ubuntu-latest + + steps: + - uses: .github/workflows/setup.yml + + - name: Run Spotless check + run: | + chmod +x gradlew + ./gradlew spotlessCheck diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml new file mode 100644 index 0000000..6d95331 --- /dev/null +++ b/.github/workflows/setup.yml @@ -0,0 +1,22 @@ +name: Setup + +on: + workflow_call: + +permissions: + contents: read + +jobs: + setup: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Setup JDK + uses: actions/setup-java@v5 + with: + distribution: oracle + java-version: 24 + cache: gradle diff --git a/.github/workflows/spotless.yml b/.github/workflows/spotless.yml deleted file mode 100644 index 5a63188..0000000 --- a/.github/workflows/spotless.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Linter - -on: - pull_request: - push: - branches: [ "*" ] - -permissions: - contents: read - -jobs: - spotless: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup JDK - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 21 - cache: gradle - - - name: Run Spotless check - run: | - chmod +x gradlew - ./gradlew spotlessCheck diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 3b7dc99..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.run/bytecode.run.xml b/.run/bytecode.run.xml new file mode 100644 index 0000000..9c2c35a --- /dev/null +++ b/.run/bytecode.run.xml @@ -0,0 +1,24 @@ + + + + + + + true + true + false + false + + + \ No newline at end of file diff --git a/.run/dependencies.run.xml b/.run/dependencies.run.xml new file mode 100644 index 0000000..f92d84e --- /dev/null +++ b/.run/dependencies.run.xml @@ -0,0 +1,24 @@ + + + + + + + true + true + false + false + + + \ No newline at end of file diff --git a/.run/release.run.xml b/.run/release.run.xml new file mode 100644 index 0000000..0bb90c2 --- /dev/null +++ b/.run/release.run.xml @@ -0,0 +1,24 @@ + + + + + + + true + true + false + false + + + \ No newline at end of file diff --git a/.run/run.run.xml b/.run/run.run.xml new file mode 100644 index 0000000..2aee537 --- /dev/null +++ b/.run/run.run.xml @@ -0,0 +1,24 @@ + + + + + + + true + true + false + false + + + \ No newline at end of file diff --git a/.run/spotlessApply.run.xml b/.run/spotlessApply.run.xml new file mode 100644 index 0000000..dd897b2 --- /dev/null +++ b/.run/spotlessApply.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/.run/spotlessCheck.run.xml b/.run/spotlessCheck.run.xml new file mode 100644 index 0000000..a435985 --- /dev/null +++ b/.run/spotlessCheck.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index b7b5d40..8327b8e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,12 @@ plugins { id 'java' + id 'application' id 'org.openjfx.javafxplugin' version '0.1.0' id 'com.diffplug.spotless' version "8.0.0" } group = 'com.github.codestorm' -version = '1.0' +version = '1.0.0' repositories { mavenCentral() @@ -18,7 +19,33 @@ dependencies { implementation 'com.github.almasb:fxgl:21.1' implementation 'org.slf4j:slf4j-api:2.0.17' implementation 'ch.qos.logback:logback-classic:1.5.18' - implementation("com.google.guava:guava:33.5.0-jre") + implementation 'com.google.guava:guava:33.5.0-jre' +} + +application { + mainClass = 'com.github.codestorm.bounceverse.Bounceverse' + applicationDefaultJvmArgs = [ + "--enable-native-access=javafx.graphics" + ] +} + +defaultTasks('run') + +tasks.register('buildRelease', Jar) { + group = 'build' + description = "Test this project and assemble a release JAR file." + + archiveBaseName.set(project.name) + archiveVersion.set(project.version) + destinationDirectory.set(file("./release")) + + dependsOn test + dependsOn configurations.runtimeClasspath + from sourceSets.main.output + from { + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } + duplicatesStrategy = DuplicatesStrategy.EXCLUDE } test { @@ -27,10 +54,11 @@ test { javafx { version = "25" - modules = [ 'javafx.base' ] + modules = ['javafx.controls', 'javafx.media'] } spotless { + enforceCheck = false format 'misc', { target '*.gradle', '.gitattributes', '.gitignore' diff --git a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java new file mode 100644 index 0000000..e2556c8 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java @@ -0,0 +1,35 @@ +package com.github.codestorm.bounceverse; + +import com.almasb.fxgl.app.GameApplication; +import com.almasb.fxgl.app.GameSettings; +import com.almasb.fxgl.dsl.FXGL; +import com.github.codestorm.bounceverse.factory.BrickFactory; +import javafx.scene.paint.Color; + +public final class Bounceverse extends GameApplication { + public static final String name = "Bounceverse"; + + @Override + protected void initSettings(GameSettings settings) { + settings.setWidth(900); + settings.setHeight(600); + settings.setTitle(name); + } + + @Override + protected void initGame() { + FXGL.getGameWorld().addEntityFactory(new BrickFactory()); + + var brick1 = FXGL.spawn("normalBrick", 100, 100); + var brick2 = FXGL.spawn("normalBrick", 100, 100); + } + + @Override + protected void initUI() { + FXGL.getGameScene().setBackgroundColor(Color.web("#2B2B2B")); + } + + public static void main(String[] args) { + launch(args); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java b/src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java index 687a9af..a325e31 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java @@ -110,8 +110,9 @@ public PowerUp(double startAt, double endAt) { * @param after Duration to wait before active */ public PowerUp(@NotNull Duration duration, @NotNull Duration after) { - final var currentTime = FXGL.getGameTimer().getNow(); - this(currentTime + after.toMillis(), currentTime + after.toMillis() + duration.toMillis()); + this( + FXGL.getGameTimer().getNow() + after.toMillis(), + FXGL.getGameTimer().getNow() + after.toMillis() + duration.toMillis()); } /** diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java index 0832f4f..c8a0f0e 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java @@ -3,6 +3,7 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.EntityFactory; +import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.component.Component; import com.github.codestorm.bounceverse.components.brick.Brick; @@ -23,7 +24,7 @@ * * @see EntityFactory */ -public class BrickFactory implements EntityFactory { +public final class BrickFactory implements EntityFactory { private static final int DEFAULT_X = 80; private static final int DEFAULT_Y = 30; private static final Color DEFAULT_COLOR = Color.LIGHTBLUE; @@ -40,8 +41,7 @@ public class BrickFactory implements EntityFactory { * @param Component không bắt buộc phải có của Brick */ @NotNull @SafeVarargs - @Spawns("brick") - public static Entity newBrick( + private static Entity newBrick( Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { return FXGL.entityBuilder() .at(pos) @@ -61,22 +61,19 @@ public static E * @param Component không bắt buộc phải có của Brick */ @NotNull @SafeVarargs - public static Entity newBrick( + private static Entity newBrick( Point2D pos, int hp, OptionalBrickComponent... components) { return newBrick(pos, hp, new Rectangle(DEFAULT_X, DEFAULT_Y, DEFAULT_COLOR), components); } /** - * Tạo mới một entity brick với khung nhìn và HP mặc định. + * Tạo entity Brick bình thường. * * @param pos Vị trí - * @param components Các components tùy chọn * @return Entity Brick mới tạo - * @param Component không bắt buộc phải có của Brick */ - @NotNull @SafeVarargs - public static Entity newBrick( - Point2D pos, OptionalBrickComponent... components) { - return newBrick(pos, DEFAULT_HP, components); + @NotNull @Spawns("normalBrick") + public static Entity newNormalBrick(SpawnData pos) { + return newBrick(new Point2D(pos.getX(), pos.getY()), DEFAULT_HP); } } From 7419cd4d1e2dfc10cfc8023055575548c60e4ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 8 Oct 2025 11:32:06 +0700 Subject: [PATCH 21/53] ci: update workflow setup steps for clarity Refactor the setup steps in build.yml, buildRelease.yml, and linting.yml to include a name for the setup action, improving readability and maintainability. --- .github/workflows/build.yml | 15 ++++++++++++--- .github/workflows/buildRelease.yml | 17 +++++++++++++---- .github/workflows/linting.yml | 11 +++++++++-- .github/workflows/setup.yml | 22 ---------------------- 4 files changed, 34 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/setup.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3847285..79db3ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,9 +10,18 @@ permissions: jobs: build: runs-on: ubuntu-latest - steps: - - uses: .github/workflows/setup.yml + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Setup JDK + uses: actions/setup-java@v5 + with: + distribution: oracle + java-version: 24 + cache: gradle - name: Build - run: ./gradlew clean build --debug \ No newline at end of file + run: | + chmod +x gradlew + ./gradlew clean build diff --git a/.github/workflows/buildRelease.yml b/.github/workflows/buildRelease.yml index bf887f6..9e21fa6 100644 --- a/.github/workflows/buildRelease.yml +++ b/.github/workflows/buildRelease.yml @@ -12,14 +12,23 @@ permissions: jobs: buildRelease: runs-on: ubuntu-latest - steps: - - uses: .github/workflows/setup.yml + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Setup JDK + uses: actions/setup-java@v5 + with: + distribution: oracle + java-version: 24 + cache: gradle - name: Build release - run: ./gradlew clean buildRelease --debug + run: | + chmod +x gradlew + ./gradlew clean buildRelease - name: Upload artifacts uses: actions/upload-artifact@v3 with: - path: release/*.jar \ No newline at end of file + path: release/*.jar diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 9e5b57b..a550cdb 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -10,9 +10,16 @@ permissions: jobs: spotlessCheck: runs-on: ubuntu-latest - steps: - - uses: .github/workflows/setup.yml + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Setup JDK + uses: actions/setup-java@v5 + with: + distribution: oracle + java-version: 24 + cache: gradle - name: Run Spotless check run: | diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml deleted file mode 100644 index 6d95331..0000000 --- a/.github/workflows/setup.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Setup - -on: - workflow_call: - -permissions: - contents: read - -jobs: - setup: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - - name: Setup JDK - uses: actions/setup-java@v5 - with: - distribution: oracle - java-version: 24 - cache: gradle From 06eb0b73f064904bacd8ea60be259c76306bfbf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:04:58 +0700 Subject: [PATCH 22/53] chore: remove debug script parameters from run configurations Cleared the `scriptParameters` option in `bytecode.run.xml` and `release.run.xml` to avoid unnecessary debug flags during execution. --- .run/bytecode.run.xml | 2 +- .run/release.run.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.run/bytecode.run.xml b/.run/bytecode.run.xml index 9c2c35a..af852c8 100644 --- a/.run/bytecode.run.xml +++ b/.run/bytecode.run.xml @@ -4,7 +4,7 @@ diff --git a/.run/release.run.xml b/.run/release.run.xml index 0bb90c2..8e36db7 100644 --- a/.run/release.run.xml +++ b/.run/release.run.xml @@ -4,7 +4,7 @@ From 30e005b880744c5c7bec052a4c01f06e750783c5 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Wed, 8 Oct 2025 14:09:44 +0700 Subject: [PATCH 23/53] feat(brick): implement explosion logic and health management refactor --- logs/FXGL-07-thg 10-2025-23.34.15.log | 202 +++++++++++++++++ logs/FXGL-07-thg 10-2025-23.34.36.log | 202 +++++++++++++++++ logs/FXGL-07-thg 10-2025-23.35.02.log | 202 +++++++++++++++++ logs/FXGL-07-thg 10-2025-23.35.28.log | 202 +++++++++++++++++ logs/FXGL-07-thg 10-2025-23.39.20.log | 202 +++++++++++++++++ logs/FXGL-07-thg 10-2025-23.42.03.log | 206 ++++++++++++++++++ logs/FXGL-07-thg 10-2025-23.49.23.log | 206 ++++++++++++++++++ logs/FXGL-07-thg 10-2025-23.49.25.log | 206 ++++++++++++++++++ logs/FXGL-08-thg 10-2025-00.27.47.log | 206 ++++++++++++++++++ logs/FXGL-08-thg 10-2025-00.28.38.log | 206 ++++++++++++++++++ .../brick/behaviors/BrickExplode.java | 31 ++- .../brick/properties/BrickHealth.java | 26 ++- system/Readme.txt | 1 + system/fxgl.bundle | Bin 0 -> 204 bytes 14 files changed, 2082 insertions(+), 16 deletions(-) create mode 100644 logs/FXGL-07-thg 10-2025-23.34.15.log create mode 100644 logs/FXGL-07-thg 10-2025-23.34.36.log create mode 100644 logs/FXGL-07-thg 10-2025-23.35.02.log create mode 100644 logs/FXGL-07-thg 10-2025-23.35.28.log create mode 100644 logs/FXGL-07-thg 10-2025-23.39.20.log create mode 100644 logs/FXGL-07-thg 10-2025-23.42.03.log create mode 100644 logs/FXGL-07-thg 10-2025-23.49.23.log create mode 100644 logs/FXGL-07-thg 10-2025-23.49.25.log create mode 100644 logs/FXGL-08-thg 10-2025-00.27.47.log create mode 100644 logs/FXGL-08-thg 10-2025-00.28.38.log create mode 100644 system/Readme.txt create mode 100644 system/fxgl.bundle diff --git a/logs/FXGL-07-thg 10-2025-23.34.15.log b/logs/FXGL-07-thg 10-2025-23.34.15.log new file mode 100644 index 0000000..eefc84e --- /dev/null +++ b/logs/FXGL-07-thg 10-2025-23.34.15.log @@ -0,0 +1,202 @@ +23:34:10.901 [main ] DEBUG Logger - Configured Logger +23:34:10.922 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +23:34:11.274 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +23:34:11.277 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +23:34:11.277 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +23:34:11.277 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +23:34:11.278 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +23:34:11.278 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +23:34:11.278 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +23:34:11.278 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +23:34:11.344 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +23:34:11.378 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +23:34:11.378 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +23:34:11.378 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:34:11.379 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +23:34:11.381 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +23:34:11.446 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +23:34:11.487 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +23:34:11.487 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +23:34:11.488 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +23:34:11.516 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +23:34:11.555 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +23:34:11.616 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +23:34:11.616 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +23:34:11.619 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +23:34:11.627 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +23:34:11.638 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +23:34:11.646 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +23:34:11.731 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +23:34:11.753 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +23:34:11.764 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +23:34:11.769 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:34:11.776 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +23:34:11.776 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +23:34:11.779 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +23:34:11.779 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +23:34:11.780 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +23:34:11.780 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +23:34:11.808 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,363 sec +23:34:11.809 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +23:34:11.815 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +23:34:11.822 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +23:34:11.825 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +23:34:11.829 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +23:34:11.829 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +23:34:11.830 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +23:34:11.830 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +23:34:11.833 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +23:34:11.833 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +23:34:11.834 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +23:34:11.835 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:34:11.835 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +23:34:11.847 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +23:34:11.847 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +23:34:11.847 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +23:34:11.847 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +23:34:11.847 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +23:34:11.847 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +23:34:11.850 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game +23:34:11.906 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +23:34:11.936 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,086 sec +23:34:11.972 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:34:11.978 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +23:34:11.978 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@70de3200 +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +23:34:15.550 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +23:34:15.550 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +23:34:15.550 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +23:34:15.552 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:34:15.554 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +23:34:15.554 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +23:34:15.562 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.34.36.log b/logs/FXGL-07-thg 10-2025-23.34.36.log new file mode 100644 index 0000000..fe7755f --- /dev/null +++ b/logs/FXGL-07-thg 10-2025-23.34.36.log @@ -0,0 +1,202 @@ +23:34:26.535 [main ] DEBUG Logger - Configured Logger +23:34:26.553 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +23:34:26.865 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +23:34:26.868 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +23:34:26.868 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +23:34:26.868 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +23:34:26.868 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +23:34:26.868 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +23:34:26.868 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +23:34:26.869 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +23:34:26.939 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +23:34:26.974 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +23:34:26.974 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +23:34:26.974 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:34:26.975 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +23:34:26.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +23:34:27.037 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +23:34:27.037 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +23:34:27.038 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:34:27.038 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +23:34:27.038 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +23:34:27.043 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +23:34:27.082 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +23:34:27.082 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +23:34:27.083 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +23:34:27.111 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +23:34:27.150 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +23:34:27.200 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +23:34:27.202 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +23:34:27.204 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +23:34:27.210 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +23:34:27.222 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +23:34:27.228 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +23:34:27.304 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +23:34:27.321 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +23:34:27.331 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +23:34:27.335 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:34:27.343 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +23:34:27.343 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +23:34:27.346 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +23:34:27.346 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +23:34:27.346 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +23:34:27.347 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +23:34:27.379 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,336 sec +23:34:27.380 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +23:34:27.383 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +23:34:27.390 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +23:34:27.393 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +23:34:27.399 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +23:34:27.400 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +23:34:27.401 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +23:34:27.402 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +23:34:27.402 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +23:34:27.403 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +23:34:27.403 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +23:34:27.404 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +23:34:27.404 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:34:27.417 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +23:34:27.418 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +23:34:27.418 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +23:34:27.418 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +23:34:27.418 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +23:34:27.418 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +23:34:27.419 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game +23:34:27.464 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +23:34:27.493 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,074 sec +23:34:27.528 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:34:27.535 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +23:34:27.535 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@2619c44c +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +23:34:36.567 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +23:34:36.567 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +23:34:36.567 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +23:34:36.569 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:34:36.570 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +23:34:36.570 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +23:34:36.581 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.35.02.log b/logs/FXGL-07-thg 10-2025-23.35.02.log new file mode 100644 index 0000000..3649a1b --- /dev/null +++ b/logs/FXGL-07-thg 10-2025-23.35.02.log @@ -0,0 +1,202 @@ +23:34:56.423 [main ] DEBUG Logger - Configured Logger +23:34:56.443 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +23:34:56.763 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +23:34:56.766 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +23:34:56.766 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +23:34:56.766 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +23:34:56.766 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +23:34:56.766 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +23:34:56.766 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +23:34:56.767 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +23:34:56.835 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +23:34:56.871 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +23:34:56.871 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +23:34:56.871 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:34:56.872 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +23:34:56.874 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +23:34:56.933 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +23:34:56.934 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +23:34:56.934 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:34:56.934 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +23:34:56.934 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +23:34:56.939 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +23:34:56.978 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +23:34:56.979 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +23:34:56.979 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +23:34:57.009 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +23:34:57.049 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +23:34:57.097 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +23:34:57.097 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +23:34:57.101 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +23:34:57.108 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +23:34:57.118 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +23:34:57.125 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +23:34:57.206 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +23:34:57.224 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +23:34:57.235 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +23:34:57.239 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:34:57.245 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +23:34:57.245 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +23:34:57.248 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +23:34:57.249 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +23:34:57.249 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +23:34:57.250 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +23:34:57.282 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,343 sec +23:34:57.283 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +23:34:57.292 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +23:34:57.295 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +23:34:57.302 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +23:34:57.303 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +23:34:57.304 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +23:34:57.305 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +23:34:57.305 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +23:34:57.308 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +23:34:57.308 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +23:34:57.309 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +23:34:57.309 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:34:57.310 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +23:34:57.321 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +23:34:57.321 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +23:34:57.321 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +23:34:57.321 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +23:34:57.321 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +23:34:57.321 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +23:34:57.322 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Initializing game +23:34:57.368 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +23:34:57.398 [FXGL Background Thread 1 ] INFO FXGLApplication - Game initialization took: 0,076 sec +23:34:57.432 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:34:57.438 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +23:34:57.438 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@45a50c2b +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +23:35:02.391 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +23:35:02.391 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +23:35:02.391 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +23:35:02.394 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:35:02.396 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +23:35:02.397 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +23:35:02.408 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.35.28.log b/logs/FXGL-07-thg 10-2025-23.35.28.log new file mode 100644 index 0000000..a5b7967 --- /dev/null +++ b/logs/FXGL-07-thg 10-2025-23.35.28.log @@ -0,0 +1,202 @@ +23:35:14.256 [main ] DEBUG Logger - Configured Logger +23:35:14.276 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +23:35:14.593 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +23:35:14.596 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +23:35:14.596 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +23:35:14.596 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +23:35:14.596 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +23:35:14.597 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +23:35:14.597 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +23:35:14.597 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +23:35:14.664 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +23:35:14.698 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +23:35:14.698 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +23:35:14.698 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:35:14.699 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +23:35:14.701 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +23:35:14.766 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +23:35:14.806 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +23:35:14.806 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +23:35:14.806 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +23:35:14.835 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +23:35:14.876 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +23:35:14.933 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +23:35:14.933 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +23:35:14.936 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +23:35:14.944 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +23:35:14.954 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +23:35:14.960 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +23:35:15.043 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +23:35:15.063 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +23:35:15.072 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +23:35:15.077 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:35:15.084 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +23:35:15.085 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +23:35:15.087 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +23:35:15.087 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +23:35:15.088 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +23:35:15.088 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +23:35:15.123 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,357 sec +23:35:15.124 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +23:35:15.127 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +23:35:15.137 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +23:35:15.139 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +23:35:15.146 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +23:35:15.150 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +23:35:15.151 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +23:35:15.151 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +23:35:15.152 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +23:35:15.153 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +23:35:15.153 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +23:35:15.154 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +23:35:15.154 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:35:15.167 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +23:35:15.167 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +23:35:15.167 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +23:35:15.167 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +23:35:15.167 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +23:35:15.167 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +23:35:15.169 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +23:35:15.169 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game +23:35:15.243 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,075 sec +23:35:15.279 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:35:15.285 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +23:35:15.285 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +23:35:18.088 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +23:35:18.090 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +23:35:18.090 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +23:35:18.090 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +23:35:18.090 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@2bfc4f8a +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +23:35:28.742 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +23:35:28.742 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +23:35:28.743 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +23:35:28.745 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:35:28.746 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +23:35:28.746 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +23:35:28.758 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.39.20.log b/logs/FXGL-07-thg 10-2025-23.39.20.log new file mode 100644 index 0000000..6d8b139 --- /dev/null +++ b/logs/FXGL-07-thg 10-2025-23.39.20.log @@ -0,0 +1,202 @@ +23:39:14.830 [main ] DEBUG Logger - Configured Logger +23:39:14.850 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +23:39:15.173 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +23:39:15.176 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +23:39:15.176 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +23:39:15.176 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +23:39:15.176 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +23:39:15.176 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +23:39:15.176 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +23:39:15.177 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +23:39:15.246 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +23:39:15.278 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +23:39:15.279 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +23:39:15.279 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:39:15.279 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +23:39:15.282 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +23:39:15.339 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +23:39:15.339 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +23:39:15.340 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:39:15.340 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +23:39:15.340 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +23:39:15.345 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +23:39:15.388 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +23:39:15.389 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +23:39:15.389 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +23:39:15.419 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +23:39:15.457 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +23:39:15.506 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +23:39:15.506 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +23:39:15.508 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +23:39:15.517 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +23:39:15.526 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +23:39:15.532 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +23:39:15.614 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +23:39:15.632 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +23:39:15.641 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +23:39:15.646 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:39:15.654 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +23:39:15.654 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +23:39:15.657 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +23:39:15.657 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +23:39:15.658 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +23:39:15.658 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +23:39:15.682 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,337 sec +23:39:15.683 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +23:39:15.694 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +23:39:15.697 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +23:39:15.704 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +23:39:15.704 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +23:39:15.704 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +23:39:15.705 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +23:39:15.705 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +23:39:15.707 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +23:39:15.707 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +23:39:15.708 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +23:39:15.708 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:39:15.715 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +23:39:15.718 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +23:39:15.719 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +23:39:15.719 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +23:39:15.719 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +23:39:15.719 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +23:39:15.719 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +23:39:15.722 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Initializing game +23:39:15.770 [FXGL Background Thread 1 ] INFO FXGLApplication - Game initialization took: 0,048 sec +23:39:15.771 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +23:39:15.774 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:39:15.779 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +23:39:15.779 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +23:39:18.658 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +23:39:18.659 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@7069010b +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +23:39:20.766 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +23:39:20.766 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +23:39:20.767 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +23:39:20.769 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:39:20.772 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +23:39:20.772 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +23:39:20.784 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.42.03.log b/logs/FXGL-07-thg 10-2025-23.42.03.log new file mode 100644 index 0000000..8915a63 --- /dev/null +++ b/logs/FXGL-07-thg 10-2025-23.42.03.log @@ -0,0 +1,206 @@ +23:41:19.563 [main ] DEBUG Logger - Configured Logger +23:41:19.581 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +23:41:19.906 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +23:41:19.909 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +23:41:19.910 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +23:41:19.910 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +23:41:19.910 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +23:41:19.910 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +23:41:19.910 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +23:41:19.910 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +23:41:19.979 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +23:41:20.012 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +23:41:20.012 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +23:41:20.012 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:41:20.012 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +23:41:20.014 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +23:41:20.074 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +23:41:20.074 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +23:41:20.075 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:41:20.075 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +23:41:20.075 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +23:41:20.080 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +23:41:20.122 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +23:41:20.122 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +23:41:20.123 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +23:41:20.151 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +23:41:20.191 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +23:41:20.247 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +23:41:20.247 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +23:41:20.250 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +23:41:20.258 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +23:41:20.269 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +23:41:20.277 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +23:41:20.355 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +23:41:20.377 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +23:41:20.388 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +23:41:20.392 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:41:20.400 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +23:41:20.400 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +23:41:20.402 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +23:41:20.402 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +23:41:20.403 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +23:41:20.403 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +23:41:20.430 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,349 sec +23:41:20.437 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A +23:41:20.437 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D +23:41:20.437 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left +23:41:20.438 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +23:41:20.438 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right +23:41:20.438 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +23:41:20.447 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +23:41:20.455 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +23:41:20.457 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +23:41:20.458 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +23:41:20.459 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +23:41:20.459 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +23:41:20.461 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +23:41:20.464 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +23:41:20.464 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +23:41:20.465 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +23:41:20.465 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:41:20.476 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +23:41:20.476 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +23:41:20.476 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +23:41:20.476 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +23:41:20.476 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +23:41:20.476 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +23:41:20.479 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +23:41:20.479 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game +23:41:20.557 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,079 sec +23:41:20.601 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:41:20.606 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +23:41:20.606 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@1ee36b3d +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +23:42:03.975 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +23:42:03.976 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +23:42:03.976 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +23:42:03.979 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:42:03.981 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +23:42:03.982 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +23:42:03.993 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.49.23.log b/logs/FXGL-07-thg 10-2025-23.49.23.log new file mode 100644 index 0000000..c55af77 --- /dev/null +++ b/logs/FXGL-07-thg 10-2025-23.49.23.log @@ -0,0 +1,206 @@ +23:48:57.444 [main ] DEBUG Logger - Configured Logger +23:48:57.461 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +23:48:57.800 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +23:48:57.803 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +23:48:57.803 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +23:48:57.804 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +23:48:57.804 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +23:48:57.804 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +23:48:57.804 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +23:48:57.804 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +23:48:57.879 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +23:48:57.913 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +23:48:57.914 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +23:48:57.914 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:48:57.915 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +23:48:57.917 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +23:48:57.983 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +23:48:58.023 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +23:48:58.023 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +23:48:58.023 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +23:48:58.051 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +23:48:58.092 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +23:48:58.145 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +23:48:58.145 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +23:48:58.147 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +23:48:58.155 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +23:48:58.165 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +23:48:58.172 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +23:48:58.251 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +23:48:58.274 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +23:48:58.283 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +23:48:58.287 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:48:58.295 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +23:48:58.296 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +23:48:58.298 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +23:48:58.299 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +23:48:58.299 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +23:48:58.299 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +23:48:58.331 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,348 sec +23:48:58.336 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +23:48:58.339 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A +23:48:58.339 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D +23:48:58.340 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left +23:48:58.340 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right +23:48:58.341 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +23:48:58.345 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +23:48:58.353 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +23:48:58.355 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +23:48:58.356 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +23:48:58.356 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +23:48:58.356 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +23:48:58.357 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +23:48:58.359 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +23:48:58.359 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +23:48:58.361 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +23:48:58.361 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:48:58.375 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +23:48:58.375 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +23:48:58.375 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +23:48:58.375 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +23:48:58.375 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +23:48:58.375 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +23:48:58.377 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game +23:48:58.439 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +23:48:58.464 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,087 sec +23:48:58.503 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:48:58.511 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +23:48:58.511 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +23:49:01.297 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +23:49:01.297 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@45ef8637 +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +23:49:23.317 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +23:49:23.317 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +23:49:23.317 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +23:49:23.319 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:49:23.321 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +23:49:23.321 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +23:49:23.330 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.49.25.log b/logs/FXGL-07-thg 10-2025-23.49.25.log new file mode 100644 index 0000000..5fdc630 --- /dev/null +++ b/logs/FXGL-07-thg 10-2025-23.49.25.log @@ -0,0 +1,206 @@ +23:49:09.070 [main ] DEBUG Logger - Configured Logger +23:49:09.088 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +23:49:09.406 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +23:49:09.409 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +23:49:09.409 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +23:49:09.409 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +23:49:09.409 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +23:49:09.409 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +23:49:09.410 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +23:49:09.410 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +23:49:09.476 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +23:49:09.510 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +23:49:09.511 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +23:49:09.511 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:49:09.511 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +23:49:09.514 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +23:49:09.581 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +23:49:09.623 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +23:49:09.623 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +23:49:09.624 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +23:49:09.651 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +23:49:09.688 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +23:49:09.743 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +23:49:09.743 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +23:49:09.745 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +23:49:09.753 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +23:49:09.763 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +23:49:09.770 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +23:49:09.850 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +23:49:09.867 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +23:49:09.876 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +23:49:09.879 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: C:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:49:09.886 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +23:49:09.886 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +23:49:09.889 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +23:49:09.889 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +23:49:09.890 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +23:49:09.891 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +23:49:09.919 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,338 sec +23:49:09.926 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A +23:49:09.926 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D +23:49:09.927 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left +23:49:09.927 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right +23:49:09.927 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +23:49:09.927 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +23:49:09.936 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +23:49:09.939 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +23:49:09.941 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +23:49:09.941 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +23:49:09.943 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +23:49:09.943 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +23:49:09.945 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +23:49:09.945 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +23:49:09.946 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +23:49:09.947 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:49:09.947 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +23:49:09.957 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +23:49:09.958 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +23:49:09.958 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +23:49:09.958 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +23:49:09.958 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +23:49:09.958 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +23:49:09.959 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Initializing game +23:49:10.017 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +23:49:10.037 [FXGL Background Thread 1 ] INFO FXGLApplication - Game initialization took: 0,077 sec +23:49:10.085 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +23:49:10.091 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +23:49:10.091 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +23:49:12.890 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +23:49:12.891 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +23:49:12.891 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@6c43fb21 +23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +23:49:25.342 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +23:49:25.343 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +23:49:25.343 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +23:49:25.344 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: C:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +23:49:25.346 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +23:49:25.346 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +23:49:25.358 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-08-thg 10-2025-00.27.47.log b/logs/FXGL-08-thg 10-2025-00.27.47.log new file mode 100644 index 0000000..75ee13a --- /dev/null +++ b/logs/FXGL-08-thg 10-2025-00.27.47.log @@ -0,0 +1,206 @@ +00:27:35.727 [main ] DEBUG Logger - Configured Logger +00:27:35.747 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +00:27:36.066 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +00:27:36.068 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +00:27:36.069 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +00:27:36.069 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +00:27:36.069 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +00:27:36.069 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +00:27:36.069 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +00:27:36.069 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +00:27:36.135 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +00:27:36.170 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +00:27:36.171 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +00:27:36.171 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +00:27:36.171 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +00:27:36.173 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +00:27:36.231 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +00:27:36.232 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +00:27:36.232 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +00:27:36.232 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +00:27:36.232 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +00:27:36.237 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +00:27:36.280 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +00:27:36.280 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +00:27:36.281 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +00:27:36.311 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +00:27:36.351 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +00:27:36.408 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +00:27:36.409 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +00:27:36.411 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +00:27:36.419 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +00:27:36.429 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +00:27:36.436 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +00:27:36.519 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +00:27:36.536 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +00:27:36.549 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +00:27:36.553 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +00:27:36.560 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +00:27:36.560 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +00:27:36.564 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +00:27:36.564 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +00:27:36.565 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +00:27:36.565 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +00:27:36.589 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,353 sec +00:27:36.598 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A +00:27:36.598 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D +00:27:36.598 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left +00:27:36.599 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right +00:27:36.599 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +00:27:36.599 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +00:27:36.608 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +00:27:36.610 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +00:27:36.613 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +00:27:36.614 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +00:27:36.615 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +00:27:36.616 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +00:27:36.618 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +00:27:36.618 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +00:27:36.620 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +00:27:36.622 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +00:27:36.623 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +00:27:36.635 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +00:27:36.636 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +00:27:36.636 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +00:27:36.636 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +00:27:36.636 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +00:27:36.636 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +00:27:36.638 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game +00:27:36.688 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +00:27:36.725 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,087 sec +00:27:36.749 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +00:27:36.753 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +00:27:36.753 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +00:27:39.563 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +00:27:39.563 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@56c18913 +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +00:27:47.550 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +00:27:47.550 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +00:27:47.550 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +00:27:47.553 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +00:27:47.555 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +00:27:47.555 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +00:27:47.564 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-08-thg 10-2025-00.28.38.log b/logs/FXGL-08-thg 10-2025-00.28.38.log new file mode 100644 index 0000000..28015ff --- /dev/null +++ b/logs/FXGL-08-thg 10-2025-00.28.38.log @@ -0,0 +1,206 @@ +00:28:19.643 [main ] DEBUG Logger - Configured Logger +00:28:19.663 [main ] DEBUG GameApplication - Logging settings +Title: Untitled +Version: 0.0 +Width: 900 +Height: 600 +Fullscreen: false +Intro: false +Profiling: false +Single step:false +App Mode: DEVELOPER +Menu Key: ESCAPE +Stage Style: DECORATED +Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 + +00:28:19.978 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL +00:28:19.980 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) +00:28:19.981 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium +00:28:19.981 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 +00:28:19.981 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 +00:28:19.981 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL +00:28:19.981 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions +00:28:19.981 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL +00:28:20.063 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene +00:28:20.096 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 +00:28:20.096 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 +00:28:20.096 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +00:28:20.097 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene +00:28:20.099 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window +00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) +00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 +00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) +00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 +00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 +00:28:20.162 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables +00:28:20.201 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp +00:28:20.201 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css +00:28:20.202 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css +00:28:20.230 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes +00:28:20.266 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized +00:28:20.315 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 +00:28:20.316 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE +00:28:20.318 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 +00:28:20.325 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() +00:28:20.336 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() +00:28:20.342 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png +00:28:20.428 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png +00:28:20.446 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized +00:28:20.456 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data +00:28:20.461 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +00:28:20.469 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} +00:28:20.469 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates +00:28:20.472 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts +00:28:20.473 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf +00:28:20.473 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization +00:28:20.473 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang +00:28:20.496 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,333 sec +00:28:20.505 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A +00:28:20.506 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D +00:28:20.506 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left +00:28:20.506 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right +00:28:20.507 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png +00:28:20.511 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf +00:28:20.519 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png +00:28:20.521 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 +00:28:20.521 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 +00:28:20.523 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R +00:28:20.523 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 +00:28:20.524 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf +00:28:20.526 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop +00:28:20.526 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop +00:28:20.527 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game +00:28:20.528 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +00:28:20.535 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf +00:28:20.540 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene +00:28:20.540 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene +00:28:20.540 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game +00:28:20.540 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene +00:28:20.540 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world +00:28:20.541 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world +00:28:20.542 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Initializing game +00:28:20.592 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory +00:28:20.593 [FXGL Background Thread 1 ] INFO FXGLApplication - Game initialization took: 0,051 sec +00:28:20.656 [JavaFX Application Thread] DEBUG Input - Clearing active input actions +00:28:20.661 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene +00:28:20.661 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene +00:28:23.472 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables +00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] +00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 +00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 +00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png +00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER +00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] +00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE +00:28:23.474 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty +00:28:23.474 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] +00:28:23.474 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) +00:28:23.474 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] +00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] +00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] +00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] +00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] +00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] +00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] +00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf +00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true +00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false +00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ +00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@1ff824d5 +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 +00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - Logging services +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService +00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService +00:28:38.266 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL +00:28:38.266 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop +00:28:38.266 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data +00:28:38.268 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle +00:28:38.269 [JavaFX Application Thread] DEBUG Async - Shutting down background threads +00:28:38.270 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window +00:28:38.281 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java b/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java index 2dcebeb..4e250c5 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java @@ -4,6 +4,7 @@ import com.almasb.fxgl.entity.Entity; import com.github.codestorm.bounceverse.components.base.BehaviorComponent; import com.github.codestorm.bounceverse.components.brick.Brick; +import com.github.codestorm.bounceverse.components.brick.properties.BrickHealth; import com.github.codestorm.bounceverse.tags.ForBrick; import com.github.codestorm.bounceverse.tags.Optional; import java.util.List; @@ -13,8 +14,11 @@ * *

BrickExplode

* - *

Lớp này biểu diễn hành vi nổ của viên gạch. Khi viên gạch bị phá hủy, nó sẽ kích hoạt hiệu ứng - * nổ, có thể gây sát thương đến các viên gạch xung quanh trong bán kính xác định. + *

+ * Lớp này biểu diễn hành vi nổ của viên gạch. Khi viên gạch bị phá hủy, nó sẽ + * kích hoạt hiệu ứng + * nổ, có thể gây sát thương đến các viên gạch xung quanh trong bán kính xác + * định. */ public final class BrickExplode extends BehaviorComponent implements ForBrick, Optional { public static final int DEFAULT_EXPLODE_RADIUS = 1; @@ -23,7 +27,8 @@ public final class BrickExplode extends BehaviorComponent implements ForBrick, O /** * Triggers the explosion effect of this brick. * - *

This method can be extended to apply damage to surrounding bricks + *

+ * This method can be extended to apply damage to surrounding bricks */ private void explode() { double cx = getEntity().getCenter().getX(); @@ -31,18 +36,28 @@ private void explode() { List entities = FXGL.getGameWorld().getEntities(); for (var entity : entities) { - if (entity == getEntity()) continue; - if (!entity.hasComponent(Brick.class)) continue; + if (entity == getEntity()) + continue; + if (!entity.hasComponent(Brick.class)) + continue; - var brick = entity.getComponent(Brick.class); double ex = entity.getCenter().getX(); double ey = entity.getCenter().getY(); double dx = Math.abs(ex - cx) / getEntity().getWidth(); double dy = Math.abs(ey - cy) / getEntity().getHeight(); - if (dx <= explodeRadius && dy <= explodeRadius) { - // TODO: Make Explode + if (Math.hypot(dx, dy) <= explodeRadius) { + entity.getComponentOptional(BrickHealth.class) + .ifPresent(health -> { + // Giảm máu + health.damage(1); + + // Nếu máu <= 0 thì cho nổ tiếp (chain reaction) + if (health.isDead() && entity.hasComponent(BrickExplode.class)) { + entity.getComponent(BrickExplode.class).explode(); + } + }); } } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java b/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java index 628126f..9b53af7 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java @@ -1,5 +1,6 @@ package com.github.codestorm.bounceverse.components.brick.properties; +import com.almasb.fxgl.dsl.components.HealthIntComponent; import com.github.codestorm.bounceverse.components.base.properties.Health; import com.github.codestorm.bounceverse.tags.ForBrick; @@ -8,23 +9,32 @@ * *

BrickHealth

* - *

Lớp này đại diện cho thuộc tính HP của Viên gạch. + *

+ * Lớp này đại diện cho thuộc tính HP của Viên gạch. */ public final class BrickHealth extends Health implements ForBrick { public BrickHealth(int maxHealth) { super(maxHealth); } - // private void updateColor() { - // var ratio = getHealth().getValuePercent() / 100; - // Color dimmed = baseColor.deriveColor(0, 1, 0.6 + 0.4 * ratio, 1); - // view.setFill(dimmed); - // view.setStroke(Color.BLACK); - // } - @Override public void onUpdate(double tpf) { super.onUpdate(tpf); // updateColor here } + + public void damage(int amount) { + if (amount <= 0) + return; + HealthIntComponent h = getHealth(); + + if (h.isZero()) + return; + + h.damage(amount); + } + + public boolean isDead() { + return getHealth().isZero(); + } } diff --git a/system/Readme.txt b/system/Readme.txt new file mode 100644 index 0000000..6578c70 --- /dev/null +++ b/system/Readme.txt @@ -0,0 +1 @@ +This directory contains FXGL system data files. \ No newline at end of file diff --git a/system/fxgl.bundle b/system/fxgl.bundle new file mode 100644 index 0000000000000000000000000000000000000000..a8ad53e505c87b8d3adfd6fd44deaed075b338ec GIT binary patch literal 204 zcmXYrJr06E6oj7$@u%`9@eVf20Vp&Us0mg!mOf#HHOns9eJJrvUcz_+Tkqfht-;|rcOFpqW4Q08b)>|CXi#oBOYxe+ME9Z6`#R;5ZLhgKa2oCw?m2??gr1+VCr zB&5GVo9(a&>QZ6O2_|hRQKkN#j8JJ%74_t}VOYbkKjZa2&)4ku?t&A-P-;v Date: Thu, 9 Oct 2025 17:43:36 +0700 Subject: [PATCH 24/53] refactor: reorganize component structure and improve entity tagging (#12) * refactor: reorganize component structure and improve entity tagging - Added new classes for Ball, BrickDrop, BrickExplode, and BrickHealth to enhance gameplay mechanics (introducing new behaviors and properties). - Updated .gitignore to include additional files and directories for better project management. - Adjusted BrickFactory to streamline brick creation process. * refactor: enhance BrickFactory to include entity type for bricks Added EntityType.BRICK to the newBrick method for better entity classification. Updated documentation for OptionalTag to correct a typo. --- .gitignore | 17 +++++++++- .idea/misc.xml | 9 ++++++ settings.gradle | 2 +- .../codestorm/bounceverse/Bounceverse.java | 13 +++++++- .../components/{ => _old}/ball/Ball.java | 9 +++--- .../{ => _old}/base/EntityComponent.java | 7 ++-- .../{ => _old}/paddle/ExpendPaddle.java | 2 +- .../{ => _old}/paddle/LaserPaddle.java | 2 +- .../components/{ => _old}/paddle/Paddle.java | 2 +- .../{ => _old}/paddle/ShrinkPaddle.java | 2 +- .../{ => _old}/powerup/PowerUp.java | 4 +-- .../brick}/BrickDrop.java | 15 +++++---- .../brick}/BrickExplode.java | 19 +++++------ .../bounceverse/components/brick/Brick.java | 25 --------------- .../{base => }/properties/Health.java | 9 +++--- .../{base => }/properties/Shield.java | 10 +++--- .../brick}/BrickHealth.java | 13 +++++--- .../brick}/BrickShield.java | 11 ++++--- .../bounceverse/data/tags/ComponentTag.java | 13 ++++++++ .../bounceverse/data/tags/EntityTag.java | 13 ++++++++ .../bounceverse/data/tags/RequirementTag.java | 11 +++++++ .../codestorm/bounceverse/data/tags/Tag.java | 11 +++++++ .../tags/components}/BehaviorComponent.java | 7 ++-- .../tags/components}/PropertyComponent.java | 7 ++-- .../data/tags/entities/ForBall.java | 13 ++++++++ .../data/tags/entities/ForBrick.java | 13 ++++++++ .../data/tags/entities/ForPaddle.java | 13 ++++++++ .../data/tags/entities/ForPowerUp.java | 13 ++++++++ .../data/tags/requirements/OptionalTag.java | 12 +++++++ .../data/tags/requirements/RequiredTag.java | 18 +++++++++++ .../bounceverse/data/types/EntityType.java | 24 ++++++++++++++ .../bounceverse/data/types/Side.java | 6 ++-- .../bounceverse/factory/BrickFactory.java | 32 +++++++++++-------- .../codestorm/bounceverse/tags/ForBrick.java | 7 ---- .../codestorm/bounceverse/tags/Optional.java | 8 ----- 35 files changed, 278 insertions(+), 114 deletions(-) create mode 100644 .idea/misc.xml rename src/main/java/com/github/codestorm/bounceverse/components/{ => _old}/ball/Ball.java (91%) rename src/main/java/com/github/codestorm/bounceverse/components/{ => _old}/base/EntityComponent.java (86%) rename src/main/java/com/github/codestorm/bounceverse/components/{ => _old}/paddle/ExpendPaddle.java (86%) rename src/main/java/com/github/codestorm/bounceverse/components/{ => _old}/paddle/LaserPaddle.java (92%) rename src/main/java/com/github/codestorm/bounceverse/components/{ => _old}/paddle/Paddle.java (95%) rename src/main/java/com/github/codestorm/bounceverse/components/{ => _old}/paddle/ShrinkPaddle.java (86%) rename src/main/java/com/github/codestorm/bounceverse/components/{ => _old}/powerup/PowerUp.java (97%) rename src/main/java/com/github/codestorm/bounceverse/components/{brick/behaviors => behaviors/brick}/BrickDrop.java (52%) rename src/main/java/com/github/codestorm/bounceverse/components/{brick/behaviors => behaviors/brick}/BrickExplode.java (72%) delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/brick/Brick.java rename src/main/java/com/github/codestorm/bounceverse/components/{base => }/properties/Health.java (72%) rename src/main/java/com/github/codestorm/bounceverse/components/{base => }/properties/Shield.java (72%) rename src/main/java/com/github/codestorm/bounceverse/components/{brick/properties => properties/brick}/BrickHealth.java (60%) rename src/main/java/com/github/codestorm/bounceverse/components/{brick/properties => properties/brick}/BrickShield.java (77%) create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/ComponentTag.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/EntityTag.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/RequirementTag.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/Tag.java rename src/main/java/com/github/codestorm/bounceverse/{components/base => data/tags/components}/BehaviorComponent.java (59%) rename src/main/java/com/github/codestorm/bounceverse/{components/base => data/tags/components}/PropertyComponent.java (60%) create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/RequiredTag.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/tags/ForBrick.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/tags/Optional.java diff --git a/.gitignore b/.gitignore index 7a603b2..291cfd1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +### Java .gradle build/ target/ @@ -38,4 +39,18 @@ bin/ .vscode/ ### Mac OS ### -.DS_Store \ No newline at end of file +.DS_Store + +### FXGL +.fxgl/ +system/ +save/ +log.txt +*.sav +*.dat +*.bin +**/cache/ +**/prefs/ + +### Workspace +/logs/ \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..fe1bc0e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 7508ff0..d1d3ea0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -rootProject.name = 'bounceverse' +rootProject.name = 'Bounceverse' diff --git a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java index e2556c8..1c5d4cb 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java +++ b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java @@ -6,6 +6,17 @@ import com.github.codestorm.bounceverse.factory.BrickFactory; import javafx.scene.paint.Color; +/** + * + * + *

{@link Bounceverse}

+ * + * Phần Hệ thống Chương trình chính của game, nơi mà mọi thứ bắt đầu... + * + *

Game {@link Bounceverse} được lấy cảm hứng từ game Arkanoid nổi tiếng, nơi người chơi điều + * khiển một thanh để đỡ bóng và phá vỡ các viên gạch. Mục tiêu của game là phá vỡ tất cả các viên + * gạch và dành được điểm số cao nhất. Nhưng liệu mọi thứ chỉ đơn giản như vậy? + */ public final class Bounceverse extends GameApplication { public static final String name = "Bounceverse"; @@ -21,7 +32,7 @@ protected void initGame() { FXGL.getGameWorld().addEntityFactory(new BrickFactory()); var brick1 = FXGL.spawn("normalBrick", 100, 100); - var brick2 = FXGL.spawn("normalBrick", 100, 100); + var brick2 = FXGL.spawn("normalBrick", 200, 200); } @Override diff --git a/src/main/java/com/github/codestorm/bounceverse/components/ball/Ball.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/ball/Ball.java similarity index 91% rename from src/main/java/com/github/codestorm/bounceverse/components/ball/Ball.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/ball/Ball.java index 10a90cb..7095532 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/ball/Ball.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/ball/Ball.java @@ -1,13 +1,12 @@ -package com.github.codestorm.bounceverse.components.ball; +package com.github.codestorm.bounceverse.components._old.ball; /** * * - *

Ball

+ *

{@link Ball}

* - * Ball is a player-controlled object used to hit other objects via the {@link - * com.github.codestorm.bounceverse.paddle.Paddle}. A ball has position (x, y), velocity (vx, vy), - * and a radius. + * Ball is a player-controlled object used to hit other objects via the Paddle. A ball has position + * (x, y), velocity (vx, vy), and a radius. * *

This class provides utility methods for resetting position, setting velocity, checking bounds, * and accessing attributes. Subclasses must implement movement and bounce behaviors. diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/EntityComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java similarity index 86% rename from src/main/java/com/github/codestorm/bounceverse/components/base/EntityComponent.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java index 4b2ae6c..57c47c7 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/base/EntityComponent.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java @@ -1,12 +1,13 @@ -package com.github.codestorm.bounceverse.components.base; +package com.github.codestorm.bounceverse.components._old.base; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; /** * * - *

EntityComponent

+ *

{@link EntityComponent}

* *

Lớp này đại diện cho các {@link Component} chung của {@link Entity} như là một Component. Sau * khi kế thừa, bên trong nên có các Component buộc cần phải có của Entity, đồng thời thêm Component @@ -21,6 +22,6 @@ * inheritance. Ngoài ra ta lại cần nhu cầu xác định kiểu của Entity một cách chặt chẽ nữa. Vậy * nên, một thuộc tính kiểu trong Entity như này là cần thiết. * - * @see com.github.codestorm.bounceverse.tags.Optional + * @see OptionalTag */ public abstract class EntityComponent extends Component {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/paddle/ExpendPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ExpendPaddle.java similarity index 86% rename from src/main/java/com/github/codestorm/bounceverse/components/paddle/ExpendPaddle.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ExpendPaddle.java index 07f71f2..2fd0d92 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/paddle/ExpendPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ExpendPaddle.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.components.paddle; +package com.github.codestorm.bounceverse.components._old.paddle; /** A special type of {@link Paddle} that is wider than the normal paddle. */ public class ExpendPaddle extends Paddle { diff --git a/src/main/java/com/github/codestorm/bounceverse/components/paddle/LaserPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/LaserPaddle.java similarity index 92% rename from src/main/java/com/github/codestorm/bounceverse/components/paddle/LaserPaddle.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/LaserPaddle.java index 9923395..6653385 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/paddle/LaserPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/LaserPaddle.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.components.paddle; +package com.github.codestorm.bounceverse.components._old.paddle; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/github/codestorm/bounceverse/components/paddle/Paddle.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/Paddle.java similarity index 95% rename from src/main/java/com/github/codestorm/bounceverse/components/paddle/Paddle.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/Paddle.java index b2e9853..882958f 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/paddle/Paddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/Paddle.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.components.paddle; +package com.github.codestorm.bounceverse.components._old.paddle; /** * Represents the paddle controlled by the player in the game. diff --git a/src/main/java/com/github/codestorm/bounceverse/components/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ShrinkPaddle.java similarity index 86% rename from src/main/java/com/github/codestorm/bounceverse/components/paddle/ShrinkPaddle.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ShrinkPaddle.java index cce53ea..a8ca334 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/paddle/ShrinkPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ShrinkPaddle.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.components.paddle; +package com.github.codestorm.bounceverse.components._old.paddle; /** A special type of {@link Paddle} that is narrower than the normal paddle. */ public class ShrinkPaddle extends Paddle { diff --git a/src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java similarity index 97% rename from src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java index a325e31..987682d 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/powerup/PowerUp.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.components.powerup; +package com.github.codestorm.bounceverse.components._old.powerup; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.time.TimerAction; @@ -8,7 +8,7 @@ /** * * - *

PowerUp

+ *

{@link PowerUp}

* * PowerUps provide special effects and abilities to playable objects. They are designed to * update based on events (lazy-update). diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickDrop.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java similarity index 52% rename from src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickDrop.java rename to src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java index a35840f..d8fffe5 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickDrop.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java @@ -1,19 +1,20 @@ -package com.github.codestorm.bounceverse.components.brick.behaviors; +package com.github.codestorm.bounceverse.components.behaviors.brick; -import com.github.codestorm.bounceverse.components.base.BehaviorComponent; -import com.github.codestorm.bounceverse.components.base.EntityComponent; -import com.github.codestorm.bounceverse.tags.ForBrick; -import com.github.codestorm.bounceverse.tags.Optional; +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components._old.base.EntityComponent; +import com.github.codestorm.bounceverse.data.tags.components.BehaviorComponent; +import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; +import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; import java.util.List; /** * * - *

BrickDrop

+ *

{@link BrickDrop}

* * Lớp này biểu diễn hành vi rơi ra vật phẩm của Viên gạch sau khi bị phá hủy. */ -public final class BrickDrop extends BehaviorComponent implements ForBrick, Optional { +public final class BrickDrop extends Component implements BehaviorComponent, ForBrick, OptionalTag { private List items; /** Hành động rơi ra vật phẩm. */ diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java similarity index 72% rename from src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java rename to src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java index 2dcebeb..a60869b 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java @@ -1,22 +1,24 @@ -package com.github.codestorm.bounceverse.components.brick.behaviors; +package com.github.codestorm.bounceverse.components.behaviors.brick; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; -import com.github.codestorm.bounceverse.components.base.BehaviorComponent; -import com.github.codestorm.bounceverse.components.brick.Brick; -import com.github.codestorm.bounceverse.tags.ForBrick; -import com.github.codestorm.bounceverse.tags.Optional; +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.components.BehaviorComponent; +import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; +import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; +import com.github.codestorm.bounceverse.data.types.EntityType; import java.util.List; /** * * - *

BrickExplode

+ *

{@link BrickExplode}

* *

Lớp này biểu diễn hành vi nổ của viên gạch. Khi viên gạch bị phá hủy, nó sẽ kích hoạt hiệu ứng * nổ, có thể gây sát thương đến các viên gạch xung quanh trong bán kính xác định. */ -public final class BrickExplode extends BehaviorComponent implements ForBrick, Optional { +public final class BrickExplode extends Component + implements BehaviorComponent, ForBrick, OptionalTag { public static final int DEFAULT_EXPLODE_RADIUS = 1; private int explodeRadius; @@ -32,9 +34,8 @@ private void explode() { List entities = FXGL.getGameWorld().getEntities(); for (var entity : entities) { if (entity == getEntity()) continue; - if (!entity.hasComponent(Brick.class)) continue; + if (!entity.isType(EntityType.BRICK)) continue; - var brick = entity.getComponent(Brick.class); double ex = entity.getCenter().getX(); double ey = entity.getCenter().getY(); diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/Brick.java b/src/main/java/com/github/codestorm/bounceverse/components/brick/Brick.java deleted file mode 100644 index fbf7458..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/brick/Brick.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.github.codestorm.bounceverse.components.brick; - -import com.github.codestorm.bounceverse.components.base.EntityComponent; -import com.github.codestorm.bounceverse.components.brick.properties.BrickHealth; - -/** - * - * - *

Brick

- * - *

Lớp này đại diện cho Viên gạch trong trò chơi. - */ -public final class Brick extends EntityComponent { - private final BrickHealth health; - - @Override - public void onAdded() { - super.onAdded(); - entity.addComponent(health); - } - - public Brick(BrickHealth health) { - this.health = health; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Health.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java similarity index 72% rename from src/main/java/com/github/codestorm/bounceverse/components/base/properties/Health.java rename to src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java index 175a94f..1e0f410 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Health.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java @@ -1,16 +1,17 @@ -package com.github.codestorm.bounceverse.components.base.properties; +package com.github.codestorm.bounceverse.components.properties; import com.almasb.fxgl.dsl.components.HealthIntComponent; -import com.github.codestorm.bounceverse.components.base.PropertyComponent; +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; /** * * - *

Health

+ *

{@link Health}

* *

Lớp này đại diện cho thuộc tính HP của Entity. Khi HP về 0, Entity sẽ bị xóa khỏi thế giới. */ -public abstract class Health extends PropertyComponent { +public abstract class Health extends Component implements PropertyComponent { private final HealthIntComponent health; public Health(int maxHealth) { diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Shield.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java similarity index 72% rename from src/main/java/com/github/codestorm/bounceverse/components/base/properties/Shield.java rename to src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java index 6214439..e680715 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/base/properties/Shield.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java @@ -1,20 +1,20 @@ -package com.github.codestorm.bounceverse.components.base.properties; +package com.github.codestorm.bounceverse.components.properties; -import com.github.codestorm.bounceverse.components.base.PropertyComponent; +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; import com.github.codestorm.bounceverse.data.types.Side; -import com.github.codestorm.bounceverse.tags.Optional; import java.util.Arrays; import java.util.HashSet; /** * * - *

Shield

+ *

{@link Shield}

* *

Lớp này đại diện cho Khiên bảo vệ Entity. Khiên có thể bảo vệ Entity từ một hoặc nhiều phía * khỏi bị tấn công. */ -public abstract class Shield extends PropertyComponent implements Optional { +public abstract class Shield extends Component implements PropertyComponent { private HashSet sides = new HashSet<>(); public HashSet getSides() { diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java similarity index 60% rename from src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java rename to src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java index 628126f..5df2c7a 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java @@ -1,16 +1,19 @@ -package com.github.codestorm.bounceverse.components.brick.properties; +package com.github.codestorm.bounceverse.components.properties.brick; -import com.github.codestorm.bounceverse.components.base.properties.Health; -import com.github.codestorm.bounceverse.tags.ForBrick; +import com.almasb.fxgl.entity.component.CoreComponent; +import com.github.codestorm.bounceverse.components.properties.Health; +import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; +import com.github.codestorm.bounceverse.data.tags.requirements.RequiredTag; /** * * - *

BrickHealth

+ *

{@link BrickHealth}

* *

Lớp này đại diện cho thuộc tính HP của Viên gạch. */ -public final class BrickHealth extends Health implements ForBrick { +@CoreComponent +public final class BrickHealth extends Health implements ForBrick, RequiredTag { public BrickHealth(int maxHealth) { super(maxHealth); } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickShield.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java similarity index 77% rename from src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickShield.java rename to src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java index 8a84f29..66101f0 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickShield.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java @@ -1,17 +1,18 @@ -package com.github.codestorm.bounceverse.components.brick.properties; +package com.github.codestorm.bounceverse.components.properties.brick; -import com.github.codestorm.bounceverse.components.base.properties.Shield; +import com.github.codestorm.bounceverse.components.properties.Shield; +import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; +import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; import com.github.codestorm.bounceverse.data.types.Side; -import com.github.codestorm.bounceverse.tags.ForBrick; /** * * - *

BrickShield

+ *

{@link BrickShield}

* *

Lớp này đại diện cho Khiên bảo vệ Viên gạch. */ -public final class BrickShield extends Shield implements ForBrick { +public final class BrickShield extends Shield implements ForBrick, OptionalTag { private static final int BONUS_SCORE = 20; public BrickShield() {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/ComponentTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/ComponentTag.java new file mode 100644 index 0000000..b443080 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/ComponentTag.java @@ -0,0 +1,13 @@ +package com.github.codestorm.bounceverse.data.tags; + +/** + * + * + *

{@link ComponentTag}

+ * + *

Các nhãn về loại của {@link com.almasb.fxgl.entity.component.Component} trong game. + * + *

Đọc thêm tài liệu về Component ở đây. + */ +public non-sealed interface ComponentTag extends Tag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/EntityTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/EntityTag.java new file mode 100644 index 0000000..18ee51f --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/EntityTag.java @@ -0,0 +1,13 @@ +package com.github.codestorm.bounceverse.data.tags; + +/** + * + * + *

{@link EntityTag}

+ * + *

Các nhãn về loại của {@link com.almasb.fxgl.entity.Entity} trong game. + * + *

Đọc thêm tài liệu về Entity ở đây. + */ +public non-sealed interface EntityTag extends Tag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/RequirementTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/RequirementTag.java new file mode 100644 index 0000000..10b98b3 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/RequirementTag.java @@ -0,0 +1,11 @@ +package com.github.codestorm.bounceverse.data.tags; + +/** + * + * + *

{@link RequirementTag}

+ * + *

Các nhãn về tính yêu cầu phải có hay không của {@link + * com.almasb.fxgl.entity.component.Component} trong Entity. + */ +public non-sealed interface RequirementTag extends Tag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/Tag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/Tag.java new file mode 100644 index 0000000..9e00894 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/Tag.java @@ -0,0 +1,11 @@ +package com.github.codestorm.bounceverse.data.tags; + +/** + * + * + *

{@link Tag}

+ * + *

Tag cho class, được dùng để đánh dấu class theo tính chất. Thường được sử dụng thông qua + * generic. + */ +public sealed interface Tag permits ComponentTag, EntityTag, RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/BehaviorComponent.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/components/BehaviorComponent.java similarity index 59% rename from src/main/java/com/github/codestorm/bounceverse/components/base/BehaviorComponent.java rename to src/main/java/com/github/codestorm/bounceverse/data/tags/components/BehaviorComponent.java index 32baf94..590af66 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/base/BehaviorComponent.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/components/BehaviorComponent.java @@ -1,15 +1,16 @@ -package com.github.codestorm.bounceverse.components.base; +package com.github.codestorm.bounceverse.data.tags.components; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.ComponentTag; /** * * - *

BehaviorComponent

+ *

{@link BehaviorComponent}

* *

Lớp này đại diện cho một {@link Component} biểu diễn * hành vi (behavior) của {@link Entity}. */ -public abstract class BehaviorComponent extends Component {} +public interface BehaviorComponent extends ComponentTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/base/PropertyComponent.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/components/PropertyComponent.java similarity index 60% rename from src/main/java/com/github/codestorm/bounceverse/components/base/PropertyComponent.java rename to src/main/java/com/github/codestorm/bounceverse/data/tags/components/PropertyComponent.java index a218986..ec635cc 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/base/PropertyComponent.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/components/PropertyComponent.java @@ -1,15 +1,16 @@ -package com.github.codestorm.bounceverse.components.base; +package com.github.codestorm.bounceverse.data.tags.components; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.ComponentTag; /** * * - *

PropertyComponent

+ *

{@link PropertyComponent}

* *

Lớp này đại diện cho một {@link Component} biểu diễn dữ * liệu (data/property) của {@link Entity}. */ -public abstract class PropertyComponent extends Component {} +public interface PropertyComponent extends ComponentTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java new file mode 100644 index 0000000..d584326 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java @@ -0,0 +1,13 @@ +package com.github.codestorm.bounceverse.data.tags.entities; + +import com.github.codestorm.bounceverse.data.tags.EntityTag; + +/** + * + * + *

{@link ForBall}

+ * + * Nhãn cho các component có thể gắn với entity kiểu {@link + * com.github.codestorm.bounceverse.data.types.EntityType#BALL}. + */ +public interface ForBall extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java new file mode 100644 index 0000000..a530a3a --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java @@ -0,0 +1,13 @@ +package com.github.codestorm.bounceverse.data.tags.entities; + +import com.github.codestorm.bounceverse.data.tags.EntityTag; + +/** + * + * + *

{@link ForBrick}

+ * + * Nhãn cho các component có thể gắn với entity kiểu {@link + * com.github.codestorm.bounceverse.data.types.EntityType#BRICK}. + */ +public interface ForBrick extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java new file mode 100644 index 0000000..e20768e --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java @@ -0,0 +1,13 @@ +package com.github.codestorm.bounceverse.data.tags.entities; + +import com.github.codestorm.bounceverse.data.tags.EntityTag; + +/** + * + * + *

{@link ForPaddle}

+ * + * Nhãn cho các component có thể gắn với entity kiểu {@link + * com.github.codestorm.bounceverse.data.types.EntityType#PADDLE}. + */ +public interface ForPaddle extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java new file mode 100644 index 0000000..348cb19 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java @@ -0,0 +1,13 @@ +package com.github.codestorm.bounceverse.data.tags.entities; + +import com.github.codestorm.bounceverse.data.tags.EntityTag; + +/** + * + * + *

{@link ForPowerUp}

+ * + * Nhãn cho các component có thể gắn với entity kiểu {@link + * com.github.codestorm.bounceverse.data.types.EntityType#POWER_UP}. + */ +public interface ForPowerUp extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java new file mode 100644 index 0000000..3e4470b --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java @@ -0,0 +1,12 @@ +package com.github.codestorm.bounceverse.data.tags.requirements; + +import com.github.codestorm.bounceverse.data.tags.RequirementTag; + +/** + * + * + *

{@link OptionalTag}

+ * + * Nhãn cho các thành phần không gắn liền vĩnh viễn với đối tượng. + */ +public interface OptionalTag extends RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/RequiredTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/RequiredTag.java new file mode 100644 index 0000000..641e276 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/RequiredTag.java @@ -0,0 +1,18 @@ +package com.github.codestorm.bounceverse.data.tags.requirements; + +import com.github.codestorm.bounceverse.data.tags.RequirementTag; + +/** + * + * + *

{@link RequiredTag}

+ * + * Nhãn cho các thành phần yêu cầu phải có từ khi khởi tạo {@link com.almasb.fxgl.entity.Entity} và + * gắn liền với đối tượng đó. + * + *

Chú ý: + * + *

> Hãy thêm annotation {@link com.almasb.fxgl.entity.component.CoreComponent} vào final + * component (tức component được trực tiếp gắn với entity). + */ +public interface RequiredTag extends RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java new file mode 100644 index 0000000..4334167 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java @@ -0,0 +1,24 @@ +package com.github.codestorm.bounceverse.data.types; + +import com.almasb.fxgl.entity.Entity; + +/** + * + * + *

{@link EntityType}

+ * + * Loại của {@link com.almasb.fxgl.entity.Entity}, dùng để phân biệt giữa các entity có loại khác + * nhau. + * + *

Sử dụng {@link com.almasb.fxgl.dsl.EntityBuilder#type(Enum)} để gán cho entity và {@link + * Entity#getType()} để truy xuất, hoặc {@link Entity#isType(Object)} để kiểm tra + * + * @see com.almasb.fxgl.dsl.EntityBuilder + * @see Entity + */ +public enum EntityType { + BRICK, + PADDLE, + BALL, + POWER_UP +} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java b/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java index 3b62ad7..ce9de16 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java @@ -3,9 +3,11 @@ /** * * - *

Side

+ *

{@link Side}

* - *

Đại diện cho các cạnh của đối tượng dạng hình chữ nhật. + *

Đại diện cho các cạnh của đối tượng dạng {@link javafx.scene.shape.Rectangle}. + * + * @see javafx.scene.shape.Rectangle */ public enum Side { LEFT, diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java index c8a0f0e..52b6f06 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java @@ -6,10 +6,10 @@ import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.brick.Brick; -import com.github.codestorm.bounceverse.components.brick.properties.BrickHealth; -import com.github.codestorm.bounceverse.tags.ForBrick; -import com.github.codestorm.bounceverse.tags.Optional; +import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; +import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; +import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; +import com.github.codestorm.bounceverse.data.types.EntityType; import javafx.geometry.Point2D; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; @@ -18,15 +18,16 @@ /** * * - *

BrickFactory

+ *

{@link BrickFactory}

* - *

Factory để tạo các entity Brick trong trò chơi. + *

Factory để tạo các entity loại {@link + * com.github.codestorm.bounceverse.data.types.EntityType#BRICK} trong trò chơi. * * @see EntityFactory */ public final class BrickFactory implements EntityFactory { - private static final int DEFAULT_X = 80; - private static final int DEFAULT_Y = 30; + private static final int DEFAULT_WIDTH = 80; + private static final int DEFAULT_HEIGHT = 30; private static final Color DEFAULT_COLOR = Color.LIGHTBLUE; private static final int DEFAULT_HP = 1; @@ -41,12 +42,14 @@ public final class BrickFactory implements EntityFactory { * @param Component không bắt buộc phải có của Brick */ @NotNull @SafeVarargs - private static Entity newBrick( - Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { + private static + Entity newBrick( + Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { return FXGL.entityBuilder() + .type(EntityType.BRICK) .at(pos) .viewWithBBox(view) - .with(new Brick(new BrickHealth(hp))) + .with(new BrickHealth(hp)) .with(components) .build(); } @@ -61,9 +64,10 @@ private static * @param Component không bắt buộc phải có của Brick */ @NotNull @SafeVarargs - private static Entity newBrick( - Point2D pos, int hp, OptionalBrickComponent... components) { - return newBrick(pos, hp, new Rectangle(DEFAULT_X, DEFAULT_Y, DEFAULT_COLOR), components); + private static + Entity newBrick(Point2D pos, int hp, OptionalBrickComponent... components) { + return newBrick( + pos, hp, new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_COLOR), components); } /** diff --git a/src/main/java/com/github/codestorm/bounceverse/tags/ForBrick.java b/src/main/java/com/github/codestorm/bounceverse/tags/ForBrick.java deleted file mode 100644 index 4dccdd7..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/tags/ForBrick.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.github.codestorm.bounceverse.tags; - -/** - * Nhãn cho các thành phần sử dụng trên {@link - * com.github.codestorm.bounceverse.components.brick.Brick}. - */ -public interface ForBrick {} diff --git a/src/main/java/com/github/codestorm/bounceverse/tags/Optional.java b/src/main/java/com/github/codestorm/bounceverse/tags/Optional.java deleted file mode 100644 index 740a0a3..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/tags/Optional.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.github.codestorm.bounceverse.tags; - -/** - * Nhãn cho các thành phần không yêu cầu có ngay từ khi khởi tạo Entity. - * - * @see com.github.codestorm.bounceverse.components.base.EntityComponent - */ -public interface Optional {} From c0e00af1044eebd2bcc6506a2ccf25514d66fc58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Sat, 11 Oct 2025 21:31:07 +0700 Subject: [PATCH 25/53] chore: remove unused logging dependencies from build.gradle Eliminated SLF4J and Logback dependencies as they are no longer required for the project. --- .idea/misc.xml | 1 + build.gradle | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index fe1bc0e..b861657 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,6 @@ + diff --git a/build.gradle b/build.gradle index 8327b8e..7490674 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,6 @@ dependencies { testImplementation 'org.junit.jupiter:junit-jupiter' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' implementation 'com.github.almasb:fxgl:21.1' - implementation 'org.slf4j:slf4j-api:2.0.17' - implementation 'ch.qos.logback:logback-classic:1.5.18' implementation 'com.google.guava:guava:33.5.0-jre' } From 91e1acadf69b69729322c47f7d1990ebbfca333d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Sat, 11 Oct 2025 21:34:53 +0700 Subject: [PATCH 26/53] chore: update output directory for build artifacts Changed the output directory from `release` to `out` in build.gradle and updated the artifact upload path in buildRelease.yml to reflect this change. --- .github/workflows/buildRelease.yml | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildRelease.yml b/.github/workflows/buildRelease.yml index 9e21fa6..a452107 100644 --- a/.github/workflows/buildRelease.yml +++ b/.github/workflows/buildRelease.yml @@ -31,4 +31,4 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v3 with: - path: release/*.jar + path: out/*.jar diff --git a/build.gradle b/build.gradle index 7490674..0525164 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ tasks.register('buildRelease', Jar) { archiveBaseName.set(project.name) archiveVersion.set(project.version) - destinationDirectory.set(file("./release")) + destinationDirectory.set(file("./out")) dependsOn test dependsOn configurations.runtimeClasspath From 007973356aead022c38c2c7d0df274f3da5835d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Mon, 13 Oct 2025 20:40:43 +0700 Subject: [PATCH 27/53] Add game systems template (#13) * feat: add configuration loading and game settings management Implement configuration loading from properties files to manage game settings dynamically. This includes setting the game title, version, and application mode based on the loaded configurations. Additionally, update the .gitignore to include new configuration files. * feat: implement game configuration loading and management Add structured loading of game configurations with separate classes for default options and system settings. This enhances the game's configurability and prepares for future expansion of settings management. * feat: add collision handling and launch options management Implement collision handling system and launch options for game configuration. This includes a new Collision class for managing collision logic and a LaunchOption class for parsing launch arguments (e.g., debug mode). * feat: enhance configuration loading with error handling Improve the loadConfigs method to throw an IOException when properties files cannot be opened (replaces assertion with exception handling). This ensures better error management during configuration loading. * feat: implement scene management and enhance collision handling - Added SceneFactory for managing game scenes (facilitates scene transitions). - Renamed Collision to CollisionSystem for clarity and improved structure. - Integrated credits loading into game settings (enhances user experience). --- .gitignore | 10 +-- .run/run.run.xml | 2 +- .../codestorm/bounceverse/Bounceverse.java | 77 +++++++++++++++- .../github/codestorm/bounceverse/Utils.java | 87 +++++++++++++++++++ .../bounceverse/factory/SceneFactory.java | 12 +++ .../bounceverse/scenes/MainMenu.java | 11 +++ .../bounceverse/systems/LaunchOption.java | 23 +++++ .../codestorm/bounceverse/systems/System.java | 21 +++++ .../systems/physics/CollisionSystem.java | 46 ++++++++++ src/main/resources/configs/default.properties | 2 + .../configs/system/settings.properties | 4 + src/main/resources/credits.txt | 13 +++ 12 files changed, 298 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/github/codestorm/bounceverse/Utils.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/factory/SceneFactory.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/scenes/MainMenu.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/systems/LaunchOption.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/systems/System.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java create mode 100644 src/main/resources/configs/default.properties create mode 100644 src/main/resources/configs/system/settings.properties create mode 100644 src/main/resources/credits.txt diff --git a/.gitignore b/.gitignore index 291cfd1..480ccad 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ target/ ### IntelliJ IDEA ### .idea/ +!.idea/misc.xml *.iws *.iml *.ipr @@ -43,14 +44,13 @@ bin/ ### FXGL .fxgl/ -system/ -save/ -log.txt +/save/ +/logs/ +/system/ *.sav *.dat *.bin **/cache/ **/prefs/ -### Workspace -/logs/ \ No newline at end of file +### Workspace \ No newline at end of file diff --git a/.run/run.run.xml b/.run/run.run.xml index 2aee537..d11c14d 100644 --- a/.run/run.run.xml +++ b/.run/run.run.xml @@ -4,7 +4,7 @@ diff --git a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java index 1c5d4cb..e26dc2f 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java +++ b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java @@ -1,9 +1,15 @@ package com.github.codestorm.bounceverse; +import com.almasb.fxgl.app.ApplicationMode; import com.almasb.fxgl.app.GameApplication; import com.almasb.fxgl.app.GameSettings; import com.almasb.fxgl.dsl.FXGL; import com.github.codestorm.bounceverse.factory.BrickFactory; +import com.github.codestorm.bounceverse.factory.SceneFactory; +import com.github.codestorm.bounceverse.systems.LaunchOption; +import com.github.codestorm.bounceverse.systems.physics.CollisionSystem; +import java.io.IOException; +import java.util.Properties; import javafx.scene.paint.Color; /** @@ -18,13 +24,70 @@ * gạch và dành được điểm số cao nhất. Nhưng liệu mọi thứ chỉ đơn giản như vậy? */ public final class Bounceverse extends GameApplication { - public static final String name = "Bounceverse"; + private static LaunchOption launchOption; + + /** + * Cấu hình game. + * + *

Sử dụng {@link #loadConfigs()} để load các config. + */ + private static final class Configs { + private static final String ROOT = "/configs/"; + + /** Cấu hình game bên trong hệ thống game. */ + private static final class System { + public static Properties settings; + + private System() {} + } + + /** Cấu hình game bên ngoài hệ thống game. */ + private static final class Options { + public static Properties DEFAULT; // Cấu hình mặc định của trò chơi + + private Options() {} + } + + /** + * Load game configs. + * + * @throws IOException if an error occurred when reading from the input stream. + */ + public static void loadConfigs() throws IOException { + Options.DEFAULT = Utils.IO.loadProperties(ROOT + "default.properties"); + System.settings = Utils.IO.loadProperties(ROOT + "system/settings.properties"); + } + + private Configs() {} + } @Override protected void initSettings(GameSettings settings) { - settings.setWidth(900); - settings.setHeight(600); - settings.setTitle(name); + try { + Configs.loadConfigs(); + } catch (IOException e) { + throw new RuntimeException(e); + } + // Basic + settings.setTitle(Configs.System.settings.getProperty("settings.name")); + settings.setVersion(Configs.System.settings.getProperty("settings.version")); + settings.setCredits(Utils.IO.readTextFile("credits.txt")); + settings.setApplicationMode( + Boolean.parseBoolean(Configs.System.settings.getProperty("settings.devMode")) + ? ApplicationMode.DEVELOPER + : (launchOption.isDebug()) + ? ApplicationMode.DEBUG + : ApplicationMode.RELEASE); + + // Display + settings.setWidth(Integer.parseInt(Configs.Options.DEFAULT.getProperty("width"))); + settings.setHeight(Integer.parseInt(Configs.Options.DEFAULT.getProperty("height"))); + settings.setFullScreenAllowed(true); + + // In-app + settings.setSceneFactory(new SceneFactory()); + settings.setMainMenuEnabled(true); + settings.setIntroEnabled(true); } @Override @@ -35,12 +98,18 @@ protected void initGame() { var brick2 = FXGL.spawn("normalBrick", 200, 200); } + @Override + protected void initPhysics() { + CollisionSystem.getInstance().apply(); + } + @Override protected void initUI() { FXGL.getGameScene().setBackgroundColor(Color.web("#2B2B2B")); } public static void main(String[] args) { + launchOption = new LaunchOption(args); launch(args); } } diff --git a/src/main/java/com/github/codestorm/bounceverse/Utils.java b/src/main/java/com/github/codestorm/bounceverse/Utils.java new file mode 100644 index 0000000..3f4d659 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/Utils.java @@ -0,0 +1,87 @@ +package com.github.codestorm.bounceverse; + +import java.io.IOException; +import java.io.InputStream; +import java.util.*; + +/** Utilities. */ +public final class Utils { + /** Input/Output utilities. */ + public static final class IO { + /** + * Load .properties file. + * + * @param path Relative path + * @return Parsed properties + * @throws IOException if an error occurred when reading from the input stream. + */ + public static Properties loadProperties(String path) throws IOException { + InputStream fileStream = IO.class.getResourceAsStream(path); + if (fileStream == null) { + throw new IOException("Cannot open InputStream in" + path); + } + + Properties prop = new Properties(); + prop.load(fileStream); + fileStream.close(); + return prop; + } + + /** + * Convert an array of key=value pairs into a hashmap. The string "key=" maps key onto "", + * while just "key" maps key onto null. The value may contain '=' characters, only the first + * "=" is a delimiter. + * + *

Source code from here. + * + * @param args command-line arguments in the key=value format (or just key= or key) + * @param defaults a map of default values, may be null. Mappings to null are not copied to + * the resulting map. + * @param whiteList if not null, the keys not present in this map cause an exception (and + * keys mapped to null are ok) + * @return a map that maps these keys onto the corresponding values. + */ + public static HashMap parseArgs( + String[] args, + HashMap defaults, + HashMap whiteList) { + // HashMap allows null values + HashMap res = new HashMap<>(); + if (defaults != null) { + for (Map.Entry e : defaults.entrySet()) { + if (e.getValue() != null) { + res.put(e.getKey(), e.getValue()); + } + } + } + for (String s : args) { + String[] kv = s.split("=", 2); + if (whiteList != null && !whiteList.containsKey(kv[0])) { + continue; + } + res.put(kv[0], kv.length < 2 ? null : kv[1]); + } + return res; + } + + /** + * Read text file (txt) and put all lines into {@link List}. + * + * @param path File path + * @return All lines in text file + */ + public static List readTextFile(String path) { + var res = new ArrayList(); + var scanner = new Scanner(path); + while (scanner.hasNext()) { + res.add(scanner.next()); + } + scanner.close(); + return res; + } + + private IO() {} + } + + private Utils() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/SceneFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/SceneFactory.java new file mode 100644 index 0000000..466f9fc --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/factory/SceneFactory.java @@ -0,0 +1,12 @@ +package com.github.codestorm.bounceverse.factory; + +import com.almasb.fxgl.app.scene.FXGLMenu; +import com.github.codestorm.bounceverse.scenes.MainMenu; +import org.jetbrains.annotations.NotNull; + +public class SceneFactory extends com.almasb.fxgl.app.scene.SceneFactory { + @NotNull @Override + public FXGLMenu newMainMenu() { + return new MainMenu(); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/scenes/MainMenu.java b/src/main/java/com/github/codestorm/bounceverse/scenes/MainMenu.java new file mode 100644 index 0000000..3c182d1 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/scenes/MainMenu.java @@ -0,0 +1,11 @@ +package com.github.codestorm.bounceverse.scenes; + +import com.almasb.fxgl.app.scene.FXGLDefaultMenu; +import com.almasb.fxgl.app.scene.MenuType; + +public class MainMenu extends FXGLDefaultMenu { + public MainMenu() { + super(MenuType.MAIN_MENU); + // TODO: Customize Main Menu + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/systems/LaunchOption.java b/src/main/java/com/github/codestorm/bounceverse/systems/LaunchOption.java new file mode 100644 index 0000000..7ee3686 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/systems/LaunchOption.java @@ -0,0 +1,23 @@ +package com.github.codestorm.bounceverse.systems; + +import com.github.codestorm.bounceverse.Utils; + +/** + * + * + *

{@link LaunchOption}

+ * + * Các tùy chọn khởi động được áp dụng trong game. + */ +public final class LaunchOption { + private boolean debug = false; + + public boolean isDebug() { + return debug; + } + + public LaunchOption(String... args) { + var map = Utils.IO.parseArgs(args, null, null); + debug = Boolean.parseBoolean(map.getOrDefault("debug", "false")); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/systems/System.java b/src/main/java/com/github/codestorm/bounceverse/systems/System.java new file mode 100644 index 0000000..ce2cbd4 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/systems/System.java @@ -0,0 +1,21 @@ +package com.github.codestorm.bounceverse.systems; + +/** + * + * + *

{@link System}

+ * + * Hệ thống logic trong game. Các lớp kế thừa nên thiết kế dựa trên (lazy-loaded) Singleton. + * + *

Tất cả logic của hệ thống được áp dụng thông qua {@link #apply()}. + */ +public abstract class System { + /** + * Áp dụng logic của hệ thống vào game. + * + *

Sử dụng trên {@link com.github.codestorm.bounceverse.Bounceverse} + */ + public abstract void apply(); + + protected System() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java b/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java new file mode 100644 index 0000000..eaeafe4 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java @@ -0,0 +1,46 @@ +package com.github.codestorm.bounceverse.systems.physics; + +import com.github.codestorm.bounceverse.systems.System; + +/** + * + * + *

{@link CollisionSystem}

+ * + * Hệ thống xử lý va chạm. + * + *

Đây là một Singleton, cần lấy instance thông qua {@link #getInstance()}. + * + * @see System + */ +public final class CollisionSystem extends System { + /** + * Lazy-loaded singleton holder. + * + *

Follow + * Initialization-on-demand holder idiom. + */ + private static final class Holder { + static final CollisionSystem INSTANCE = new CollisionSystem(); + } + + public static CollisionSystem getInstance() { + return Holder.INSTANCE; + } + + // ? Tạo các Group CollisionHandler ở đây (dùng composition) + + @Override + public void apply() { + // ? Viết các logic CollisionHandler ở đây. eg: + // getPhysicsWorld().addCollisionHandler(new CollisionHandler(EntityType.PLAYER, + // EntityType.COIN) { + // @Override + // protected void onCollisionBegin(Entity player, Entity coin) { + // coin.removeFromWorld(); + // } + // }); + } + + private CollisionSystem() {} +} diff --git a/src/main/resources/configs/default.properties b/src/main/resources/configs/default.properties new file mode 100644 index 0000000..5e394fb --- /dev/null +++ b/src/main/resources/configs/default.properties @@ -0,0 +1,2 @@ +width=1024 +height=768 \ No newline at end of file diff --git a/src/main/resources/configs/system/settings.properties b/src/main/resources/configs/system/settings.properties new file mode 100644 index 0000000..9977fd4 --- /dev/null +++ b/src/main/resources/configs/system/settings.properties @@ -0,0 +1,4 @@ +# settings +settings.name=Bounceverse +settings.version=1.0.0 +settings.devMode=true diff --git a/src/main/resources/credits.txt b/src/main/resources/credits.txt new file mode 100644 index 0000000..2b355fe --- /dev/null +++ b/src/main/resources/credits.txt @@ -0,0 +1,13 @@ +- Game - + +CodeStorm team + +Leader: +Mai Thành (@thnhmai06) + +Members: +Mạnh Tân (@ManhTanTran) +Minh Ngọc (@minngoc1213) +Anh Tuấn (@huynhtuan372) + +-o0o- \ No newline at end of file From a2d001029e2dba71c2e2b48fefcae8d07ce289ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Mon, 13 Oct 2025 20:47:56 +0700 Subject: [PATCH 28/53] chore: update project JDK language level to JDK_24_PREVIEW Modified the ProjectRootManager component in misc.xml to set the language level to JDK_24_PREVIEW for better compatibility with preview features. --- .idea/misc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index b861657..3b7dc99 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file From 9ae062feb98585ba240fd6e13645bebfe1bdbf8c Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 14 Oct 2025 14:57:05 +0700 Subject: [PATCH 29/53] feat(components): add new paddle behaviors and properties (Bullet, Width); refactor brick to components structure --- .../_old}/brick/BrickComponent.java | 3 +- .../_old}/brick/BrickFactory.java | 3 +- .../_old}/brick/ExplodeBrick.java | 6 ++- .../_old}/brick/PowerBrick.java | 2 +- .../_old}/brick/ProtectedBrick.java | 2 +- .../behaviors/paddle/ExpandPaddle.java | 34 ++++++++++++++ .../behaviors/paddle/ShrinkPaddle.java | 34 ++++++++++++++ .../components/properties/Bullet.java | 45 +++++++++++++++++++ .../components/properties/Width.java | 29 ++++++++++++ .../bounceverse/factory/BrickFactory.java | 23 +++++++--- .../bounceverse/gameManager/GameManager.java | 4 +- 11 files changed, 170 insertions(+), 15 deletions(-) rename src/main/java/com/github/codestorm/bounceverse/{ => components/_old}/brick/BrickComponent.java (97%) rename src/main/java/com/github/codestorm/bounceverse/{ => components/_old}/brick/BrickFactory.java (98%) rename src/main/java/com/github/codestorm/bounceverse/{ => components/_old}/brick/ExplodeBrick.java (96%) rename src/main/java/com/github/codestorm/bounceverse/{ => components/_old}/brick/PowerBrick.java (92%) rename src/main/java/com/github/codestorm/bounceverse/{ => components/_old}/brick/ProtectedBrick.java (93%) create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Bullet.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/BrickComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java similarity index 97% rename from src/main/java/com/github/codestorm/bounceverse/brick/BrickComponent.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java index 00f4fa0..9e37980 100644 --- a/src/main/java/com/github/codestorm/bounceverse/brick/BrickComponent.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java @@ -1,6 +1,7 @@ -package com.github.codestorm.bounceverse.brick; +package com.github.codestorm.bounceverse.components._old.brick; import com.almasb.fxgl.entity.component.Component; + import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java similarity index 98% rename from src/main/java/com/github/codestorm/bounceverse/brick/BrickFactory.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java index fe06937..5d75095 100644 --- a/src/main/java/com/github/codestorm/bounceverse/brick/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java @@ -1,8 +1,9 @@ -package com.github.codestorm.bounceverse.brick; +package com.github.codestorm.bounceverse.components._old.brick; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.EntityFactory; + import javafx.scene.Group; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/ExplodeBrick.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java similarity index 96% rename from src/main/java/com/github/codestorm/bounceverse/brick/ExplodeBrick.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java index 6067533..162968c 100644 --- a/src/main/java/com/github/codestorm/bounceverse/brick/ExplodeBrick.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java @@ -1,8 +1,10 @@ -package com.github.codestorm.bounceverse.brick; +package com.github.codestorm.bounceverse.components._old.brick; + +import java.util.List; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; -import java.util.List; + import javafx.scene.paint.Color; public class ExplodeBrick extends BrickComponent { diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/PowerBrick.java similarity index 92% rename from src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/brick/PowerBrick.java index 93eba23..4b05fed 100644 --- a/src/main/java/com/github/codestorm/bounceverse/brick/PowerBrick.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/PowerBrick.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.brick; +package com.github.codestorm.bounceverse.components._old.brick; import javafx.scene.paint.Color; diff --git a/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ProtectedBrick.java similarity index 93% rename from src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java rename to src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ProtectedBrick.java index 5f2e104..5bd66a0 100644 --- a/src/main/java/com/github/codestorm/bounceverse/brick/ProtectedBrick.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ProtectedBrick.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.brick; +package com.github.codestorm.bounceverse.components._old.brick; import javafx.scene.paint.Color; diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java new file mode 100644 index 0000000..a61a39f --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java @@ -0,0 +1,34 @@ +package com.github.codestorm.bounceverse.components.behaviors.paddle; + +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.properties.Width; +import com.github.codestorm.bounceverse.data.tags.components.BehaviorComponent; +import com.github.codestorm.bounceverse.data.tags.entities.ForPaddle; +import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; + +public class ExpandPaddle extends Component implements BehaviorComponent, ForPaddle, OptionalTag { + + private final double expandedWidth = 200; + private final double duration = 5.0; + private double timer = 0; + private boolean expanded = false; + + public void active() { + if (!expanded) { + entity.getComponent(Width.class).setWidth(expandedWidth); + expanded = true; + timer = 0; + } + } + + @Override + public void onUpdate(double tpf) { + if (expanded) { + timer += tpf; + if (timer >= duration) { + entity.getComponent(Width.class).resetWidth(); + expanded = false; + } + } + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java new file mode 100644 index 0000000..b270c35 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java @@ -0,0 +1,34 @@ +package com.github.codestorm.bounceverse.components.behaviors.paddle; + +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.properties.Width; +import com.github.codestorm.bounceverse.data.tags.components.BehaviorComponent; +import com.github.codestorm.bounceverse.data.tags.entities.ForPaddle; +import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; + +public class ShrinkPaddle extends Component implements BehaviorComponent, ForPaddle, OptionalTag { + + private final double shrinkedWidth = 60; + private final double duration = 5.0; + private double timer = 0; + private boolean shrinked = false; + + public void active() { + if (!shrinked) { + entity.getComponent(Width.class).setWidth(shrinkedWidth); + shrinked = true; + timer = 0; + } + } + + @Override + public void onUpdate(double tpf) { + if (shrinked) { + timer += tpf; + if (timer >= duration) { + entity.getComponent(Width.class).resetWidth(); + shrinked = false; + } + } + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Bullet.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Bullet.java new file mode 100644 index 0000000..8ece603 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Bullet.java @@ -0,0 +1,45 @@ +package com.github.codestorm.bounceverse.components.properties; + +import com.almasb.fxgl.entity.component.Component; + +public class Bullet extends Component { + + private final double cooldown; + private double timerCooldown = 0; + private final double duration; + private double activeTime = 0; + private boolean active = false; + + public Bullet(double cooldown, double duration) { + this.cooldown = cooldown; + this.duration = duration; + } + + public void active() { + active = true; + activeTime = 0; + timerCooldown = 0; + } + + @Override + public void onUpdate(double tpf) { + if (!active) { + return; + } + + activeTime += tpf; + timerCooldown -= tpf; + + if (activeTime >= duration) { + active = false; + } + } + + public boolean canShoot() { + return active && timerCooldown <= 0; + } + + public void shoot() { + timerCooldown = cooldown; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java new file mode 100644 index 0000000..43b8921 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java @@ -0,0 +1,29 @@ +package com.github.codestorm.bounceverse.components.properties; + +import com.almasb.fxgl.entity.component.Component; + +public class Width extends Component { + + private double originalWidth; + + @Override + public void onAdded() { + originalWidth = entity.getWidth(); + } + + public double getOriginalWidth() { + return originalWidth; + } + + public void setWidth(double width) { + entity.setScaleX(width / originalWidth); + } + + public double getWidth() { + return entity.getWidth(); + } + + public void resetWidth() { + entity.setScaleX(1.0); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java index 52b6f06..03d3ac7 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java @@ -1,5 +1,7 @@ package com.github.codestorm.bounceverse.factory; +import org.jetbrains.annotations.NotNull; + import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.EntityFactory; @@ -10,22 +12,24 @@ import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; import com.github.codestorm.bounceverse.data.types.EntityType; + import javafx.geometry.Point2D; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; -import org.jetbrains.annotations.NotNull; /** * * *

{@link BrickFactory}

* - *

Factory để tạo các entity loại {@link + *

+ * Factory để tạo các entity loại {@link * com.github.codestorm.bounceverse.data.types.EntityType#BRICK} trong trò chơi. * * @see EntityFactory */ public final class BrickFactory implements EntityFactory { + private static final int DEFAULT_WIDTH = 80; private static final int DEFAULT_HEIGHT = 30; private static final Color DEFAULT_COLOR = Color.LIGHTBLUE; @@ -39,9 +43,11 @@ public final class BrickFactory implements EntityFactory { * @param view Khung nhìn * @param components Các components tùy chọn * @return Entity Brick mới tạo - * @param Component không bắt buộc phải có của Brick + * @param Component không bắt buộc phải có của + * Brick */ - @NotNull @SafeVarargs + @NotNull + @SafeVarargs private static Entity newBrick( Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { @@ -61,9 +67,11 @@ Entity newBrick( * @param hp HP * @param components Các components tùy chọn * @return Entity Brick mới tạo - * @param Component không bắt buộc phải có của Brick + * @param Component không bắt buộc phải có của + * Brick */ - @NotNull @SafeVarargs + @NotNull + @SafeVarargs private static Entity newBrick(Point2D pos, int hp, OptionalBrickComponent... components) { return newBrick( @@ -76,7 +84,8 @@ Entity newBrick(Point2D pos, int hp, OptionalBrickComponent... components) { * @param pos Vị trí * @return Entity Brick mới tạo */ - @NotNull @Spawns("normalBrick") + @NotNull + @Spawns("normalBrick") public static Entity newNormalBrick(SpawnData pos) { return newBrick(new Point2D(pos.getX(), pos.getY()), DEFAULT_HP); } diff --git a/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java b/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java index 7d107af..7f800fd 100644 --- a/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java +++ b/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java @@ -3,8 +3,8 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.github.codestorm.bounceverse.ball.Ball; -import com.github.codestorm.bounceverse.brick.BrickComponent; -import com.github.codestorm.bounceverse.brick.BrickFactory; +import com.github.codestorm.bounceverse.components._old.brick.BrickComponent; +import com.github.codestorm.bounceverse.components._old.brick.BrickFactory; import com.github.codestorm.bounceverse.paddle.Paddle; import com.github.codestorm.bounceverse.powerup.PowerUp; import java.util.ArrayList; From 0b066f4242a1631b79a25d8136b26f119a238cdd Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 14 Oct 2025 18:55:26 +0700 Subject: [PATCH 30/53] refactor: migrate paddle and bullet systems to new structure --- .../codestorm/bounceverse/BounceVerseApp.java | 30 ------- .../codestorm/bounceverse/Bounceverse.java | 8 +- .../behaviors/brick/BrickExplode.java | 16 +--- .../behaviors/bullet/BulletBehavior.java | 31 +++++++ .../components/behaviors/bullet/Shoot.java | 62 +++++++++++++ .../behaviors/paddle/ExpandPaddle.java | 11 +-- .../behaviors/paddle/ShrinkPaddle.java | 10 +-- .../components/properties/Bullet.java | 45 ---------- .../components/properties/Width.java | 2 + .../properties/brick/BrickHealth.java | 5 -- .../bounceverse/data/types/EntityType.java | 3 +- .../bounceverse/factory/BrickFactory.java | 3 +- .../bounceverse/factory/BulletFactory.java | 28 ++++++ .../bounceverse/factory/PaddleFactory.java | 7 ++ .../bounceverse/gameManager/GameManager.java | 90 ------------------- .../bounceverse/paddle/BulletComponent.java | 20 ----- .../bounceverse/paddle/ExpandPaddle.java | 18 ---- .../bounceverse/paddle/LaserPaddle.java | 74 --------------- .../bounceverse/paddle/PaddleComponent.java | 60 ------------- .../bounceverse/paddle/PaddleFactory.java | 61 ------------- .../bounceverse/paddle/ShrinkPaddle.java | 19 ---- .../systems/physics/CollisionSystem.java | 38 +++++--- 22 files changed, 177 insertions(+), 464 deletions(-) delete mode 100644 src/main/java/com/github/codestorm/bounceverse/BounceVerseApp.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/BulletBehavior.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Bullet.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/BulletComponent.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ExpandPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/PaddleComponent.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/PaddleFactory.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java diff --git a/src/main/java/com/github/codestorm/bounceverse/BounceVerseApp.java b/src/main/java/com/github/codestorm/bounceverse/BounceVerseApp.java deleted file mode 100644 index a77f8c6..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/BounceVerseApp.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.github.codestorm.bounceverse; - -import com.almasb.fxgl.app.GameApplication; -import com.almasb.fxgl.app.GameSettings; -import com.almasb.fxgl.dsl.FXGL; -import com.github.codestorm.bounceverse.gameManager.GameManager; -import javafx.scene.paint.Color; - -public class BounceVerseApp extends GameApplication { - private GameManager gameManager; - - @Override - protected void initSettings(GameSettings settings) { - settings.setWidth(900); - settings.setHeight(600); - settings.setTitle(""); - } - - @Override - protected void initGame() { - gameManager = new GameManager(); - - FXGL.getGameScene().setBackgroundColor(Color.web("#2B2B2B")); - gameManager.spawnBricks(); - } - - public static void main(String[] args) { - launch(args); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java index e26dc2f..87e0988 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java +++ b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java @@ -5,6 +5,7 @@ import com.almasb.fxgl.app.GameSettings; import com.almasb.fxgl.dsl.FXGL; import com.github.codestorm.bounceverse.factory.BrickFactory; +import com.github.codestorm.bounceverse.factory.BulletFactory; import com.github.codestorm.bounceverse.factory.SceneFactory; import com.github.codestorm.bounceverse.systems.LaunchOption; import com.github.codestorm.bounceverse.systems.physics.CollisionSystem; @@ -92,10 +93,11 @@ protected void initSettings(GameSettings settings) { @Override protected void initGame() { - FXGL.getGameWorld().addEntityFactory(new BrickFactory()); + FXGL.getGameWorld().addEntityFactory(new BrickFactory()); + FXGL.getGameWorld().addEntityFactory(new BulletFactory()); - var brick1 = FXGL.spawn("normalBrick", 100, 100); - var brick2 = FXGL.spawn("normalBrick", 200, 200); + FXGL.spawn("normalBrick", 100, 100); + FXGL.spawn("normalBrick", 200, 200); } @Override diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java index aa07bff..ddf65a1 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java @@ -2,19 +2,12 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; -<<<<<<< HEAD:src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java -import com.github.codestorm.bounceverse.components.base.BehaviorComponent; -import com.github.codestorm.bounceverse.components.brick.Brick; -import com.github.codestorm.bounceverse.components.brick.properties.BrickHealth; -import com.github.codestorm.bounceverse.tags.ForBrick; -import com.github.codestorm.bounceverse.tags.Optional; -======= import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; import com.github.codestorm.bounceverse.data.tags.components.BehaviorComponent; import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; import com.github.codestorm.bounceverse.data.types.EntityType; ->>>>>>> 7b79420144f692b2327565779d6d4140aff0f34f:src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java import java.util.List; /** @@ -45,15 +38,8 @@ private void explode() { List entities = FXGL.getGameWorld().getEntities(); for (var entity : entities) { -<<<<<<< HEAD:src/main/java/com/github/codestorm/bounceverse/components/brick/behaviors/BrickExplode.java - if (entity == getEntity()) - continue; - if (!entity.hasComponent(Brick.class)) - continue; -======= if (entity == getEntity()) continue; if (!entity.isType(EntityType.BRICK)) continue; ->>>>>>> 7b79420144f692b2327565779d6d4140aff0f34f:src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java double ex = entity.getCenter().getX(); double ey = entity.getCenter().getY(); diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/BulletBehavior.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/BulletBehavior.java new file mode 100644 index 0000000..1e0dfc8 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/BulletBehavior.java @@ -0,0 +1,31 @@ +package com.github.codestorm.bounceverse.components.behaviors.bullet; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.component.Component; +import javafx.geometry.Point2D; + +public class BulletBehavior extends Component { + + private final double speed; + private final Point2D direction; + + public BulletBehavior(double speed, Point2D direction) { + this.speed = speed; + this.direction = direction.normalize(); + } + + @Override + public void onUpdate(double tpf) { + var e = entity; + + e.translate(direction.multiply(speed * tpf)); + + var viewport = FXGL.getGameScene().getViewport().getVisibleArea(); + if (e.getRightX() < viewport.getMinX() + || e.getX() > viewport.getMaxX() + || e.getBottomY() < viewport.getMinY() + || e.getY() > viewport.getMaxY()) { + e.removeFromWorld(); + } + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java new file mode 100644 index 0000000..292a8d5 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java @@ -0,0 +1,62 @@ +package com.github.codestorm.bounceverse.components.behaviors.bullet; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.SpawnData; +import com.almasb.fxgl.entity.component.Component; +import javafx.geometry.Point2D; + +/** + * Component quản lý khả năng bắn đạn của entity. + */ +public class Shoot extends Component { + + private final double cooldown; + private double cooldownTimer = 0; + private boolean active = false; + + public Shoot(double cooldown) { + this.cooldown = cooldown; + } + + public void activate() { + active = true; + cooldownTimer = 0; + } + + @Override + public void onUpdate(double tpf) { + if (active) { + cooldownTimer -= tpf; + } + } + + public boolean canShoot() { + return active && cooldownTimer <= 0; + } + + public void shoot() { + if (!canShoot()) + return; + + var e = getEntity(); + double halfWidth = e.getWidth() / 2; + + double leftX = e.getCenter().getX() - halfWidth + 4; + double rightX = e.getCenter().getX() + halfWidth - 8; + + double y = e.getY() - 10; + + SpawnData dataLeft = new SpawnData(leftX, y) + .put("speed", 450.0) + .put("direction", new Point2D(0, -1)); + + SpawnData dataRight = new SpawnData(rightX, y) + .put("speed", 450.0) + .put("direction", new Point2D(0, -1)); + + FXGL.spawn("bullet", dataLeft); + FXGL.spawn("bullet", dataRight); + + cooldownTimer = cooldown; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java index a61a39f..6395a7a 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java @@ -14,11 +14,11 @@ public class ExpandPaddle extends Component implements BehaviorComponent, ForPad private boolean expanded = false; public void active() { - if (!expanded) { - entity.getComponent(Width.class).setWidth(expandedWidth); - expanded = true; - timer = 0; - } + var width = entity.getComponent(Width.class); + width.resetWidth(); + width.setWidth(expandedWidth); + expanded = true; + timer = 0; } @Override @@ -31,4 +31,5 @@ public void onUpdate(double tpf) { } } } + } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java index b270c35..40602b0 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java @@ -14,11 +14,11 @@ public class ShrinkPaddle extends Component implements BehaviorComponent, ForPad private boolean shrinked = false; public void active() { - if (!shrinked) { - entity.getComponent(Width.class).setWidth(shrinkedWidth); - shrinked = true; - timer = 0; - } + var width = entity.getComponent(Width.class); + width.resetWidth(); + width.setWidth(shrinkedWidth); + shrinked = true; + timer = 0; } @Override diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Bullet.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Bullet.java deleted file mode 100644 index 8ece603..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Bullet.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.github.codestorm.bounceverse.components.properties; - -import com.almasb.fxgl.entity.component.Component; - -public class Bullet extends Component { - - private final double cooldown; - private double timerCooldown = 0; - private final double duration; - private double activeTime = 0; - private boolean active = false; - - public Bullet(double cooldown, double duration) { - this.cooldown = cooldown; - this.duration = duration; - } - - public void active() { - active = true; - activeTime = 0; - timerCooldown = 0; - } - - @Override - public void onUpdate(double tpf) { - if (!active) { - return; - } - - activeTime += tpf; - timerCooldown -= tpf; - - if (activeTime >= duration) { - active = false; - } - } - - public boolean canShoot() { - return active && timerCooldown <= 0; - } - - public void shoot() { - timerCooldown = cooldown; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java index 43b8921..9c70e4d 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java @@ -16,6 +16,8 @@ public double getOriginalWidth() { } public void setWidth(double width) { + var transform = entity.getTransformComponent(); + transform.setAnchoredPosition(entity.getCenter()); entity.setScaleX(width / originalWidth); } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java index b8b50e4..0d1b60e 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java @@ -1,15 +1,10 @@ package com.github.codestorm.bounceverse.components.properties.brick; -<<<<<<< HEAD:src/main/java/com/github/codestorm/bounceverse/components/brick/properties/BrickHealth.java import com.almasb.fxgl.dsl.components.HealthIntComponent; -import com.github.codestorm.bounceverse.components.base.properties.Health; -import com.github.codestorm.bounceverse.tags.ForBrick; -======= import com.almasb.fxgl.entity.component.CoreComponent; import com.github.codestorm.bounceverse.components.properties.Health; import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; import com.github.codestorm.bounceverse.data.tags.requirements.RequiredTag; ->>>>>>> 7b79420144f692b2327565779d6d4140aff0f34f:src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java /** * diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java index 4334167..7060bd2 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java @@ -20,5 +20,6 @@ public enum EntityType { BRICK, PADDLE, BALL, - POWER_UP + POWER_UP, + BULLET } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java index 03d3ac7..33bbf36 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java @@ -49,8 +49,7 @@ public final class BrickFactory implements EntityFactory { @NotNull @SafeVarargs private static - Entity newBrick( - Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { + Entity newBrick(Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { return FXGL.entityBuilder() .type(EntityType.BRICK) .at(pos) diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java new file mode 100644 index 0000000..f220c4b --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java @@ -0,0 +1,28 @@ +package com.github.codestorm.bounceverse.factory; + +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.EntityFactory; +import com.almasb.fxgl.entity.SpawnData; +import com.almasb.fxgl.entity.Spawns; +import com.almasb.fxgl.entity.components.CollidableComponent; +import com.github.codestorm.bounceverse.components.behaviors.bullet.BulletBehavior; +import com.github.codestorm.bounceverse.data.types.EntityType; + +import javafx.scene.paint.Color; +import javafx.scene.shape.Circle; +import static com.almasb.fxgl.dsl.FXGL.entityBuilder; + +public final class BulletFactory implements EntityFactory { + @Spawns("bullet") + public Entity newBullet(SpawnData data) { + return entityBuilder(data) + .type(EntityType.BULLET) + .viewWithBBox(new Circle(4, Color.YELLOW)) + .with(new CollidableComponent(true)) + .with(new BulletBehavior( + data.get("speed"), + data.get("direction"))) + .build(); + } + +} diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java new file mode 100644 index 0000000..625176a --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java @@ -0,0 +1,7 @@ +package com.github.codestorm.bounceverse.factory; + +import com.almasb.fxgl.entity.EntityFactory; + +public class PaddleFactory implements EntityFactory{ + +} diff --git a/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java b/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java deleted file mode 100644 index 7f800fd..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/gameManager/GameManager.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.github.codestorm.bounceverse.gameManager; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.Entity; -import com.github.codestorm.bounceverse.ball.Ball; -import com.github.codestorm.bounceverse.components._old.brick.BrickComponent; -import com.github.codestorm.bounceverse.components._old.brick.BrickFactory; -import com.github.codestorm.bounceverse.paddle.Paddle; -import com.github.codestorm.bounceverse.powerup.PowerUp; -import java.util.ArrayList; -import java.util.List; - -/** - * Manages the main game logic of BounceVerse, including the paddle, ball, bricks, power-ups, score, - * and level state. - */ -public class GameManager { - private Paddle paddle; - private Ball ball; - private List bricks = new ArrayList<>(); - private List powerups; - private int score; - private int lives; - private int level; - - /** Spawns a predefined pattern of brick rows into the game world. */ - public void spawnBricks() { - clearBricks(); - - double startX = 100; - double startY = 100; - double offsetX = 85; - double offsetY = 40; - - // Row 1: Normal Bricks - for (int i = 0; i < 8; i++) { - Entity brick = BrickFactory.newBrick(startX + i * offsetX, startY); - FXGL.getGameWorld().addEntity(brick); - bricks.add(brick); - } - - // Row 2: Strong Brick - for (int i = 0; i < 8; i++) { - Entity brick = BrickFactory.newStrongBrick(startX + i * offsetX, startY + offsetY); - FXGL.getGameWorld().addEntity(brick); - bricks.add(brick); - } - - // Row 3: Explode Brick - for (int i = 0; i < 8; i++) { - Entity brick = BrickFactory.newExplodeBrick(startX + i * offsetX, startY + offsetY * 2); - FXGL.getGameWorld().addEntity(brick); - bricks.add(brick); - } - - // Row 4: Protected Bricks (with directional shields) - String[] shields = {"top", "left", "right", "bottom"}; - for (int i = 0; i < 8; i++) { - String shieldSide = shields[i % shields.length]; - Entity brick = - BrickFactory.newProtectedBrick( - startX + i * offsetX, startY + offsetY * 3, shieldSide); - FXGL.getGameWorld().addEntity(brick); - bricks.add(brick); - } - } - - /** Removes all existing bricks from the game world and clears the internal brick list. */ - public void clearBricks() { - bricks.forEach(Entity::removeFromWorld); - bricks.clear(); - } - - public List getBricks() { - return bricks; - } - - /** Update the player's score based on destroyed bricks. */ - public void updateScore() { - for (Entity brickEntity : bricks) { - if (!brickEntity.hasComponent(BrickComponent.class)) continue; - - BrickComponent brick = brickEntity.getComponent(BrickComponent.class); - if (brick.isDestroyed()) { - score += brick.getScore(); - brickEntity.removeFromWorld(); - } - } - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/BulletComponent.java b/src/main/java/com/github/codestorm/bounceverse/paddle/BulletComponent.java deleted file mode 100644 index a6261ad..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/BulletComponent.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -import com.almasb.fxgl.entity.component.Component; - -public class BulletComponent extends Component { - private double speed; - - public BulletComponent(double speed) { - this.speed = speed; - } - - @Override - public void onUpdate(double tpf) { - entity.translateY(-speed * tpf); - - if (entity.getY() < -10) { - entity.removeFromWorld(); - } - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ExpandPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ExpandPaddle.java deleted file mode 100644 index 92112ee..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/ExpandPaddle.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -/** A special type of {@link Paddle} that is wider than the normal paddle. */ -public class ExpandPaddle extends PaddleComponent { - // constructor. - public ExpandPaddle(double speed) { - super(speed); - } - - @Override - public void onAdded() { - entity.setScaleX(1.5); - } - - public void resetSize() { - entity.setScaleX(1.0); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java deleted file mode 100644 index 6f061ca..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/LaserPaddle.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.Entity; -import com.almasb.fxgl.entity.components.TransformComponent; -import com.github.codestorm.bounceverse.gameManager.BounceverseType; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * A special type of {@link Paddle} that can shoot bullets upward to destroy bricks. This is usually - * activated by a power-up. - */ -public class LaserPaddle extends PaddleComponent { - /** List of bullets currently fired by the paddle. */ - private final List bullets = new ArrayList<>(); - - // constructor. - public LaserPaddle(double speed) { - super(speed); - } - - // Shoots bullet from paddle. - public void shoot() { - TransformComponent t = entity.getTransformComponent(); - double paddleX = t.getX(); - double paddleY = t.getY(); - double width = entity.getWidth(); - - // Create bullet gun on the left paddle. - double bulletLeftX = paddleX + 10; - double bulletLeftY = paddleY - 10; - - Entity bulletLeft = - FXGL.entityBuilder() - .at(bulletLeftX, bulletLeftY) - .type(BounceverseType.BULLET) - .viewWithBBox("") - .with(new BulletComponent(500)) - .buildAndAttach(); - - // Create bullet gun on the right paddle. - double bulletRightX = paddleX + width - 18; - double bulletRightY = paddleY - 10; - - Entity bulletRight = - FXGL.entityBuilder() - .at(bulletRightX, bulletRightY) - .type(BounceverseType.BULLET) - .viewWithBBox("") - .with(new BulletComponent(500)) - .buildAndAttach(); - - bullets.add(bulletLeft); - bullets.add(bulletRight); - } - - /** Updates all bullets when them get off-screen or hit the brick. */ - public void updateBullets() { - Iterator iterator = bullets.iterator(); - while (iterator.hasNext()) { - Entity bullet = iterator.next(); - if (bullet.getY() < -10) { - bullet.removeFromWorld(); - iterator.remove(); - } - } - } - - public List getBullets() { - return bullets; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleComponent.java b/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleComponent.java deleted file mode 100644 index f6ca4a6..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleComponent.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.component.Component; - -/** - * Represents the paddle controlled by the player in the game. - * - *

The paddle can move horizontally, reset its position, and is the base class for other paddle - * variants (expand, shrink, laser, etc.). - */ -public class PaddleComponent extends Component { - private double speed; - - public PaddleComponent(double speed) { - this.speed = speed; - } - - // getter & setter. - public double getSpeed() { - return speed; - } - - public void setSpeed(double speed) { - this.speed = speed; - } - - /** - * Moves the paddle to the left based on its speed and the current frame time. - * - *

Using {@code FXGL.tpf()} (Time Per Frame) ensures that movement is frame rate–independent, - * so the paddle moves smoothly even if the FPS varies. - */ - public void moveLeft() { - double newX = entity.getX() - speed * FXGL.tpf(); - if (newX >= 0) { - entity.setX(newX); - } - } - - /** - * Moves the paddle to the right based on its speed and the current frame time. - * - *

Using {@code FXGL.tpf()} (Time Per Frame) ensures that movement is frame rate–independent, - * so the paddle moves smoothly even if the FPS varies. - */ - public void moveRight() { - double newX = entity.getX() + speed * FXGL.tpf(); - double maxX = FXGL.getAppWidth() - entity.getWidth(); - if (newX <= maxX) { - entity.setX(newX); - } - } - - // Reset the paddle to a specific position. - public void resetPosition(double startX, double startY) { - entity.setX(startX); - entity.setY(startY); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleFactory.java b/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleFactory.java deleted file mode 100644 index 63c6bdf..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/PaddleFactory.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.Entity; -import com.almasb.fxgl.entity.EntityFactory; -import com.almasb.fxgl.entity.SpawnData; -import com.almasb.fxgl.entity.Spawns; -import com.almasb.fxgl.entity.components.CollidableComponent; -import com.github.codestorm.bounceverse.gameManager.BounceverseType; -import javafx.scene.paint.Color; -import javafx.scene.shape.Rectangle; - -public class PaddleFactory implements EntityFactory { - private static final double DEFAULT_WIDTH = 150; - private static final double DEFAULT_HEIGHT = 20; - private static final double DEFAULT_SPEED = 400; - - // Paddle. - @Spawns("paddle") - public Entity newPaddle(SpawnData data) { - return FXGL.entityBuilder(data) - .type(BounceverseType.PADDLE) - .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.DODGERBLUE)) - .with(new CollidableComponent(true)) - .with(new PaddleComponent(DEFAULT_SPEED)) - .build(); - } - - // Shrink Paddle. - @Spawns("shrinkPaddle") - public Entity newShrinkPaddle(SpawnData data) { - return FXGL.entityBuilder(data) - .type(BounceverseType.PADDLE) - .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.ORANGERED)) - .with(new CollidableComponent(true)) - .with(new ShrinkPaddle(DEFAULT_SPEED)) - .build(); - } - - // Expand Paddle. - @Spawns("expandPaddle") - public Entity newExpandPaddle(SpawnData data) { - return FXGL.entityBuilder(data) - .type(BounceverseType.PADDLE) - .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.LIMEGREEN)) - .with(new CollidableComponent(true)) - .with(new ExpandPaddle(DEFAULT_SPEED)) - .build(); - } - - // Bullet Paddle. - @Spawns("bulletPaddle") - public Entity newBulletPaddle(SpawnData data) { - return FXGL.entityBuilder(data) - .type(BounceverseType.PADDLE) - .viewWithBBox(new Rectangle(100, 20, Color.HOTPINK)) - .with(new CollidableComponent(true)) - .with(new LaserPaddle(400)) - .build(); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java deleted file mode 100644 index 0cc2f5d..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/paddle/ShrinkPaddle.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.github.codestorm.bounceverse.paddle; - -/** A special type of {@link Paddle} that is narrower than the normal paddle. */ -public class ShrinkPaddle extends PaddleComponent { - - // Constructor. - public ShrinkPaddle(double speed) { - super(speed); - } - - @Override - public void onAdded() { - entity.setScaleX(0.7); - } - - public void resetSize() { - entity.setScaleX(1.0); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java b/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java index eaeafe4..d772372 100644 --- a/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java @@ -1,5 +1,10 @@ package com.github.codestorm.bounceverse.systems.physics; +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.physics.CollisionHandler; +import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; +import com.github.codestorm.bounceverse.data.types.EntityType; import com.github.codestorm.bounceverse.systems.System; /** @@ -9,7 +14,9 @@ * * Hệ thống xử lý va chạm. * - *

Đây là một Singleton, cần lấy instance thông qua {@link #getInstance()}. + *

+ * Đây là một Singleton, cần lấy instance thông qua + * {@link #getInstance()}. * * @see System */ @@ -17,7 +24,9 @@ public final class CollisionSystem extends System { /** * Lazy-loaded singleton holder. * - *

Follow + *

+ * Follow * Initialization-on-demand holder idiom. */ private static final class Holder { @@ -32,15 +41,22 @@ public static CollisionSystem getInstance() { @Override public void apply() { - // ? Viết các logic CollisionHandler ở đây. eg: - // getPhysicsWorld().addCollisionHandler(new CollisionHandler(EntityType.PLAYER, - // EntityType.COIN) { - // @Override - // protected void onCollisionBegin(Entity player, Entity coin) { - // coin.removeFromWorld(); - // } - // }); + // Bullet vs Brick + FXGL.getPhysicsWorld().addCollisionHandler(new CollisionHandler(EntityType.BULLET, EntityType.BRICK) { + @Override + protected void onCollisionBegin(Entity bullet, Entity brick) { + // Nếu brick có máu -> trừ 1 HP + if (brick.hasComponent(BrickHealth.class)) { + brick.getComponent(BrickHealth.class).damage(1); + } + + // Hủy viên đạn + bullet.removeFromWorld(); + } + }); + } - private CollisionSystem() {} + private CollisionSystem() { + } } From e00a5d26399abbd8456f414e1e73c336e17b8828 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 14 Oct 2025 21:48:19 +0700 Subject: [PATCH 31/53] refactor(paddle): adjust PaddleFactory, Shoot and Width property for move and scaling --- .../components/behaviors/bullet/Shoot.java | 15 ++++++++--- .../components/properties/Width.java | 3 ++- .../bounceverse/factory/PaddleFactory.java | 25 ++++++++++++++++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java index 292a8d5..a54bb26 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java @@ -3,6 +3,7 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.component.Component; + import javafx.geometry.Point2D; /** @@ -12,10 +13,13 @@ public class Shoot extends Component { private final double cooldown; private double cooldownTimer = 0; + private final double duration; + private double timer = 0; private boolean active = false; - public Shoot(double cooldown) { + public Shoot(double cooldown, double duration) { this.cooldown = cooldown; + this.duration = duration; } public void activate() { @@ -27,6 +31,7 @@ public void activate() { public void onUpdate(double tpf) { if (active) { cooldownTimer -= tpf; + timer += tpf; } } @@ -35,9 +40,13 @@ public boolean canShoot() { } public void shoot() { - if (!canShoot()) + if (!canShoot()) { return; - + } + if (timer >= duration) { + active = false; + timer = 0; + } var e = getEntity(); double halfWidth = e.getWidth() / 2; diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java index 9c70e4d..d79b474 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java @@ -1,8 +1,9 @@ package com.github.codestorm.bounceverse.components.properties; import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; -public class Width extends Component { +public class Width extends Component implements PropertyComponent{ private double originalWidth; diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java index 625176a..b24c152 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java @@ -1,7 +1,30 @@ package com.github.codestorm.bounceverse.factory; +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.EntityFactory; +import com.almasb.fxgl.entity.SpawnData; +import com.almasb.fxgl.entity.Spawns; +import com.almasb.fxgl.entity.components.CollidableComponent; +import com.github.codestorm.bounceverse.components.properties.Move; +import com.github.codestorm.bounceverse.components.properties.Width; +import com.github.codestorm.bounceverse.data.types.EntityType; + +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; public class PaddleFactory implements EntityFactory{ - + private static final double DEFAULT_WIDTH = 150; + private static final double DEFAULT_HEIGHT = 20; + + @Spawns("paddle") + public Entity newPaddle(SpawnData data) { + return FXGL.entityBuilder(data) + .type(EntityType.PADDLE) + .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.DEEPSKYBLUE)) + .with(new CollidableComponent(true)) + .with(new Move(400)) // speed = 400 px/s + .with(new Width()) // lưu kích thước gốc để expand/shrink + .build(); + } } From 5b6e38b3d4c59152ef14353446ef2c07e75a6c18 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 14 Oct 2025 21:50:03 +0700 Subject: [PATCH 32/53] feat(wall): add WallFactory and Wall components with Move property for paddle collision --- .../components/properties/Move.java | 26 ++++++++++++++++ .../components/properties/Wall.java | 18 +++++++++++ .../bounceverse/factory/WallFactory.java | 31 +++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Wall.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java new file mode 100644 index 0000000..9890328 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java @@ -0,0 +1,26 @@ +package com.github.codestorm.bounceverse.components.properties; + +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; + +public class Move extends Component implements PropertyComponent { + + private double speed = 400; + private double direction = 0; + + public Move(double speed) { + this.speed = speed; + } + + public void setDirection(double direction) { + this.direction = direction; + } + + public double getDirection() { + return direction; + } + + public double getSpeed() { + return speed; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Wall.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Wall.java new file mode 100644 index 0000000..7b49a42 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Wall.java @@ -0,0 +1,18 @@ +package com.github.codestorm.bounceverse.components.properties; + +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; +import com.github.codestorm.bounceverse.data.types.Side; + +public class Wall extends Component implements PropertyComponent { + + private Side side; + + public Wall(Side side) { + this.side = side; + } + + public Side getSide() { + return side; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java new file mode 100644 index 0000000..eafe926 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java @@ -0,0 +1,31 @@ +package com.github.codestorm.bounceverse.factory; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.EntityFactory; +import com.almasb.fxgl.entity.SpawnData; +import com.almasb.fxgl.entity.Spawns; +import com.almasb.fxgl.entity.components.CollidableComponent; +import com.github.codestorm.bounceverse.components.properties.Wall; +import com.github.codestorm.bounceverse.data.types.EntityType; +import com.github.codestorm.bounceverse.data.types.Side; + +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; + +public class WallFactory implements EntityFactory { + + @Spawns("wall") + public Entity newWall(SpawnData data) { + double width = data.get("width"); + double height = data.get("height"); + Side side = data.hasKey("side") ? data.get("side") : Side.LEFT; + + return FXGL.entityBuilder(data) + .type(EntityType.WALL) + .viewWithBBox(new Rectangle(width, height, Color.TRANSPARENT)) // không vẽ, chỉ hitbox + .with(new CollidableComponent(true)) + .with(new Wall(side)) + .build(); + } +} From 943832b59327e0965856c694095345060324a5d7 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 14 Oct 2025 21:50:14 +0700 Subject: [PATCH 33/53] feat(physics): handle paddle-wall collision in CollisionSystem --- .../systems/physics/CollisionSystem.java | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java b/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java index d772372..4f9c89b 100644 --- a/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java @@ -3,6 +3,8 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.physics.CollisionHandler; +import com.github.codestorm.bounceverse.components.properties.Move; +import com.github.codestorm.bounceverse.components.properties.Wall; import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; import com.github.codestorm.bounceverse.data.types.EntityType; import com.github.codestorm.bounceverse.systems.System; @@ -21,6 +23,7 @@ * @see System */ public final class CollisionSystem extends System { + /** * Lazy-loaded singleton holder. * @@ -30,6 +33,7 @@ public final class CollisionSystem extends System { * Initialization-on-demand holder idiom. */ private static final class Holder { + static final CollisionSystem INSTANCE = new CollisionSystem(); } @@ -38,7 +42,6 @@ public static CollisionSystem getInstance() { } // ? Tạo các Group CollisionHandler ở đây (dùng composition) - @Override public void apply() { // Bullet vs Brick @@ -55,6 +58,26 @@ protected void onCollisionBegin(Entity bullet, Entity brick) { } }); + // Paddle vs Wall + FXGL.getPhysicsWorld().addCollisionHandler(new CollisionHandler(EntityType.PADDLE, EntityType.WALL) { + @Override + protected void onCollision(Entity paddle, Entity wall) { + if (wall.hasComponent(Wall.class)) { + var wallProp = wall.getComponent(Wall.class); + var move = paddle.getComponentOptional(Move.class); + + move.ifPresent(m -> m.setDirection(0)); + + switch (wallProp.getSide()) { + case LEFT -> paddle.setX(wall.getRightX()); + case RIGHT -> paddle.setX(wall.getX() - paddle.getWidth()); + default -> throw new IllegalArgumentException("Unexpected value: " + wallProp.getSide()); + + } + } + } + }); + } private CollisionSystem() { From abb1bd8b2ab2e1c193e19d06c427dea6e6d725e6 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 14 Oct 2025 21:50:25 +0700 Subject: [PATCH 34/53] feat(data): add WALL entity type for collision system --- .../github/codestorm/bounceverse/data/types/EntityType.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java index 7060bd2..13186c1 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java @@ -21,5 +21,6 @@ public enum EntityType { PADDLE, BALL, POWER_UP, - BULLET + BULLET, + WALL } From 486f6707db0fc3a66287d95711419f2674f50a5e Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Tue, 14 Oct 2025 21:50:29 +0700 Subject: [PATCH 35/53] feat(behavior): update BrickExplode logic for new collision handling --- .../bounceverse/components/behaviors/brick/BrickExplode.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java index ddf65a1..329675c 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java @@ -1,5 +1,7 @@ package com.github.codestorm.bounceverse.components.behaviors.brick; +import java.util.List; + import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; @@ -8,7 +10,6 @@ import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; import com.github.codestorm.bounceverse.data.types.EntityType; -import java.util.List; /** * @@ -50,10 +51,8 @@ private void explode() { if (Math.hypot(dx, dy) <= explodeRadius) { entity.getComponentOptional(BrickHealth.class) .ifPresent(health -> { - // Giảm máu health.damage(1); - // Nếu máu <= 0 thì cho nổ tiếp (chain reaction) if (health.isDead() && entity.hasComponent(BrickExplode.class)) { entity.getComponent(BrickExplode.class).explode(); } From 36c85d4949a252eadf2a96e300b18958f046fec1 Mon Sep 17 00:00:00 2001 From: ManhTanTran <24021619@vnu.edu.vn> Date: Wed, 15 Oct 2025 01:16:07 +0700 Subject: [PATCH 36/53] feat(paddle-wall): add Move component update and WallFactory with correct sides and spawn registration --- .../codestorm/bounceverse/Bounceverse.java | 80 ++++++++++++++++--- .../components/properties/Move.java | 22 +++-- .../bounceverse/factory/PaddleFactory.java | 14 +++- .../bounceverse/factory/WallFactory.java | 52 +++++++++--- 4 files changed, 140 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java index 87e0988..da1bbdd 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java +++ b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java @@ -4,13 +4,20 @@ import com.almasb.fxgl.app.GameApplication; import com.almasb.fxgl.app.GameSettings; import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.input.UserAction; +import com.github.codestorm.bounceverse.components.properties.Move; +import com.github.codestorm.bounceverse.data.types.EntityType; import com.github.codestorm.bounceverse.factory.BrickFactory; import com.github.codestorm.bounceverse.factory.BulletFactory; +import com.github.codestorm.bounceverse.factory.PaddleFactory; import com.github.codestorm.bounceverse.factory.SceneFactory; +import com.github.codestorm.bounceverse.factory.WallFactory; import com.github.codestorm.bounceverse.systems.LaunchOption; import com.github.codestorm.bounceverse.systems.physics.CollisionSystem; import java.io.IOException; import java.util.Properties; + +import javafx.scene.input.KeyCode; import javafx.scene.paint.Color; /** @@ -20,9 +27,13 @@ * * Phần Hệ thống Chương trình chính của game, nơi mà mọi thứ bắt đầu... * - *

Game {@link Bounceverse} được lấy cảm hứng từ game Arkanoid nổi tiếng, nơi người chơi điều - * khiển một thanh để đỡ bóng và phá vỡ các viên gạch. Mục tiêu của game là phá vỡ tất cả các viên - * gạch và dành được điểm số cao nhất. Nhưng liệu mọi thứ chỉ đơn giản như vậy? + *

+ * Game {@link Bounceverse} được lấy cảm hứng từ game Arkanoid nổi tiếng, nơi + * người chơi điều + * khiển một thanh để đỡ bóng và phá vỡ các viên gạch. Mục tiêu của game là phá + * vỡ tất cả các viên + * gạch và dành được điểm số cao nhất. Nhưng liệu mọi thứ chỉ đơn giản như + * vậy? */ public final class Bounceverse extends GameApplication { private static LaunchOption launchOption; @@ -30,7 +41,8 @@ public final class Bounceverse extends GameApplication { /** * Cấu hình game. * - *

Sử dụng {@link #loadConfigs()} để load các config. + *

+ * Sử dụng {@link #loadConfigs()} để load các config. */ private static final class Configs { private static final String ROOT = "/configs/"; @@ -39,14 +51,16 @@ private static final class Configs { private static final class System { public static Properties settings; - private System() {} + private System() { + } } /** Cấu hình game bên ngoài hệ thống game. */ private static final class Options { public static Properties DEFAULT; // Cấu hình mặc định của trò chơi - private Options() {} + private Options() { + } } /** @@ -59,7 +73,8 @@ public static void loadConfigs() throws IOException { System.settings = Utils.IO.loadProperties(ROOT + "system/settings.properties"); } - private Configs() {} + private Configs() { + } } @Override @@ -93,11 +108,54 @@ protected void initSettings(GameSettings settings) { @Override protected void initGame() { - FXGL.getGameWorld().addEntityFactory(new BrickFactory()); - FXGL.getGameWorld().addEntityFactory(new BulletFactory()); + FXGL.getGameWorld().addEntityFactory(new BrickFactory()); + FXGL.getGameWorld().addEntityFactory(new BulletFactory()); + FXGL.getGameWorld().addEntityFactory(new PaddleFactory()); + FXGL.getGameWorld().addEntityFactory(new WallFactory()); + + // Spawn walls. + FXGL.spawn("wallLeft"); + FXGL.spawn("wallRight"); + FXGL.spawn("wallTop"); + + // Spawn paddle + double px = FXGL.getAppWidth() / 2.0 - 60; + double py = FXGL.getAppHeight() - 40; + FXGL.spawn("paddle", px, py); + + FXGL.spawn("normalBrick", 100, 100); + FXGL.spawn("normalBrick", 200, 200); + } - FXGL.spawn("normalBrick", 100, 100); - FXGL.spawn("normalBrick", 200, 200); + @Override + protected void initInput() { + FXGL.getInput().addAction(new UserAction("Move Left") { + @Override + protected void onActionBegin() { + FXGL.getGameWorld().getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Move.class).left()); + } + + @Override + protected void onActionEnd() { + FXGL.getGameWorld().getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Move.class).stop()); + } + }, KeyCode.LEFT); + + FXGL.getInput().addAction(new UserAction("Move Right") { + @Override + protected void onActionBegin() { + FXGL.getGameWorld().getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Move.class).right()); + } + + @Override + protected void onActionEnd() { + FXGL.getGameWorld().getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Move.class).stop()); + } + }, KeyCode.RIGHT); } @Override diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java index 9890328..5d41fe4 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java @@ -5,7 +5,7 @@ public class Move extends Component implements PropertyComponent { - private double speed = 400; + private double speed; private double direction = 0; public Move(double speed) { @@ -16,11 +16,23 @@ public void setDirection(double direction) { this.direction = direction; } - public double getDirection() { - return direction; + public void left() { + this.direction = -1; } - public double getSpeed() { - return speed; + public void right() { + this.direction = 1; } + + public void stop() { + this.direction = 0; + } + + @Override + public void onUpdate(double tpf) { + if (direction != 0) { + entity.translateX(direction * speed * tpf); + } + } + } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java index b24c152..8a76cd4 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java @@ -6,6 +6,8 @@ import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.components.CollidableComponent; +import com.almasb.fxgl.physics.BoundingShape; +import com.almasb.fxgl.physics.HitBox; import com.github.codestorm.bounceverse.components.properties.Move; import com.github.codestorm.bounceverse.components.properties.Width; import com.github.codestorm.bounceverse.data.types.EntityType; @@ -19,12 +21,18 @@ public class PaddleFactory implements EntityFactory{ @Spawns("paddle") public Entity newPaddle(SpawnData data) { + Rectangle view = new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT); + view.setArcWidth(14); + view.setArcHeight(14); + view.setFill(Color.LIGHTBLUE); + return FXGL.entityBuilder(data) .type(EntityType.PADDLE) - .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.DEEPSKYBLUE)) + .view(view) + .bbox(new HitBox(BoundingShape.box(DEFAULT_WIDTH, DEFAULT_HEIGHT))) .with(new CollidableComponent(true)) - .with(new Move(400)) // speed = 400 px/s - .with(new Width()) // lưu kích thước gốc để expand/shrink + .with(new Move(400)) + .with(new Width()) .build(); } } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java index eafe926..b87f9ca 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java @@ -10,22 +10,56 @@ import com.github.codestorm.bounceverse.data.types.EntityType; import com.github.codestorm.bounceverse.data.types.Side; -import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; public class WallFactory implements EntityFactory { - - @Spawns("wall") - public Entity newWall(SpawnData data) { - double width = data.get("width"); - double height = data.get("height"); - Side side = data.hasKey("side") ? data.get("side") : Side.LEFT; + private static final double WALL_THICKNESS = 20; + + @Spawns("wallLeft") + public Entity newWallLeft(SpawnData data) { + return FXGL.entityBuilder(data) + .type(EntityType.WALL) + .at(0, 0) + .viewWithBBox(new Rectangle(WALL_THICKNESS, FXGL.getAppHeight())) + .with(new Wall(Side.LEFT)) + .with(new CollidableComponent(true)) + .build(); + } + + @Spawns("wallRight") + public Entity newWallRight(SpawnData data) { + double x = FXGL.getAppWidth() - WALL_THICKNESS; + return FXGL.entityBuilder(data) + .type(EntityType.WALL) + .at(x, 0) + .viewWithBBox(new Rectangle(WALL_THICKNESS, FXGL.getAppHeight())) + .with(new Wall(Side.RIGHT)) + .with(new CollidableComponent(true)) + .build(); + } + + @Spawns("wallTop") + public Entity newWallTop(SpawnData data) { + return FXGL.entityBuilder(data) + .type(EntityType.WALL) + .at(0, 0) + .viewWithBBox(new Rectangle(FXGL.getAppWidth(), WALL_THICKNESS)) + .with(new Wall(Side.TOP)) + .with(new CollidableComponent(true)) + .build(); + } + + @Spawns("wallBottom") + public Entity newWallBottom(SpawnData data) { + double y = FXGL.getAppHeight() - WALL_THICKNESS; return FXGL.entityBuilder(data) .type(EntityType.WALL) - .viewWithBBox(new Rectangle(width, height, Color.TRANSPARENT)) // không vẽ, chỉ hitbox + .at(0, y) + .viewWithBBox(new Rectangle(FXGL.getAppWidth(), WALL_THICKNESS)) + .with(new Wall(Side.BOTTOM)) .with(new CollidableComponent(true)) - .with(new Wall(side)) .build(); } + } From 70f83155109c2a1ae661e3f70face9d4e72e714e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 15 Oct 2025 16:33:45 +0700 Subject: [PATCH 37/53] (skip ci) refactor: rename components and update imports for consistency Refactored various components by renaming `BehaviorComponent` to `Behavior`, `OptionalTag` to `Optional`, and `PropertyComponent` to `Property`. Updated imports accordingly to maintain consistency across the codebase. --- .../codestorm/bounceverse/Bounceverse.java | 89 ++++++------ .../github/codestorm/bounceverse/Utils.java | 129 ++++++++++++++++++ .../components/_old/base/EntityComponent.java | 4 +- .../components/_old/brick/BrickComponent.java | 1 - .../components/_old/brick/BrickFactory.java | 1 - .../components/_old/brick/ExplodeBrick.java | 4 +- .../components/behaviors/CanShoot.java | 55 ++++++++ .../components/behaviors/brick/BrickDrop.java | 8 +- .../behaviors/brick/BrickExplode.java | 34 ++--- .../behaviors/bullet/BulletBehavior.java | 31 ----- .../components/behaviors/bullet/Shoot.java | 71 ---------- .../{ExpandPaddle.java => PaddleExpand.java} | 8 +- .../behaviors/paddle/ShrinkPaddle.java | 6 +- .../components/properties/Health.java | 4 +- .../components/properties/Move.java | 38 ------ .../components/properties/Shield.java | 16 ++- .../components/properties/Velocity.java | 57 ++++++++ .../components/properties/Wall.java | 18 --- .../components/properties/Width.java | 4 +- .../properties/brick/BrickHealth.java | 13 +- .../properties/brick/BrickShield.java | 4 +- .../properties/bullet/BulletVelocity.java | 48 +++++++ .../{BehaviorComponent.java => Behavior.java} | 4 +- .../{PropertyComponent.java => Property.java} | 4 +- .../data/tags/entities/ForBall.java | 4 +- .../data/tags/entities/ForBrick.java | 4 +- .../data/tags/entities/ForBullet.java | 13 ++ .../data/tags/entities/ForPaddle.java | 4 +- .../data/tags/entities/ForPowerUp.java | 4 +- .../data/tags/requirements/Optional.java | 17 +++ .../data/tags/requirements/OptionalTag.java | 12 -- .../data/tags/requirements/Required.java | 21 +++ .../data/tags/requirements/RequiredTag.java | 18 --- .../bounceverse/data/types/EntityType.java | 4 +- .../bounceverse/data/types/Side.java | 17 --- .../bounceverse/data/types/UnitVelocity.java | 30 ++++ .../bounceverse/factory/BrickFactory.java | 32 ++--- .../bounceverse/factory/BulletFactory.java | 11 +- .../bounceverse/factory/PaddleFactory.java | 9 +- .../bounceverse/factory/WallFactory.java | 2 - .../systems/physics/CollisionSystem.java | 73 +++++----- 41 files changed, 538 insertions(+), 388 deletions(-) create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/BulletBehavior.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java rename src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/{ExpandPaddle.java => PaddleExpand.java} (88%) delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Wall.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java rename src/main/java/com/github/codestorm/bounceverse/data/tags/components/{BehaviorComponent.java => Behavior.java} (82%) rename src/main/java/com/github/codestorm/bounceverse/data/tags/components/{PropertyComponent.java => Property.java} (82%) create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBullet.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Optional.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Required.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/RequiredTag.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/types/Side.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/types/UnitVelocity.java diff --git a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java index da1bbdd..b32732a 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java +++ b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java @@ -5,7 +5,7 @@ import com.almasb.fxgl.app.GameSettings; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.input.UserAction; -import com.github.codestorm.bounceverse.components.properties.Move; +import com.github.codestorm.bounceverse.components.properties.Velocity; import com.github.codestorm.bounceverse.data.types.EntityType; import com.github.codestorm.bounceverse.factory.BrickFactory; import com.github.codestorm.bounceverse.factory.BulletFactory; @@ -16,7 +16,6 @@ import com.github.codestorm.bounceverse.systems.physics.CollisionSystem; import java.io.IOException; import java.util.Properties; - import javafx.scene.input.KeyCode; import javafx.scene.paint.Color; @@ -27,13 +26,9 @@ * * Phần Hệ thống Chương trình chính của game, nơi mà mọi thứ bắt đầu... * - *

- * Game {@link Bounceverse} được lấy cảm hứng từ game Arkanoid nổi tiếng, nơi - * người chơi điều - * khiển một thanh để đỡ bóng và phá vỡ các viên gạch. Mục tiêu của game là phá - * vỡ tất cả các viên - * gạch và dành được điểm số cao nhất. Nhưng liệu mọi thứ chỉ đơn giản như - * vậy? + *

Game {@link Bounceverse} được lấy cảm hứng từ game Arkanoid nổi tiếng, nơi người chơi điều + * khiển một thanh để đỡ bóng và phá vỡ các viên gạch. Mục tiêu của game là phá vỡ tất cả các viên + * gạch và dành được điểm số cao nhất. Nhưng liệu mọi thứ chỉ đơn giản như vậy? */ public final class Bounceverse extends GameApplication { private static LaunchOption launchOption; @@ -41,8 +36,7 @@ public final class Bounceverse extends GameApplication { /** * Cấu hình game. * - *

- * Sử dụng {@link #loadConfigs()} để load các config. + *

Sử dụng {@link #loadConfigs()} để load các config. */ private static final class Configs { private static final String ROOT = "/configs/"; @@ -51,16 +45,14 @@ private static final class Configs { private static final class System { public static Properties settings; - private System() { - } + private System() {} } /** Cấu hình game bên ngoài hệ thống game. */ private static final class Options { public static Properties DEFAULT; // Cấu hình mặc định của trò chơi - private Options() { - } + private Options() {} } /** @@ -73,8 +65,7 @@ public static void loadConfigs() throws IOException { System.settings = Utils.IO.loadProperties(ROOT + "system/settings.properties"); } - private Configs() { - } + private Configs() {} } @Override @@ -129,33 +120,43 @@ protected void initGame() { @Override protected void initInput() { - FXGL.getInput().addAction(new UserAction("Move Left") { - @Override - protected void onActionBegin() { - FXGL.getGameWorld().getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Move.class).left()); - } - - @Override - protected void onActionEnd() { - FXGL.getGameWorld().getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Move.class).stop()); - } - }, KeyCode.LEFT); - - FXGL.getInput().addAction(new UserAction("Move Right") { - @Override - protected void onActionBegin() { - FXGL.getGameWorld().getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Move.class).right()); - } - - @Override - protected void onActionEnd() { - FXGL.getGameWorld().getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Move.class).stop()); - } - }, KeyCode.RIGHT); + FXGL.getInput() + .addAction( + new UserAction("Move Left") { + @Override + protected void onActionBegin() { + FXGL.getGameWorld() + .getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Velocity.class).left()); + } + + @Override + protected void onActionEnd() { + FXGL.getGameWorld() + .getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Velocity.class).stop()); + } + }, + KeyCode.LEFT); + + FXGL.getInput() + .addAction( + new UserAction("Move Right") { + @Override + protected void onActionBegin() { + FXGL.getGameWorld() + .getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Velocity.class).right()); + } + + @Override + protected void onActionEnd() { + FXGL.getGameWorld() + .getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Velocity.class).stop()); + } + }, + KeyCode.RIGHT); } @Override diff --git a/src/main/java/com/github/codestorm/bounceverse/Utils.java b/src/main/java/com/github/codestorm/bounceverse/Utils.java index 3f4d659..a6baba5 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Utils.java +++ b/src/main/java/com/github/codestorm/bounceverse/Utils.java @@ -1,8 +1,11 @@ package com.github.codestorm.bounceverse; +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.time.TimerAction; import java.io.IOException; import java.io.InputStream; import java.util.*; +import javafx.util.Duration; /** Utilities. */ public final class Utils { @@ -83,5 +86,131 @@ public static List readTextFile(String path) { private IO() {} } + public static final class Time { + /** + * Thời gian hồi để thực hiện lại gì đó. Thực hiện thông qua {@link #current} + * + * @see ActiveCooldown + */ + public static class Cooldown { + /** Đại diện cooldown hiện tại. Giống như một wrapper của {@link TimerAction}. */ + public final class ActiveCooldown { + private TimerAction waiter = null; + private double timestamp = Double.NaN; + private Runnable customOnExpired = null; + + /** Hành động khi cooldown hết. */ + private void onExpired() { + timestamp = Double.NaN; + if (customOnExpired != null) { + customOnExpired.run(); + } + } + + /** + * Kiểm tra Cooldown hiện tại hết hạn chưa. + * + * @return {@code true} nếu hết hạn, ngược lại {@code false}. + */ + public boolean expired() { + return (waiter == null) || waiter.isExpired(); + } + + /** Khiến cooldown hết hạn ngay (nếu có). */ + public void expire() { + if (!expired()) { + waiter.expire(); + } + } + + /** Set một cooldown mới. */ + public void makeNew() { + expire(); + + final var gameTimer = FXGL.getGameTimer(); + waiter = gameTimer.runOnceAfter(this::onExpired, duration); + timestamp = gameTimer.getNow(); + } + + public void pause() { + if (!expired()) { + waiter.pause(); + } + } + + public void resume() { + if (!expired()) { + waiter.resume(); + } + } + + public boolean isPaused() { + return !expired() && waiter.isPaused(); + } + + /** + * Lấy thời gian còn lại của cooldown. + * + * @return Thời gian còn lại + */ + public Duration getTimeLeft() { + if (expired()) { + return Duration.ZERO; + } + final var elapsed = Duration.millis(FXGL.getGameTimer().getNow() - timestamp); + return duration.subtract(elapsed); + } + + /** + * Giảm thời gian hồi đi một lượng thời gian. + * + * @param duration Thời lượng giảm. + */ + public void reduce(Duration duration) { + if (!expired()) { + waiter.update(duration.toMillis()); + } + } + + private ActiveCooldown() {} + } + + private Duration duration; + private ActiveCooldown current; + + /** + * Đặt callback khi cooldown hết hạn. + * + * @param callback Callback + */ + public void setOnExpired(Runnable callback) { + current.customOnExpired = callback; + } + + public Duration getDuration() { + return duration; + } + + /** + * Đặt thời lượng cooldown mới. + * + *

Lưu ý: Chỉ áp dụng cho cooldown mới. + * + * @param duration Thời lượng mới + */ + public void setDuration(Duration duration) { + this.duration = duration; + } + + public ActiveCooldown getCurrent() { + return current; + } + + public Cooldown(Duration duration) { + this.duration = duration; + } + } + } + private Utils() {} } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java index 57c47c7..e699d15 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java @@ -2,7 +2,7 @@ import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; +import com.github.codestorm.bounceverse.data.tags.requirements.Optional; /** * @@ -22,6 +22,6 @@ * inheritance. Ngoài ra ta lại cần nhu cầu xác định kiểu của Entity một cách chặt chẽ nữa. Vậy * nên, một thuộc tính kiểu trong Entity như này là cần thiết. * - * @see OptionalTag + * @see Optional */ public abstract class EntityComponent extends Component {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java index 9e37980..9764fb7 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java @@ -1,7 +1,6 @@ package com.github.codestorm.bounceverse.components._old.brick; import com.almasb.fxgl.entity.component.Component; - import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java index 5d75095..2b1f2c4 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java @@ -3,7 +3,6 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.EntityFactory; - import javafx.scene.Group; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java index 162968c..6c14a75 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java @@ -1,10 +1,8 @@ package com.github.codestorm.bounceverse.components._old.brick; -import java.util.List; - import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; - +import java.util.List; import javafx.scene.paint.Color; public class ExplodeBrick extends BrickComponent { diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java new file mode 100644 index 0000000..e2b9470 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java @@ -0,0 +1,55 @@ +package com.github.codestorm.bounceverse.components.behaviors; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.SpawnData; +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.Utils.Time.Cooldown; +import com.github.codestorm.bounceverse.data.tags.requirements.Optional; +import javafx.geometry.Point2D; +import javafx.util.Duration; + +/** + * + * + *

{@link CanShoot}

+ * + * Cung cấp khả năng bắn đạn cho Entity. + */ +public class CanShoot extends Component implements Optional { + private final Cooldown cooldown; + + public void shoot() { + if (!cooldown.getCurrent().expired()) { + return; + } + + var entity = getEntity(); + double halfWidth = entity.getWidth() / 2; + double leftX = entity.getCenter().getX() - halfWidth + 4; + double rightX = entity.getCenter().getX() + halfWidth - 8; + double y = entity.getY() - 10; + + SpawnData dataLeft = + new SpawnData(leftX, y).put("speed", 450.0).put("direction", new Point2D(0, -1)); + + SpawnData dataRight = + new SpawnData(rightX, y).put("speed", 450.0).put("direction", new Point2D(0, -1)); + + FXGL.spawn("bullet", dataLeft); + FXGL.spawn("bullet", dataRight); + + cooldown.getCurrent().makeNew(); + } + + public Cooldown getCooldown() { + return cooldown; + } + + public CanShoot(double cooldown) { + this(Duration.seconds(cooldown)); + } + + public CanShoot(Duration cooldown) { + this.cooldown = new Cooldown(cooldown); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java index d8fffe5..8f62f13 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java @@ -2,9 +2,9 @@ import com.almasb.fxgl.entity.component.Component; import com.github.codestorm.bounceverse.components._old.base.EntityComponent; -import com.github.codestorm.bounceverse.data.tags.components.BehaviorComponent; +import com.github.codestorm.bounceverse.data.tags.components.Behavior; import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; +import com.github.codestorm.bounceverse.data.tags.requirements.Optional; import java.util.List; /** @@ -13,8 +13,10 @@ *

{@link BrickDrop}

* * Lớp này biểu diễn hành vi rơi ra vật phẩm của Viên gạch sau khi bị phá hủy. + * + * @deprecated TODO: Lớp này chưa hoàn thiện! */ -public final class BrickDrop extends Component implements BehaviorComponent, ForBrick, OptionalTag { +public final class BrickDrop extends Component implements Behavior, ForBrick, Optional { private List items; /** Hành động rơi ra vật phẩm. */ diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java index 329675c..76bd641 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java @@ -1,37 +1,31 @@ package com.github.codestorm.bounceverse.components.behaviors.brick; -import java.util.List; - import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; -import com.github.codestorm.bounceverse.data.tags.components.BehaviorComponent; +import com.github.codestorm.bounceverse.data.tags.components.Behavior; import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; +import com.github.codestorm.bounceverse.data.tags.requirements.Optional; import com.github.codestorm.bounceverse.data.types.EntityType; +import java.util.List; /** * * *

{@link BrickExplode}

* - *

- * Lớp này biểu diễn hành vi nổ của viên gạch. Khi viên gạch bị phá hủy, nó sẽ - * kích hoạt hiệu ứng - * nổ, có thể gây sát thương đến các viên gạch xung quanh trong bán kính xác - * định. + *

Lớp này biểu diễn hành vi nổ của viên gạch. Khi viên gạch bị phá hủy, nó sẽ kích hoạt hiệu ứng + * nổ, có thể gây sát thương đến các viên gạch xung quanh trong bán kính xác định. */ -public final class BrickExplode extends Component - implements BehaviorComponent, ForBrick, OptionalTag { +public final class BrickExplode extends Component implements Behavior, ForBrick, Optional { public static final int DEFAULT_EXPLODE_RADIUS = 1; private int explodeRadius; /** * Triggers the explosion effect of this brick. * - *

- * This method can be extended to apply damage to surrounding bricks + *

This method can be extended to apply damage to surrounding bricks */ private void explode() { double cx = getEntity().getCenter().getX(); @@ -50,13 +44,15 @@ private void explode() { if (Math.hypot(dx, dy) <= explodeRadius) { entity.getComponentOptional(BrickHealth.class) - .ifPresent(health -> { - health.damage(1); + .ifPresent( + health -> { + health.damage(1); - if (health.isDead() && entity.hasComponent(BrickExplode.class)) { - entity.getComponent(BrickExplode.class).explode(); - } - }); + if (health.isDead() + && entity.hasComponent(BrickExplode.class)) { + entity.getComponent(BrickExplode.class).explode(); + } + }); } } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/BulletBehavior.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/BulletBehavior.java deleted file mode 100644 index 1e0dfc8..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/BulletBehavior.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.github.codestorm.bounceverse.components.behaviors.bullet; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.component.Component; -import javafx.geometry.Point2D; - -public class BulletBehavior extends Component { - - private final double speed; - private final Point2D direction; - - public BulletBehavior(double speed, Point2D direction) { - this.speed = speed; - this.direction = direction.normalize(); - } - - @Override - public void onUpdate(double tpf) { - var e = entity; - - e.translate(direction.multiply(speed * tpf)); - - var viewport = FXGL.getGameScene().getViewport().getVisibleArea(); - if (e.getRightX() < viewport.getMinX() - || e.getX() > viewport.getMaxX() - || e.getBottomY() < viewport.getMinY() - || e.getY() > viewport.getMaxY()) { - e.removeFromWorld(); - } - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java deleted file mode 100644 index a54bb26..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/bullet/Shoot.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.github.codestorm.bounceverse.components.behaviors.bullet; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.SpawnData; -import com.almasb.fxgl.entity.component.Component; - -import javafx.geometry.Point2D; - -/** - * Component quản lý khả năng bắn đạn của entity. - */ -public class Shoot extends Component { - - private final double cooldown; - private double cooldownTimer = 0; - private final double duration; - private double timer = 0; - private boolean active = false; - - public Shoot(double cooldown, double duration) { - this.cooldown = cooldown; - this.duration = duration; - } - - public void activate() { - active = true; - cooldownTimer = 0; - } - - @Override - public void onUpdate(double tpf) { - if (active) { - cooldownTimer -= tpf; - timer += tpf; - } - } - - public boolean canShoot() { - return active && cooldownTimer <= 0; - } - - public void shoot() { - if (!canShoot()) { - return; - } - if (timer >= duration) { - active = false; - timer = 0; - } - var e = getEntity(); - double halfWidth = e.getWidth() / 2; - - double leftX = e.getCenter().getX() - halfWidth + 4; - double rightX = e.getCenter().getX() + halfWidth - 8; - - double y = e.getY() - 10; - - SpawnData dataLeft = new SpawnData(leftX, y) - .put("speed", 450.0) - .put("direction", new Point2D(0, -1)); - - SpawnData dataRight = new SpawnData(rightX, y) - .put("speed", 450.0) - .put("direction", new Point2D(0, -1)); - - FXGL.spawn("bullet", dataLeft); - FXGL.spawn("bullet", dataRight); - - cooldownTimer = cooldown; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java similarity index 88% rename from src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java rename to src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java index 6395a7a..79c17c3 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ExpandPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java @@ -2,12 +2,11 @@ import com.almasb.fxgl.entity.component.Component; import com.github.codestorm.bounceverse.components.properties.Width; -import com.github.codestorm.bounceverse.data.tags.components.BehaviorComponent; +import com.github.codestorm.bounceverse.data.tags.components.Behavior; import com.github.codestorm.bounceverse.data.tags.entities.ForPaddle; -import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; - -public class ExpandPaddle extends Component implements BehaviorComponent, ForPaddle, OptionalTag { +import com.github.codestorm.bounceverse.data.tags.requirements.Optional; +public class PaddleExpand extends Component implements Behavior, ForPaddle, Optional { private final double expandedWidth = 200; private final double duration = 5.0; private double timer = 0; @@ -31,5 +30,4 @@ public void onUpdate(double tpf) { } } } - } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java index 40602b0..987e27c 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java @@ -2,11 +2,11 @@ import com.almasb.fxgl.entity.component.Component; import com.github.codestorm.bounceverse.components.properties.Width; -import com.github.codestorm.bounceverse.data.tags.components.BehaviorComponent; +import com.github.codestorm.bounceverse.data.tags.components.Behavior; import com.github.codestorm.bounceverse.data.tags.entities.ForPaddle; -import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; +import com.github.codestorm.bounceverse.data.tags.requirements.Optional; -public class ShrinkPaddle extends Component implements BehaviorComponent, ForPaddle, OptionalTag { +public class ShrinkPaddle extends Component implements Behavior, ForPaddle, Optional { private final double shrinkedWidth = 60; private final double duration = 5.0; diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java index 1e0f410..23cfcc7 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java @@ -2,7 +2,7 @@ import com.almasb.fxgl.dsl.components.HealthIntComponent; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; +import com.github.codestorm.bounceverse.data.tags.components.Property; /** * @@ -11,7 +11,7 @@ * *

Lớp này đại diện cho thuộc tính HP của Entity. Khi HP về 0, Entity sẽ bị xóa khỏi thế giới. */ -public abstract class Health extends Component implements PropertyComponent { +public abstract class Health extends Component implements Property { private final HealthIntComponent health; public Health(int maxHealth) { diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java deleted file mode 100644 index 5d41fe4..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Move.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.github.codestorm.bounceverse.components.properties; - -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; - -public class Move extends Component implements PropertyComponent { - - private double speed; - private double direction = 0; - - public Move(double speed) { - this.speed = speed; - } - - public void setDirection(double direction) { - this.direction = direction; - } - - public void left() { - this.direction = -1; - } - - public void right() { - this.direction = 1; - } - - public void stop() { - this.direction = 0; - } - - @Override - public void onUpdate(double tpf) { - if (direction != 0) { - entity.translateX(direction * speed * tpf); - } - } - -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java index e680715..0bfccc2 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java @@ -1,10 +1,10 @@ package com.github.codestorm.bounceverse.components.properties; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; -import com.github.codestorm.bounceverse.data.types.Side; +import com.github.codestorm.bounceverse.data.tags.components.Property; import java.util.Arrays; import java.util.HashSet; +import javafx.geometry.Side; /** * @@ -14,13 +14,23 @@ *

Lớp này đại diện cho Khiên bảo vệ Entity. Khiên có thể bảo vệ Entity từ một hoặc nhiều phía * khỏi bị tấn công. */ -public abstract class Shield extends Component implements PropertyComponent { +public abstract class Shield extends Component implements Property { private HashSet sides = new HashSet<>(); public HashSet getSides() { return sides; } + /** + * Kiểm tra khiên có bảo vệ được cạnh mong muốn không. + * + * @param side Cạnh cần kiểm tra + * @return {@code true} nếu cạnh được bảo vệ, ngược lại {@code false} + */ + public boolean hasSide(Side side) { + return sides.contains(side); + } + public void setSides(HashSet sides) { this.sides = sides; } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java new file mode 100644 index 0000000..0f4af0f --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java @@ -0,0 +1,57 @@ +package com.github.codestorm.bounceverse.components.properties; + +import com.almasb.fxgl.core.math.Vec2; +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.components.Property; +import com.github.codestorm.bounceverse.data.tags.requirements.Optional; +import com.github.codestorm.bounceverse.data.types.UnitVelocity; +import javafx.geometry.Point2D; + +/** + * + * + *

{@link Velocity}

+ * + * Vận tốc hiện có của Entity. Giống như một Wrapper của {@link Vec2} dưới dạng {@link Component}. + * + * @see Vec2 + */ +public class Velocity extends Component implements Property, Optional { + private final Vec2 vector; + + public Velocity(Vec2 velocity) { + this.vector = velocity; + } + + public Velocity(Point2D velocity) { + this(new Vec2(velocity)); + } + + public Velocity(double vx, double vy) { + this(new Vec2(vx, vy)); + } + + /** + * Dừng lại. + * + * @see UnitVelocity#STAND + */ + public void stop() { + setVector(UnitVelocity.STAND.getVector()); + } + + @Override + public void onUpdate(double tpf) { + if (!vector.equals(UnitVelocity.STAND.getVector())) { + entity.translate(vector.mul(tpf)); + } + } + + public Vec2 getVector() { + return vector; + } + + public void setVector(Vec2 vector) { + this.vector.set(vector); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Wall.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Wall.java deleted file mode 100644 index 7b49a42..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Wall.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.github.codestorm.bounceverse.components.properties; - -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; -import com.github.codestorm.bounceverse.data.types.Side; - -public class Wall extends Component implements PropertyComponent { - - private Side side; - - public Wall(Side side) { - this.side = side; - } - - public Side getSide() { - return side; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java index d79b474..aeb921f 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java @@ -1,9 +1,9 @@ package com.github.codestorm.bounceverse.components.properties; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.components.PropertyComponent; +import com.github.codestorm.bounceverse.data.tags.components.Property; -public class Width extends Component implements PropertyComponent{ +public class Width extends Component implements Property { private double originalWidth; diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java index 0d1b60e..468c581 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java @@ -4,18 +4,17 @@ import com.almasb.fxgl.entity.component.CoreComponent; import com.github.codestorm.bounceverse.components.properties.Health; import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.RequiredTag; +import com.github.codestorm.bounceverse.data.tags.requirements.Required; /** * * *

{@link BrickHealth}

* - *

- * Lớp này đại diện cho thuộc tính HP của Viên gạch. + *

Lớp này đại diện cho thuộc tính HP của Viên gạch. */ @CoreComponent -public final class BrickHealth extends Health implements ForBrick, RequiredTag { +public final class BrickHealth extends Health implements ForBrick, Required { public BrickHealth(int maxHealth) { super(maxHealth); } @@ -27,12 +26,10 @@ public void onUpdate(double tpf) { } public void damage(int amount) { - if (amount <= 0) - return; + if (amount <= 0) return; HealthIntComponent h = getHealth(); - if (h.isZero()) - return; + if (h.isZero()) return; h.damage(amount); } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java index 66101f0..657d308 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java @@ -2,7 +2,7 @@ import com.github.codestorm.bounceverse.components.properties.Shield; import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; +import com.github.codestorm.bounceverse.data.tags.requirements.Optional; import com.github.codestorm.bounceverse.data.types.Side; /** @@ -12,7 +12,7 @@ * *

Lớp này đại diện cho Khiên bảo vệ Viên gạch. */ -public final class BrickShield extends Shield implements ForBrick, OptionalTag { +public final class BrickShield extends Shield implements ForBrick, Optional { private static final int BONUS_SCORE = 20; public BrickShield() {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java new file mode 100644 index 0000000..ea7d696 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java @@ -0,0 +1,48 @@ +package com.github.codestorm.bounceverse.components.properties.bullet; + +import com.almasb.fxgl.core.math.Vec2; +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.component.CoreComponent; +import com.github.codestorm.bounceverse.components.properties.Velocity; +import com.github.codestorm.bounceverse.data.tags.components.Behavior; +import com.github.codestorm.bounceverse.data.tags.entities.ForBullet; +import com.github.codestorm.bounceverse.data.tags.requirements.Required; +import com.github.codestorm.bounceverse.data.types.EntityType; +import javafx.geometry.Point2D; + +/** + * + * + *

{@link BulletVelocity}

+ * + * Đại diện cho vận tốc hiện có của entity {@link EntityType#BULLET}. + */ +@CoreComponent +public final class BulletVelocity extends Velocity implements Behavior, ForBullet, Required { + public BulletVelocity(Vec2 velocity) { + super(velocity); + } + + public BulletVelocity(Point2D velocity) { + super(velocity); + } + + public BulletVelocity(double vx, double vy) { + super(vx, vy); + } + + @Override + public void onUpdate(double tpf) { + super.onUpdate(tpf); + + final var viewport = FXGL.getGameScene().getViewport().getVisibleArea(); + final var entity = getEntity(); + // Remove when out of playground + if (entity.getRightX() < viewport.getMinX() + || entity.getX() > viewport.getMaxX() + || entity.getBottomY() < viewport.getMinY() + || entity.getY() > viewport.getMaxY()) { + entity.removeFromWorld(); + } + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/components/BehaviorComponent.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/components/Behavior.java similarity index 82% rename from src/main/java/com/github/codestorm/bounceverse/data/tags/components/BehaviorComponent.java rename to src/main/java/com/github/codestorm/bounceverse/data/tags/components/Behavior.java index 590af66..04fea92 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/components/BehaviorComponent.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/components/Behavior.java @@ -7,10 +7,10 @@ /** * * - *

{@link BehaviorComponent}

+ *

{@link Behavior}

* *

Lớp này đại diện cho một {@link Component} biểu diễn * hành vi (behavior) của {@link Entity}. */ -public interface BehaviorComponent extends ComponentTag {} +public interface Behavior extends ComponentTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/components/PropertyComponent.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/components/Property.java similarity index 82% rename from src/main/java/com/github/codestorm/bounceverse/data/tags/components/PropertyComponent.java rename to src/main/java/com/github/codestorm/bounceverse/data/tags/components/Property.java index ec635cc..ab58036 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/components/PropertyComponent.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/components/Property.java @@ -7,10 +7,10 @@ /** * * - *

{@link PropertyComponent}

+ *

{@link Property}

* *

Lớp này đại diện cho một {@link Component} biểu diễn dữ * liệu (data/property) của {@link Entity}. */ -public interface PropertyComponent extends ComponentTag {} +public interface Property extends ComponentTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java index d584326..98a462d 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java @@ -1,13 +1,13 @@ package com.github.codestorm.bounceverse.data.tags.entities; import com.github.codestorm.bounceverse.data.tags.EntityTag; +import com.github.codestorm.bounceverse.data.types.EntityType; /** * * *

{@link ForBall}

* - * Nhãn cho các component có thể gắn với entity kiểu {@link - * com.github.codestorm.bounceverse.data.types.EntityType#BALL}. + * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#BALL}. */ public interface ForBall extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java index a530a3a..0291041 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java @@ -1,13 +1,13 @@ package com.github.codestorm.bounceverse.data.tags.entities; import com.github.codestorm.bounceverse.data.tags.EntityTag; +import com.github.codestorm.bounceverse.data.types.EntityType; /** * * *

{@link ForBrick}

* - * Nhãn cho các component có thể gắn với entity kiểu {@link - * com.github.codestorm.bounceverse.data.types.EntityType#BRICK}. + * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#BRICK}. */ public interface ForBrick extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBullet.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBullet.java new file mode 100644 index 0000000..76408c9 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBullet.java @@ -0,0 +1,13 @@ +package com.github.codestorm.bounceverse.data.tags.entities; + +import com.github.codestorm.bounceverse.data.tags.EntityTag; +import com.github.codestorm.bounceverse.data.types.EntityType; + +/** + * + * + *

{@link ForBullet}

+ * + * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#BULLET}. + */ +public interface ForBullet extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java index e20768e..4f0c790 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java @@ -1,13 +1,13 @@ package com.github.codestorm.bounceverse.data.tags.entities; import com.github.codestorm.bounceverse.data.tags.EntityTag; +import com.github.codestorm.bounceverse.data.types.EntityType; /** * * *

{@link ForPaddle}

* - * Nhãn cho các component có thể gắn với entity kiểu {@link - * com.github.codestorm.bounceverse.data.types.EntityType#PADDLE}. + * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#PADDLE}. */ public interface ForPaddle extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java index 348cb19..ae84ba0 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java @@ -1,13 +1,13 @@ package com.github.codestorm.bounceverse.data.tags.entities; import com.github.codestorm.bounceverse.data.tags.EntityTag; +import com.github.codestorm.bounceverse.data.types.EntityType; /** * * *

{@link ForPowerUp}

* - * Nhãn cho các component có thể gắn với entity kiểu {@link - * com.github.codestorm.bounceverse.data.types.EntityType#POWER_UP}. + * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#POWER_UP}. */ public interface ForPowerUp extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Optional.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Optional.java new file mode 100644 index 0000000..9036850 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Optional.java @@ -0,0 +1,17 @@ +package com.github.codestorm.bounceverse.data.tags.requirements; + +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.data.tags.RequirementTag; + +/** + * + * + *

{@link Optional}

+ * + * Nhãn cho các thành phần không gắn liền vĩnh viễn với đối tượng. + * + *

Chú ý: Dùng nhãn này tại {@link Component} đầu cuối được gắn trực tiếp với entity. + * + * @see Required + */ +public interface Optional extends RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java deleted file mode 100644 index 3e4470b..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags.requirements; - -import com.github.codestorm.bounceverse.data.tags.RequirementTag; - -/** - * - * - *

{@link OptionalTag}

- * - * Nhãn cho các thành phần không gắn liền vĩnh viễn với đối tượng. - */ -public interface OptionalTag extends RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Required.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Required.java new file mode 100644 index 0000000..c369766 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Required.java @@ -0,0 +1,21 @@ +package com.github.codestorm.bounceverse.data.tags.requirements; + +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.component.Component; +import com.almasb.fxgl.entity.component.CoreComponent; +import com.github.codestorm.bounceverse.data.tags.RequirementTag; + +/** + * + * + *

{@link Required}

+ * + * Nhãn cho các thành phần yêu cầu phải có từ khi khởi tạo {@link Entity} và gắn liền với đối tượng + * đó. + * + *

Chú ý: Hãy thêm annotation @{@link CoreComponent} vào {@link Component} đầu cuối (tức + * component được gắn trực tiếp với entity). + * + * @see Optional + */ +public interface Required extends RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/RequiredTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/RequiredTag.java deleted file mode 100644 index 641e276..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/RequiredTag.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags.requirements; - -import com.github.codestorm.bounceverse.data.tags.RequirementTag; - -/** - * - * - *

{@link RequiredTag}

- * - * Nhãn cho các thành phần yêu cầu phải có từ khi khởi tạo {@link com.almasb.fxgl.entity.Entity} và - * gắn liền với đối tượng đó. - * - *

Chú ý: - * - *

> Hãy thêm annotation {@link com.almasb.fxgl.entity.component.CoreComponent} vào final - * component (tức component được trực tiếp gắn với entity). - */ -public interface RequiredTag extends RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java index 13186c1..eb587ab 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java @@ -11,7 +11,7 @@ * nhau. * *

Sử dụng {@link com.almasb.fxgl.dsl.EntityBuilder#type(Enum)} để gán cho entity và {@link - * Entity#getType()} để truy xuất, hoặc {@link Entity#isType(Object)} để kiểm tra + * Entity#getType()} để truy xuất, hoặc {@link Entity#isType(Object)} để kiểm tra. * * @see com.almasb.fxgl.dsl.EntityBuilder * @see Entity @@ -21,6 +21,6 @@ public enum EntityType { PADDLE, BALL, POWER_UP, - BULLET, + BULLET, WALL } diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java b/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java deleted file mode 100644 index ce9de16..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/types/Side.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.github.codestorm.bounceverse.data.types; - -/** - * - * - *

{@link Side}

- * - *

Đại diện cho các cạnh của đối tượng dạng {@link javafx.scene.shape.Rectangle}. - * - * @see javafx.scene.shape.Rectangle - */ -public enum Side { - LEFT, - RIGHT, - TOP, - BOTTOM -} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/UnitVelocity.java b/src/main/java/com/github/codestorm/bounceverse/data/types/UnitVelocity.java new file mode 100644 index 0000000..9f43b50 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/UnitVelocity.java @@ -0,0 +1,30 @@ +package com.github.codestorm.bounceverse.data.types; + +import com.almasb.fxgl.core.math.Vec2; + +/** + * + * + *

{@link UnitVelocity}

+ * + * Vector đơn vị đại diện cho hướng di chuyển. + * + * @see Vec2 + */ +public enum UnitVelocity { + LEFT(-1, 0), + RIGHT(1, 0), + UP(0, -1), + DOWN(0, 1), + STAND(0, 0); + + private final Vec2 vector; + + UnitVelocity(double vx, double vy) { + this.vector = new Vec2(vx, vy).normalize(); + } + + public Vec2 getVector() { + return vector; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java index 33bbf36..4414bee 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java @@ -1,7 +1,5 @@ package com.github.codestorm.bounceverse.factory; -import org.jetbrains.annotations.NotNull; - import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.EntityFactory; @@ -10,20 +8,19 @@ import com.almasb.fxgl.entity.component.Component; import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.OptionalTag; +import com.github.codestorm.bounceverse.data.tags.requirements.Optional; import com.github.codestorm.bounceverse.data.types.EntityType; - import javafx.geometry.Point2D; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; +import org.jetbrains.annotations.NotNull; /** * * *

{@link BrickFactory}

* - *

- * Factory để tạo các entity loại {@link + *

Factory để tạo các entity loại {@link * com.github.codestorm.bounceverse.data.types.EntityType#BRICK} trong trò chơi. * * @see EntityFactory @@ -43,13 +40,11 @@ public final class BrickFactory implements EntityFactory { * @param view Khung nhìn * @param components Các components tùy chọn * @return Entity Brick mới tạo - * @param Component không bắt buộc phải có của - * Brick + * @param Component không bắt buộc phải có của Brick */ - @NotNull - @SafeVarargs - private static - Entity newBrick(Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { + @NotNull @SafeVarargs + private static Entity newBrick( + Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { return FXGL.entityBuilder() .type(EntityType.BRICK) .at(pos) @@ -66,13 +61,11 @@ Entity newBrick(Point2D pos, int hp, Rectangle view, OptionalBrickComponent... c * @param hp HP * @param components Các components tùy chọn * @return Entity Brick mới tạo - * @param Component không bắt buộc phải có của - * Brick + * @param Component không bắt buộc phải có của Brick */ - @NotNull - @SafeVarargs - private static - Entity newBrick(Point2D pos, int hp, OptionalBrickComponent... components) { + @NotNull @SafeVarargs + private static Entity newBrick( + Point2D pos, int hp, OptionalBrickComponent... components) { return newBrick( pos, hp, new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_COLOR), components); } @@ -83,8 +76,7 @@ Entity newBrick(Point2D pos, int hp, OptionalBrickComponent... components) { * @param pos Vị trí * @return Entity Brick mới tạo */ - @NotNull - @Spawns("normalBrick") + @NotNull @Spawns("normalBrick") public static Entity newNormalBrick(SpawnData pos) { return newBrick(new Point2D(pos.getX(), pos.getY()), DEFAULT_HP); } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java index f220c4b..e07a718 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java @@ -1,16 +1,16 @@ package com.github.codestorm.bounceverse.factory; +import static com.almasb.fxgl.dsl.FXGL.entityBuilder; + import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.EntityFactory; import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.components.CollidableComponent; -import com.github.codestorm.bounceverse.components.behaviors.bullet.BulletBehavior; +import com.github.codestorm.bounceverse.components.properties.bullet.BulletVelocity; import com.github.codestorm.bounceverse.data.types.EntityType; - import javafx.scene.paint.Color; import javafx.scene.shape.Circle; -import static com.almasb.fxgl.dsl.FXGL.entityBuilder; public final class BulletFactory implements EntityFactory { @Spawns("bullet") @@ -19,10 +19,7 @@ public Entity newBullet(SpawnData data) { .type(EntityType.BULLET) .viewWithBBox(new Circle(4, Color.YELLOW)) .with(new CollidableComponent(true)) - .with(new BulletBehavior( - data.get("speed"), - data.get("direction"))) + .with(new BulletVelocity(data.get("speed"), data.get("direction"))) .build(); } - } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java index 8a76cd4..cd52e4c 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java @@ -8,15 +8,14 @@ import com.almasb.fxgl.entity.components.CollidableComponent; import com.almasb.fxgl.physics.BoundingShape; import com.almasb.fxgl.physics.HitBox; -import com.github.codestorm.bounceverse.components.properties.Move; +import com.github.codestorm.bounceverse.components.properties.Velocity; import com.github.codestorm.bounceverse.components.properties.Width; import com.github.codestorm.bounceverse.data.types.EntityType; - import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; -public class PaddleFactory implements EntityFactory{ - private static final double DEFAULT_WIDTH = 150; +public class PaddleFactory implements EntityFactory { + private static final double DEFAULT_WIDTH = 150; private static final double DEFAULT_HEIGHT = 20; @Spawns("paddle") @@ -31,7 +30,7 @@ public Entity newPaddle(SpawnData data) { .view(view) .bbox(new HitBox(BoundingShape.box(DEFAULT_WIDTH, DEFAULT_HEIGHT))) .with(new CollidableComponent(true)) - .with(new Move(400)) + .with(new Velocity(400)) .with(new Width()) .build(); } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java index b87f9ca..1b7b191 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java @@ -9,7 +9,6 @@ import com.github.codestorm.bounceverse.components.properties.Wall; import com.github.codestorm.bounceverse.data.types.EntityType; import com.github.codestorm.bounceverse.data.types.Side; - import javafx.scene.shape.Rectangle; public class WallFactory implements EntityFactory { @@ -61,5 +60,4 @@ public Entity newWallBottom(SpawnData data) { .with(new CollidableComponent(true)) .build(); } - } diff --git a/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java b/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java index 4f9c89b..9599593 100644 --- a/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java @@ -3,7 +3,7 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.physics.CollisionHandler; -import com.github.codestorm.bounceverse.components.properties.Move; +import com.github.codestorm.bounceverse.components.properties.Velocity; import com.github.codestorm.bounceverse.components.properties.Wall; import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; import com.github.codestorm.bounceverse.data.types.EntityType; @@ -16,9 +16,7 @@ * * Hệ thống xử lý va chạm. * - *

- * Đây là một Singleton, cần lấy instance thông qua - * {@link #getInstance()}. + *

Đây là một Singleton, cần lấy instance thông qua {@link #getInstance()}. * * @see System */ @@ -27,9 +25,7 @@ public final class CollisionSystem extends System { /** * Lazy-loaded singleton holder. * - *

- * Follow + *

Follow * Initialization-on-demand holder idiom. */ private static final class Holder { @@ -45,41 +41,44 @@ public static CollisionSystem getInstance() { @Override public void apply() { // Bullet vs Brick - FXGL.getPhysicsWorld().addCollisionHandler(new CollisionHandler(EntityType.BULLET, EntityType.BRICK) { - @Override - protected void onCollisionBegin(Entity bullet, Entity brick) { - // Nếu brick có máu -> trừ 1 HP - if (brick.hasComponent(BrickHealth.class)) { - brick.getComponent(BrickHealth.class).damage(1); - } + FXGL.getPhysicsWorld() + .addCollisionHandler( + new CollisionHandler(EntityType.BULLET, EntityType.BRICK) { + @Override + protected void onCollisionBegin(Entity bullet, Entity brick) { + // Nếu brick có máu -> trừ 1 HP + if (brick.hasComponent(BrickHealth.class)) { + brick.getComponent(BrickHealth.class).damage(1); + } - // Hủy viên đạn - bullet.removeFromWorld(); - } - }); + // Hủy viên đạn + bullet.removeFromWorld(); + } + }); // Paddle vs Wall - FXGL.getPhysicsWorld().addCollisionHandler(new CollisionHandler(EntityType.PADDLE, EntityType.WALL) { - @Override - protected void onCollision(Entity paddle, Entity wall) { - if (wall.hasComponent(Wall.class)) { - var wallProp = wall.getComponent(Wall.class); - var move = paddle.getComponentOptional(Move.class); + FXGL.getPhysicsWorld() + .addCollisionHandler( + new CollisionHandler(EntityType.PADDLE, EntityType.WALL) { + @Override + protected void onCollision(Entity paddle, Entity wall) { + if (wall.hasComponent(Wall.class)) { + var wallProp = wall.getComponent(Wall.class); + var move = paddle.getComponentOptional(Velocity.class); - move.ifPresent(m -> m.setDirection(0)); - - switch (wallProp.getSide()) { - case LEFT -> paddle.setX(wall.getRightX()); - case RIGHT -> paddle.setX(wall.getX() - paddle.getWidth()); - default -> throw new IllegalArgumentException("Unexpected value: " + wallProp.getSide()); - - } - } - } - }); + move.ifPresent(m -> m.setVector(0)); + switch (wallProp.getSide()) { + case LEFT -> paddle.setX(wall.getRightX()); + case RIGHT -> paddle.setX(wall.getX() - paddle.getWidth()); + default -> + throw new IllegalArgumentException( + "Unexpected value: " + wallProp.getSide()); + } + } + } + }); } - private CollisionSystem() { - } + private CollisionSystem() {} } From 67fdea5a22e8f22ae5f1a45e03617920f334652f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Sat, 18 Oct 2025 20:37:20 +0700 Subject: [PATCH 38/53] [skip ci] Add and refactor Systems, Core (#15) * [skip ci] feat(core): implement game systems and refactor initialization - Introduced GameSystem, InputSystem, PhysicSystem, and UISystem for better organization and modularity (applies game logic, input handling, physics, and UI settings). - Refactored Bounceverse to utilize new systems for initialization and configuration management. - Updated credits and settings files for improved user experience. * [skip ci] ci: update CI configuration for Spotless checks and builds - Rename linting.yml to spotlessCheck.yml for clarity - Add concurrency settings to optimize CI runs - Modify job conditions to skip CI based on commit messages - Implement automatic code formatting application on failure * [skip ci] feat(core): initialize Video instance in UserSetting Add a new Video instance to the UserSetting class to ensure proper initialization and avoid null references. This change enhances the reliability of video settings management. --- .github/workflows/build.yml | 2 + .github/workflows/linting.yml | 27 ---- .github/workflows/spotlessCheck.yml | 54 +++++++ build.gradle | 1 + .../codestorm/bounceverse/Bounceverse.java | 145 ++---------------- .../github/codestorm/bounceverse/Utils.java | 4 +- .../bounceverse/core/LaunchOptions.java | 33 ++++ .../bounceverse/core/SettingsManager.java | 58 +++++++ .../bounceverse/core/UserSetting.java | 107 +++++++++++++ .../bounceverse/core/systems/GameSystem.java | 46 ++++++ .../bounceverse/core/systems/InputSystem.java | 64 ++++++++ .../systems/PhysicSystem.java} | 21 ++- .../bounceverse/core/systems/System.java | 31 ++++ .../bounceverse/core/systems/UISystem.java | 25 +++ .../bounceverse/systems/LaunchOption.java | 23 --- .../codestorm/bounceverse/systems/System.java | 21 --- .../configs/system/settings.properties | 4 - src/main/resources/credits.txt | 9 +- .../{configs => options}/default.properties | 0 src/main/resources/settings.properties | 5 + 20 files changed, 453 insertions(+), 227 deletions(-) delete mode 100644 .github/workflows/linting.yml create mode 100644 .github/workflows/spotlessCheck.yml create mode 100644 src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/core/SettingsManager.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/core/UserSetting.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java rename src/main/java/com/github/codestorm/bounceverse/{systems/physics/CollisionSystem.java => core/systems/PhysicSystem.java} (84%) create mode 100644 src/main/java/com/github/codestorm/bounceverse/core/systems/System.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/systems/LaunchOption.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/systems/System.java delete mode 100644 src/main/resources/configs/system/settings.properties rename src/main/resources/{configs => options}/default.properties (100%) create mode 100644 src/main/resources/settings.properties diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79db3ff..e7a7fa9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,12 +3,14 @@ name: Build Bytecode on: push: pull_request: + types: [ opened, ready_for_review, reopened ] permissions: contents: read jobs: build: + if: "github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml deleted file mode 100644 index a550cdb..0000000 --- a/.github/workflows/linting.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Linting - -on: - push: - pull_request: - -permissions: - contents: read - -jobs: - spotlessCheck: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - - name: Setup JDK - uses: actions/setup-java@v5 - with: - distribution: oracle - java-version: 24 - cache: gradle - - - name: Run Spotless check - run: | - chmod +x gradlew - ./gradlew spotlessCheck diff --git a/.github/workflows/spotlessCheck.yml b/.github/workflows/spotlessCheck.yml new file mode 100644 index 0000000..017c640 --- /dev/null +++ b/.github/workflows/spotlessCheck.yml @@ -0,0 +1,54 @@ +name: Spotless CI + +on: + push: + pull_request: + types: [ opened, ready_for_review, reopened ] + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + check: + runs-on: ubuntu-latest + if: "github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')" + steps: + - uses: actions/checkout@v5 + - name: Setup JDK + uses: actions/setup-java@v5 + with: + distribution: oracle + java-version: 24 + cache: gradle + - name: Run Spotless check + run: | + chmod +x gradlew + ./gradlew spotlessCheck + + apply: + runs-on: ubuntu-latest + needs: check + if: needs.check.result == 'failure' + steps: + - uses: actions/checkout@v5 + - name: Setup JDK + uses: actions/setup-java@v5 + with: + distribution: oracle + java-version: 24 + cache: gradle + - name: Run Spotless apply + run: | + chmod +x gradlew + ./gradlew spotlessApply + - name: Commit and Push + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add -A + git commit -m "[skip ci] Apply automatic code formatting" + git push diff --git a/build.gradle b/build.gradle index 0525164..1220ae6 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,7 @@ dependencies { testRuntimeOnly 'org.junit.platform:junit-platform-launcher' implementation 'com.github.almasb:fxgl:21.1' implementation 'com.google.guava:guava:33.5.0-jre' + implementation 'com.moandjiezana.toml:toml4j:0.7.2' } application { diff --git a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java index b32732a..9630ae0 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java +++ b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java @@ -1,176 +1,53 @@ package com.github.codestorm.bounceverse; -import com.almasb.fxgl.app.ApplicationMode; import com.almasb.fxgl.app.GameApplication; -import com.almasb.fxgl.app.GameSettings; -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.input.UserAction; -import com.github.codestorm.bounceverse.components.properties.Velocity; -import com.github.codestorm.bounceverse.data.types.EntityType; -import com.github.codestorm.bounceverse.factory.BrickFactory; -import com.github.codestorm.bounceverse.factory.BulletFactory; -import com.github.codestorm.bounceverse.factory.PaddleFactory; -import com.github.codestorm.bounceverse.factory.SceneFactory; -import com.github.codestorm.bounceverse.factory.WallFactory; -import com.github.codestorm.bounceverse.systems.LaunchOption; -import com.github.codestorm.bounceverse.systems.physics.CollisionSystem; +import com.github.codestorm.bounceverse.core.*; +import com.github.codestorm.bounceverse.core.systems.*; import java.io.IOException; -import java.util.Properties; -import javafx.scene.input.KeyCode; -import javafx.scene.paint.Color; /** * * *

{@link Bounceverse}

* - * Phần Hệ thống Chương trình chính của game, nơi mà mọi thứ bắt đầu... + * Phần Hệ thống Chương trình chính của game, nơi mà mọi thứ bắt đầu từ {@link #main(String[])}... * *

Game {@link Bounceverse} được lấy cảm hứng từ game Arkanoid nổi tiếng, nơi người chơi điều * khiển một thanh để đỡ bóng và phá vỡ các viên gạch. Mục tiêu của game là phá vỡ tất cả các viên * gạch và dành được điểm số cao nhất. Nhưng liệu mọi thứ chỉ đơn giản như vậy? */ public final class Bounceverse extends GameApplication { - private static LaunchOption launchOption; - - /** - * Cấu hình game. - * - *

Sử dụng {@link #loadConfigs()} để load các config. - */ - private static final class Configs { - private static final String ROOT = "/configs/"; - - /** Cấu hình game bên trong hệ thống game. */ - private static final class System { - public static Properties settings; - - private System() {} - } - - /** Cấu hình game bên ngoài hệ thống game. */ - private static final class Options { - public static Properties DEFAULT; // Cấu hình mặc định của trò chơi - - private Options() {} - } - - /** - * Load game configs. - * - * @throws IOException if an error occurred when reading from the input stream. - */ - public static void loadConfigs() throws IOException { - Options.DEFAULT = Utils.IO.loadProperties(ROOT + "default.properties"); - System.settings = Utils.IO.loadProperties(ROOT + "system/settings.properties"); - } - - private Configs() {} - } - @Override - protected void initSettings(GameSettings settings) { + protected void initSettings(com.almasb.fxgl.app.GameSettings settings) { try { - Configs.loadConfigs(); + SettingsManager.load(settings); } catch (IOException e) { throw new RuntimeException(e); } - // Basic - settings.setTitle(Configs.System.settings.getProperty("settings.name")); - settings.setVersion(Configs.System.settings.getProperty("settings.version")); - settings.setCredits(Utils.IO.readTextFile("credits.txt")); - settings.setApplicationMode( - Boolean.parseBoolean(Configs.System.settings.getProperty("settings.devMode")) - ? ApplicationMode.DEVELOPER - : (launchOption.isDebug()) - ? ApplicationMode.DEBUG - : ApplicationMode.RELEASE); - - // Display - settings.setWidth(Integer.parseInt(Configs.Options.DEFAULT.getProperty("width"))); - settings.setHeight(Integer.parseInt(Configs.Options.DEFAULT.getProperty("height"))); - settings.setFullScreenAllowed(true); - - // In-app - settings.setSceneFactory(new SceneFactory()); - settings.setMainMenuEnabled(true); - settings.setIntroEnabled(true); } @Override protected void initGame() { - FXGL.getGameWorld().addEntityFactory(new BrickFactory()); - FXGL.getGameWorld().addEntityFactory(new BulletFactory()); - FXGL.getGameWorld().addEntityFactory(new PaddleFactory()); - FXGL.getGameWorld().addEntityFactory(new WallFactory()); - - // Spawn walls. - FXGL.spawn("wallLeft"); - FXGL.spawn("wallRight"); - FXGL.spawn("wallTop"); - - // Spawn paddle - double px = FXGL.getAppWidth() / 2.0 - 60; - double py = FXGL.getAppHeight() - 40; - FXGL.spawn("paddle", px, py); - - FXGL.spawn("normalBrick", 100, 100); - FXGL.spawn("normalBrick", 200, 200); + GameSystem.getInstance().apply(); } @Override protected void initInput() { - FXGL.getInput() - .addAction( - new UserAction("Move Left") { - @Override - protected void onActionBegin() { - FXGL.getGameWorld() - .getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Velocity.class).left()); - } - - @Override - protected void onActionEnd() { - FXGL.getGameWorld() - .getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Velocity.class).stop()); - } - }, - KeyCode.LEFT); - - FXGL.getInput() - .addAction( - new UserAction("Move Right") { - @Override - protected void onActionBegin() { - FXGL.getGameWorld() - .getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Velocity.class).right()); - } - - @Override - protected void onActionEnd() { - FXGL.getGameWorld() - .getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Velocity.class).stop()); - } - }, - KeyCode.RIGHT); + InputSystem.getInstance().apply(); } @Override protected void initPhysics() { - CollisionSystem.getInstance().apply(); + PhysicSystem.getInstance().apply(); } @Override protected void initUI() { - FXGL.getGameScene().setBackgroundColor(Color.web("#2B2B2B")); + UISystem.getInstance().apply(); } - public static void main(String[] args) { - launchOption = new LaunchOption(args); + static void main(String[] args) { + LaunchOptions.load(args); launch(args); } } diff --git a/src/main/java/com/github/codestorm/bounceverse/Utils.java b/src/main/java/com/github/codestorm/bounceverse/Utils.java index a6baba5..e60e1f0 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Utils.java +++ b/src/main/java/com/github/codestorm/bounceverse/Utils.java @@ -21,7 +21,7 @@ public static final class IO { public static Properties loadProperties(String path) throws IOException { InputStream fileStream = IO.class.getResourceAsStream(path); if (fileStream == null) { - throw new IOException("Cannot open InputStream in" + path); + throw new IOException("Cannot open InputStream on " + path); } Properties prop = new Properties(); @@ -92,7 +92,7 @@ public static final class Time { * * @see ActiveCooldown */ - public static class Cooldown { + public static final class Cooldown { /** Đại diện cooldown hiện tại. Giống như một wrapper của {@link TimerAction}. */ public final class ActiveCooldown { private TimerAction waiter = null; diff --git a/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java b/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java new file mode 100644 index 0000000..29ca454 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java @@ -0,0 +1,33 @@ +package com.github.codestorm.bounceverse.core; + +import com.github.codestorm.bounceverse.Utils; + +/** + * + * + *

{@link LaunchOptions}

+ * + * Các tùy chọn khi khởi động được áp dụng trong game. + * + *

Sử dụng {@link #load(String...)} để tải các options. + */ +public final class LaunchOptions { + private static boolean debug = false; + + /** + * Tải các launch options từ Command-line Arguments. + * + * @param args Command-Line Arguments - được truyền vào từ hàm {@code main()} + */ + public static void load(String... args) { + final var map = Utils.IO.parseArgs(args, null, null); + + debug = Boolean.parseBoolean(map.getOrDefault("debug", "false")); + } + + public static boolean isDebug() { + return debug; + } + + private LaunchOptions() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/core/SettingsManager.java b/src/main/java/com/github/codestorm/bounceverse/core/SettingsManager.java new file mode 100644 index 0000000..b5ec6e6 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/core/SettingsManager.java @@ -0,0 +1,58 @@ +package com.github.codestorm.bounceverse.core; + +import com.almasb.fxgl.app.ApplicationMode; +import com.almasb.fxgl.app.GameSettings; +import com.github.codestorm.bounceverse.Utils; +import com.github.codestorm.bounceverse.factory.SceneFactory; +import java.io.IOException; + +/** + * + * + *

{@link SettingsManager}

+ * + * Nơi quản lý các thiết lập trong game. + * + * @see GameSettings + */ +public final class SettingsManager { + /** + * Tải các settings từ file đã thiết lập vào CTDL. + * + *

Chú ý: + * + *
    + *
  • Cần load {@link LaunchOptions#load(String...)} trước khi tải. + *
+ * + * @param target Nơi tải vào + * @throws IOException if an error occurred when reading from the input stream. + */ + public static void load(GameSettings target) throws IOException { + final var gameSettings = Utils.IO.loadProperties("/settings.properties"); + final var userSettings = UserSetting.getSetting(); + + // ? General + target.setTitle(gameSettings.getProperty("general.name")); + target.setVersion(gameSettings.getProperty("general.version")); + target.setCredits(Utils.IO.readTextFile("credits.txt")); + target.setApplicationMode( + Boolean.parseBoolean(gameSettings.getProperty("general.devMode")) + ? ApplicationMode.DEVELOPER + : (LaunchOptions.isDebug()) + ? ApplicationMode.DEBUG + : ApplicationMode.RELEASE); + + // ? Display + target.setWidth(userSettings.getVideo().getWidth()); + target.setHeight(userSettings.getVideo().getHeight()); + target.setFullScreenAllowed(true); + + // ? In-game + target.setSceneFactory(new SceneFactory()); + target.setMainMenuEnabled(true); + target.setIntroEnabled(true); + } + + private SettingsManager() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/core/UserSetting.java b/src/main/java/com/github/codestorm/bounceverse/core/UserSetting.java new file mode 100644 index 0000000..9f278ae --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/core/UserSetting.java @@ -0,0 +1,107 @@ +package com.github.codestorm.bounceverse.core; + +import com.almasb.fxgl.logging.Logger; +import com.moandjiezana.toml.Toml; +import com.moandjiezana.toml.TomlWriter; +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * + * + *

{@link UserSetting}

+ * + * Thiết lập game của người chơi. + */ +public final class UserSetting { + private static final String FORMAT = "toml"; + + /** Setting về Hình ảnh. */ + public static final class Video { + private int width = 1024; + private int height = 768; + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + private Video() {} + } + + private Video video = new Video(); + + /** + * Lấy tên file setting tương ứng của người chơi. + * + * @return Tên file + */ + public static String getFilename() { + final String username = System.getProperty("user.name"); + return String.format("config.%s.%s", username, FORMAT); + } + + /** + * Lấy địa chỉ file setting tương ứng của người chơi. + * + * @return Địa chỉ file setting tuyệt đối + */ + public static Path getFilepath() { + return Paths.get(getFilename()).toAbsolutePath(); + } + + /** + * Lấy thiết lập game của người chơi. + * + * @return Thiết lập game của người chơi + */ + public static UserSetting getSetting() { + final var filepath = getFilepath(); + try { + final var file = new Toml().read(filepath.toString()); + return file.to(UserSetting.class); + } catch (IllegalStateException e) { + Logger.get(UserSetting.class) + .warning( + "Using default config because the user config file cannot be opened: " + + filepath, + e); + return new UserSetting(); + } + } + + /** + * Lưu thiết lập game thành file. + * + * @throws IOException if any file operations fail + */ + public void save() throws IOException { + final var filepath = getFilepath(); + TomlWriter writer = new TomlWriter(); + writer.write(this, new File(filepath.toUri())); + Logger.get(UserSetting.class).infof("Saved user config to: %s", filepath); + } + + public Video getVideo() { + return video; + } + + public void setVideo(Video video) { + this.video = video; + } + + private UserSetting() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java new file mode 100644 index 0000000..5de6df2 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java @@ -0,0 +1,46 @@ +package com.github.codestorm.bounceverse.core.systems; + +import com.almasb.fxgl.dsl.FXGL; +import com.github.codestorm.bounceverse.factory.BrickFactory; +import com.github.codestorm.bounceverse.factory.BulletFactory; +import com.github.codestorm.bounceverse.factory.PaddleFactory; +import com.github.codestorm.bounceverse.factory.WallFactory; + +public final class GameSystem extends System { + /** + * Lazy-loaded singleton holder. + * + *

Follow + * Initialization-on-demand holder idiom. + */ + private static final class Holder { + static final GameSystem INSTANCE = new GameSystem(); + } + + public static GameSystem getInstance() { + return GameSystem.Holder.INSTANCE; + } + + @Override + public void apply() { + FXGL.getGameWorld().addEntityFactory(new BrickFactory()); + FXGL.getGameWorld().addEntityFactory(new BulletFactory()); + FXGL.getGameWorld().addEntityFactory(new PaddleFactory()); + FXGL.getGameWorld().addEntityFactory(new WallFactory()); + + // Spawn walls. + FXGL.spawn("wallLeft"); + FXGL.spawn("wallRight"); + FXGL.spawn("wallTop"); + + // Spawn paddle + double px = FXGL.getAppWidth() / 2.0 - 60; + double py = FXGL.getAppHeight() - 40; + FXGL.spawn("paddle", px, py); + + FXGL.spawn("normalBrick", 100, 100); + FXGL.spawn("normalBrick", 200, 200); + } + + private GameSystem() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java new file mode 100644 index 0000000..5d60d9c --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java @@ -0,0 +1,64 @@ +package com.github.codestorm.bounceverse.core.systems; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.input.UserAction; +import com.github.codestorm.bounceverse.components.properties.Velocity; +import com.github.codestorm.bounceverse.data.types.EntityType; +import javafx.scene.input.KeyCode; + +public class InputSystem extends System { + /** + * Lazy-loaded singleton holder. + * + *

Follow + * Initialization-on-demand holder idiom. + */ + private static final class Holder { + static final InputSystem INSTANCE = new InputSystem(); + } + + public static InputSystem getInstance() { + return InputSystem.Holder.INSTANCE; + } + + @Override + public void apply() { + FXGL.getInput() + .addAction( + new UserAction("Move Left") { + @Override + protected void onActionBegin() { + FXGL.getGameWorld() + .getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Velocity.class).left()); + } + + @Override + protected void onActionEnd() { + FXGL.getGameWorld() + .getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Velocity.class).stop()); + } + }, + KeyCode.LEFT); + + FXGL.getInput() + .addAction( + new UserAction("Move Right") { + @Override + protected void onActionBegin() { + FXGL.getGameWorld() + .getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Velocity.class).right()); + } + + @Override + protected void onActionEnd() { + FXGL.getGameWorld() + .getEntitiesByType(EntityType.PADDLE) + .forEach(e -> e.getComponent(Velocity.class).stop()); + } + }, + KeyCode.RIGHT); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java similarity index 84% rename from src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java rename to src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java index 9599593..416fb5d 100644 --- a/src/main/java/com/github/codestorm/bounceverse/systems/physics/CollisionSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java @@ -1,26 +1,25 @@ -package com.github.codestorm.bounceverse.systems.physics; +package com.github.codestorm.bounceverse.core.systems; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.physics.CollisionHandler; import com.github.codestorm.bounceverse.components.properties.Velocity; -import com.github.codestorm.bounceverse.components.properties.Wall; import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; +import com.github.codestorm.bounceverse.components.properties.wall.Border; import com.github.codestorm.bounceverse.data.types.EntityType; -import com.github.codestorm.bounceverse.systems.System; /** * * - *

{@link CollisionSystem}

+ *

{@link PhysicSystem}

* - * Hệ thống xử lý va chạm. + * Hệ thống xử lý vật lý. * *

Đây là một Singleton, cần lấy instance thông qua {@link #getInstance()}. * * @see System */ -public final class CollisionSystem extends System { +public final class PhysicSystem extends System { /** * Lazy-loaded singleton holder. @@ -29,11 +28,10 @@ public final class CollisionSystem extends System { * Initialization-on-demand holder idiom. */ private static final class Holder { - - static final CollisionSystem INSTANCE = new CollisionSystem(); + static final PhysicSystem INSTANCE = new PhysicSystem(); } - public static CollisionSystem getInstance() { + public static PhysicSystem getInstance() { return Holder.INSTANCE; } @@ -49,6 +47,7 @@ protected void onCollisionBegin(Entity bullet, Entity brick) { // Nếu brick có máu -> trừ 1 HP if (brick.hasComponent(BrickHealth.class)) { brick.getComponent(BrickHealth.class).damage(1); + // TODO: kiểm tra shield } // Hủy viên đạn @@ -62,7 +61,7 @@ protected void onCollisionBegin(Entity bullet, Entity brick) { new CollisionHandler(EntityType.PADDLE, EntityType.WALL) { @Override protected void onCollision(Entity paddle, Entity wall) { - if (wall.hasComponent(Wall.class)) { + if (wall.hasComponent(Border.class)) { var wallProp = wall.getComponent(Wall.class); var move = paddle.getComponentOptional(Velocity.class); @@ -80,5 +79,5 @@ protected void onCollision(Entity paddle, Entity wall) { }); } - private CollisionSystem() {} + private PhysicSystem() {} } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java new file mode 100644 index 0000000..adba5ca --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java @@ -0,0 +1,31 @@ +package com.github.codestorm.bounceverse.core.systems; + +import com.github.codestorm.bounceverse.Bounceverse; + +/** + * + * + *

{@link System}

+ * + * Hệ thống logic trong game. Các lớp kế thừa nên thiết kế dựa trên (lazy-loaded) Singleton. + * + *

Tất cả logic của hệ thống được áp dụng thông qua {@link #apply()}. + * + *

FAQ

+ * + *
    + *
  • Q: Tại sao lại phải tạo Singleton? Bộ tạo static method trên class không được à cha + * nội??
    + * A: Tất cả là tại abstract/interface không cho ghi đè static đó!!! 😭😭😭 + *
+ */ +abstract class System { + /** + * Áp dụng logic của hệ thống vào game. + * + *

Sử dụng trên {@link Bounceverse} + */ + public abstract void apply(); + + protected System() {} +} diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java new file mode 100644 index 0000000..89ccea1 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java @@ -0,0 +1,25 @@ +package com.github.codestorm.bounceverse.core.systems; + +import com.almasb.fxgl.dsl.FXGL; +import javafx.scene.paint.Color; + +public class UISystem extends System { + /** + * Lazy-loaded singleton holder. + * + *

Follow + * Initialization-on-demand holder idiom. + */ + private static final class Holder { + static final UISystem INSTANCE = new UISystem(); + } + + public static UISystem getInstance() { + return UISystem.Holder.INSTANCE; + } + + @Override + public void apply() { + FXGL.getGameScene().setBackgroundColor(Color.web("#2B2B2B")); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/systems/LaunchOption.java b/src/main/java/com/github/codestorm/bounceverse/systems/LaunchOption.java deleted file mode 100644 index 7ee3686..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/systems/LaunchOption.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.github.codestorm.bounceverse.systems; - -import com.github.codestorm.bounceverse.Utils; - -/** - * - * - *

{@link LaunchOption}

- * - * Các tùy chọn khởi động được áp dụng trong game. - */ -public final class LaunchOption { - private boolean debug = false; - - public boolean isDebug() { - return debug; - } - - public LaunchOption(String... args) { - var map = Utils.IO.parseArgs(args, null, null); - debug = Boolean.parseBoolean(map.getOrDefault("debug", "false")); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/systems/System.java b/src/main/java/com/github/codestorm/bounceverse/systems/System.java deleted file mode 100644 index ce2cbd4..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/systems/System.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.github.codestorm.bounceverse.systems; - -/** - * - * - *

{@link System}

- * - * Hệ thống logic trong game. Các lớp kế thừa nên thiết kế dựa trên (lazy-loaded) Singleton. - * - *

Tất cả logic của hệ thống được áp dụng thông qua {@link #apply()}. - */ -public abstract class System { - /** - * Áp dụng logic của hệ thống vào game. - * - *

Sử dụng trên {@link com.github.codestorm.bounceverse.Bounceverse} - */ - public abstract void apply(); - - protected System() {} -} diff --git a/src/main/resources/configs/system/settings.properties b/src/main/resources/configs/system/settings.properties deleted file mode 100644 index 9977fd4..0000000 --- a/src/main/resources/configs/system/settings.properties +++ /dev/null @@ -1,4 +0,0 @@ -# settings -settings.name=Bounceverse -settings.version=1.0.0 -settings.devMode=true diff --git a/src/main/resources/credits.txt b/src/main/resources/credits.txt index 2b355fe..2c67d4f 100644 --- a/src/main/resources/credits.txt +++ b/src/main/resources/credits.txt @@ -1,13 +1,12 @@ -- Game - - -CodeStorm team +CodeStorm Leader: Mai Thành (@thnhmai06) - Members: Mạnh Tân (@ManhTanTran) Minh Ngọc (@minngoc1213) Anh Tuấn (@huynhtuan372) --o0o- \ No newline at end of file +-o0o- + +Thank you for playing! <3 \ No newline at end of file diff --git a/src/main/resources/configs/default.properties b/src/main/resources/options/default.properties similarity index 100% rename from src/main/resources/configs/default.properties rename to src/main/resources/options/default.properties diff --git a/src/main/resources/settings.properties b/src/main/resources/settings.properties new file mode 100644 index 0000000..39121c6 --- /dev/null +++ b/src/main/resources/settings.properties @@ -0,0 +1,5 @@ +# General +general.name=Bounceverse +general.version=1.0.0 +general.devMode=true + From 8a096ea9d5b858906680e9284543893cec1ea24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Sat, 18 Oct 2025 20:44:59 +0700 Subject: [PATCH 39/53] [skip ci] refactor: rename spotlessCheck.yml to spotless.yml for consistency --- .github/workflows/{spotlessCheck.yml => spotless.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{spotlessCheck.yml => spotless.yml} (100%) diff --git a/.github/workflows/spotlessCheck.yml b/.github/workflows/spotless.yml similarity index 100% rename from .github/workflows/spotlessCheck.yml rename to .github/workflows/spotless.yml From 3bd4d40e68c23208f6c01faabe2656d06ab4ee8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Mon, 20 Oct 2025 07:42:19 +0700 Subject: [PATCH 40/53] [skip ci] chore: Remove log files --- logs/FXGL-07-thg 10-2025-23.34.15.log | 202 ------------------------- logs/FXGL-07-thg 10-2025-23.34.36.log | 202 ------------------------- logs/FXGL-07-thg 10-2025-23.35.02.log | 202 ------------------------- logs/FXGL-07-thg 10-2025-23.35.28.log | 202 ------------------------- logs/FXGL-07-thg 10-2025-23.39.20.log | 202 ------------------------- logs/FXGL-07-thg 10-2025-23.42.03.log | 206 -------------------------- logs/FXGL-07-thg 10-2025-23.49.23.log | 206 -------------------------- logs/FXGL-07-thg 10-2025-23.49.25.log | 206 -------------------------- logs/FXGL-08-thg 10-2025-00.27.47.log | 206 -------------------------- logs/FXGL-08-thg 10-2025-00.28.38.log | 206 -------------------------- 10 files changed, 2040 deletions(-) delete mode 100644 logs/FXGL-07-thg 10-2025-23.34.15.log delete mode 100644 logs/FXGL-07-thg 10-2025-23.34.36.log delete mode 100644 logs/FXGL-07-thg 10-2025-23.35.02.log delete mode 100644 logs/FXGL-07-thg 10-2025-23.35.28.log delete mode 100644 logs/FXGL-07-thg 10-2025-23.39.20.log delete mode 100644 logs/FXGL-07-thg 10-2025-23.42.03.log delete mode 100644 logs/FXGL-07-thg 10-2025-23.49.23.log delete mode 100644 logs/FXGL-07-thg 10-2025-23.49.25.log delete mode 100644 logs/FXGL-08-thg 10-2025-00.27.47.log delete mode 100644 logs/FXGL-08-thg 10-2025-00.28.38.log diff --git a/logs/FXGL-07-thg 10-2025-23.34.15.log b/logs/FXGL-07-thg 10-2025-23.34.15.log deleted file mode 100644 index eefc84e..0000000 --- a/logs/FXGL-07-thg 10-2025-23.34.15.log +++ /dev/null @@ -1,202 +0,0 @@ -23:34:10.901 [main ] DEBUG Logger - Configured Logger -23:34:10.922 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -23:34:11.274 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -23:34:11.277 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -23:34:11.277 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -23:34:11.277 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -23:34:11.278 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -23:34:11.278 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -23:34:11.278 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -23:34:11.278 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -23:34:11.344 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -23:34:11.378 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -23:34:11.378 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -23:34:11.378 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:34:11.379 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -23:34:11.381 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -23:34:11.440 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -23:34:11.446 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -23:34:11.487 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -23:34:11.487 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -23:34:11.488 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -23:34:11.516 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -23:34:11.555 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -23:34:11.616 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -23:34:11.616 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -23:34:11.619 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -23:34:11.627 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -23:34:11.638 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -23:34:11.646 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -23:34:11.731 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -23:34:11.753 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -23:34:11.764 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -23:34:11.769 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:34:11.776 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -23:34:11.776 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -23:34:11.779 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -23:34:11.779 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -23:34:11.780 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -23:34:11.780 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -23:34:11.808 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,363 sec -23:34:11.809 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -23:34:11.815 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -23:34:11.822 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -23:34:11.825 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -23:34:11.829 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -23:34:11.829 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -23:34:11.830 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -23:34:11.830 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -23:34:11.833 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -23:34:11.833 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -23:34:11.834 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -23:34:11.835 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:34:11.835 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -23:34:11.847 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -23:34:11.847 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -23:34:11.847 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -23:34:11.847 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -23:34:11.847 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -23:34:11.847 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -23:34:11.850 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game -23:34:11.906 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -23:34:11.936 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,086 sec -23:34:11.972 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:34:11.978 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -23:34:11.978 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -23:34:14.779 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -23:34:14.780 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -23:34:14.781 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@70de3200 -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -23:34:14.782 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -23:34:14.783 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -23:34:15.550 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -23:34:15.550 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -23:34:15.550 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -23:34:15.552 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:34:15.554 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -23:34:15.554 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -23:34:15.562 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.34.36.log b/logs/FXGL-07-thg 10-2025-23.34.36.log deleted file mode 100644 index fe7755f..0000000 --- a/logs/FXGL-07-thg 10-2025-23.34.36.log +++ /dev/null @@ -1,202 +0,0 @@ -23:34:26.535 [main ] DEBUG Logger - Configured Logger -23:34:26.553 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -23:34:26.865 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -23:34:26.868 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -23:34:26.868 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -23:34:26.868 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -23:34:26.868 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -23:34:26.868 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -23:34:26.868 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -23:34:26.869 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -23:34:26.939 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -23:34:26.974 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -23:34:26.974 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -23:34:26.974 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:34:26.975 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -23:34:26.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -23:34:27.037 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -23:34:27.037 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -23:34:27.038 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:34:27.038 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -23:34:27.038 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -23:34:27.043 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -23:34:27.082 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -23:34:27.082 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -23:34:27.083 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -23:34:27.111 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -23:34:27.150 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -23:34:27.200 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -23:34:27.202 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -23:34:27.204 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -23:34:27.210 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -23:34:27.222 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -23:34:27.228 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -23:34:27.304 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -23:34:27.321 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -23:34:27.331 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -23:34:27.335 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:34:27.343 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -23:34:27.343 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -23:34:27.346 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -23:34:27.346 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -23:34:27.346 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -23:34:27.347 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -23:34:27.379 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,336 sec -23:34:27.380 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -23:34:27.383 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -23:34:27.390 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -23:34:27.393 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -23:34:27.399 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -23:34:27.400 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -23:34:27.401 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -23:34:27.402 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -23:34:27.402 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -23:34:27.403 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -23:34:27.403 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -23:34:27.404 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -23:34:27.404 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:34:27.417 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -23:34:27.418 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -23:34:27.418 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -23:34:27.418 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -23:34:27.418 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -23:34:27.418 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -23:34:27.419 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game -23:34:27.464 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -23:34:27.493 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,074 sec -23:34:27.528 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:34:27.535 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -23:34:27.535 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -23:34:30.346 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -23:34:30.347 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -23:34:30.348 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -23:34:30.349 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@2619c44c -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -23:34:30.350 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -23:34:30.351 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -23:34:36.567 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -23:34:36.567 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -23:34:36.567 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -23:34:36.569 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:34:36.570 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -23:34:36.570 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -23:34:36.581 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.35.02.log b/logs/FXGL-07-thg 10-2025-23.35.02.log deleted file mode 100644 index 3649a1b..0000000 --- a/logs/FXGL-07-thg 10-2025-23.35.02.log +++ /dev/null @@ -1,202 +0,0 @@ -23:34:56.423 [main ] DEBUG Logger - Configured Logger -23:34:56.443 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -23:34:56.763 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -23:34:56.766 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -23:34:56.766 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -23:34:56.766 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -23:34:56.766 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -23:34:56.766 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -23:34:56.766 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -23:34:56.767 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -23:34:56.835 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -23:34:56.871 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -23:34:56.871 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -23:34:56.871 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:34:56.872 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -23:34:56.874 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -23:34:56.933 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -23:34:56.934 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -23:34:56.934 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:34:56.934 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -23:34:56.934 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -23:34:56.939 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -23:34:56.978 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -23:34:56.979 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -23:34:56.979 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -23:34:57.009 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -23:34:57.049 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -23:34:57.097 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -23:34:57.097 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -23:34:57.101 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -23:34:57.108 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -23:34:57.118 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -23:34:57.125 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -23:34:57.206 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -23:34:57.224 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -23:34:57.235 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -23:34:57.239 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:34:57.245 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -23:34:57.245 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -23:34:57.248 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -23:34:57.249 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -23:34:57.249 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -23:34:57.250 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -23:34:57.282 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,343 sec -23:34:57.283 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -23:34:57.292 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -23:34:57.295 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -23:34:57.302 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -23:34:57.303 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -23:34:57.304 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -23:34:57.305 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -23:34:57.305 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -23:34:57.308 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -23:34:57.308 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -23:34:57.309 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -23:34:57.309 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:34:57.310 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -23:34:57.321 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -23:34:57.321 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -23:34:57.321 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -23:34:57.321 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -23:34:57.321 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -23:34:57.321 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -23:34:57.322 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Initializing game -23:34:57.368 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -23:34:57.398 [FXGL Background Thread 1 ] INFO FXGLApplication - Game initialization took: 0,076 sec -23:34:57.432 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:34:57.438 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -23:34:57.438 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -23:35:00.249 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -23:35:00.250 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -23:35:00.252 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@45a50c2b -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -23:35:00.253 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -23:35:00.254 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -23:35:02.391 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -23:35:02.391 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -23:35:02.391 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -23:35:02.394 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:35:02.396 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -23:35:02.397 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -23:35:02.408 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.35.28.log b/logs/FXGL-07-thg 10-2025-23.35.28.log deleted file mode 100644 index a5b7967..0000000 --- a/logs/FXGL-07-thg 10-2025-23.35.28.log +++ /dev/null @@ -1,202 +0,0 @@ -23:35:14.256 [main ] DEBUG Logger - Configured Logger -23:35:14.276 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -23:35:14.593 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -23:35:14.596 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -23:35:14.596 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -23:35:14.596 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -23:35:14.596 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -23:35:14.597 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -23:35:14.597 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -23:35:14.597 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -23:35:14.664 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -23:35:14.698 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -23:35:14.698 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -23:35:14.698 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:35:14.699 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -23:35:14.701 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -23:35:14.760 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -23:35:14.766 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -23:35:14.806 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -23:35:14.806 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -23:35:14.806 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -23:35:14.835 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -23:35:14.876 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -23:35:14.933 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -23:35:14.933 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -23:35:14.936 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -23:35:14.944 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -23:35:14.954 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -23:35:14.960 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -23:35:15.043 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -23:35:15.063 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -23:35:15.072 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -23:35:15.077 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:35:15.084 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -23:35:15.085 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -23:35:15.087 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -23:35:15.087 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -23:35:15.088 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -23:35:15.088 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -23:35:15.123 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,357 sec -23:35:15.124 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -23:35:15.127 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -23:35:15.137 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -23:35:15.139 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -23:35:15.146 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -23:35:15.150 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -23:35:15.151 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -23:35:15.151 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -23:35:15.152 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -23:35:15.153 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -23:35:15.153 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -23:35:15.154 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -23:35:15.154 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:35:15.167 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -23:35:15.167 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -23:35:15.167 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -23:35:15.167 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -23:35:15.167 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -23:35:15.167 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -23:35:15.169 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -23:35:15.169 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game -23:35:15.243 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,075 sec -23:35:15.279 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:35:15.285 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -23:35:15.285 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -23:35:18.088 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -23:35:18.089 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -23:35:18.090 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -23:35:18.090 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -23:35:18.090 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -23:35:18.090 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -23:35:18.091 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -23:35:18.092 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -23:35:18.093 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@2bfc4f8a -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -23:35:18.094 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -23:35:18.095 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -23:35:28.742 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -23:35:28.742 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -23:35:28.743 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -23:35:28.745 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:35:28.746 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -23:35:28.746 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -23:35:28.758 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.39.20.log b/logs/FXGL-07-thg 10-2025-23.39.20.log deleted file mode 100644 index 6d8b139..0000000 --- a/logs/FXGL-07-thg 10-2025-23.39.20.log +++ /dev/null @@ -1,202 +0,0 @@ -23:39:14.830 [main ] DEBUG Logger - Configured Logger -23:39:14.850 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -23:39:15.173 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -23:39:15.176 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -23:39:15.176 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -23:39:15.176 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -23:39:15.176 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -23:39:15.176 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -23:39:15.176 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -23:39:15.177 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -23:39:15.246 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -23:39:15.278 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -23:39:15.279 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -23:39:15.279 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:39:15.279 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -23:39:15.282 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -23:39:15.339 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -23:39:15.339 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -23:39:15.340 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:39:15.340 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -23:39:15.340 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -23:39:15.345 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -23:39:15.388 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -23:39:15.389 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -23:39:15.389 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -23:39:15.419 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -23:39:15.457 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -23:39:15.506 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -23:39:15.506 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -23:39:15.508 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -23:39:15.517 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -23:39:15.526 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -23:39:15.532 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -23:39:15.614 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -23:39:15.632 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -23:39:15.641 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -23:39:15.646 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:39:15.654 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -23:39:15.654 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -23:39:15.657 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -23:39:15.657 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -23:39:15.658 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -23:39:15.658 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -23:39:15.682 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,337 sec -23:39:15.683 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -23:39:15.694 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -23:39:15.697 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -23:39:15.704 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -23:39:15.704 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -23:39:15.704 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -23:39:15.705 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -23:39:15.705 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -23:39:15.707 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -23:39:15.707 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -23:39:15.708 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -23:39:15.708 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:39:15.715 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -23:39:15.718 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -23:39:15.719 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -23:39:15.719 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -23:39:15.719 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -23:39:15.719 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -23:39:15.719 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -23:39:15.722 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Initializing game -23:39:15.770 [FXGL Background Thread 1 ] INFO FXGLApplication - Game initialization took: 0,048 sec -23:39:15.771 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -23:39:15.774 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:39:15.779 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -23:39:15.779 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -23:39:18.658 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -23:39:18.659 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:39:18.660 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -23:39:18.662 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -23:39:18.664 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -23:39:18.665 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -23:39:18.666 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -23:39:18.667 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@7069010b -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -23:39:18.668 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -23:39:20.766 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -23:39:20.766 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -23:39:20.767 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -23:39:20.769 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:39:20.772 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -23:39:20.772 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -23:39:20.784 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.42.03.log b/logs/FXGL-07-thg 10-2025-23.42.03.log deleted file mode 100644 index 8915a63..0000000 --- a/logs/FXGL-07-thg 10-2025-23.42.03.log +++ /dev/null @@ -1,206 +0,0 @@ -23:41:19.563 [main ] DEBUG Logger - Configured Logger -23:41:19.581 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -23:41:19.906 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -23:41:19.909 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -23:41:19.910 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -23:41:19.910 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -23:41:19.910 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -23:41:19.910 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -23:41:19.910 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -23:41:19.910 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -23:41:19.979 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -23:41:20.012 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -23:41:20.012 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -23:41:20.012 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:41:20.012 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -23:41:20.014 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -23:41:20.074 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -23:41:20.074 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -23:41:20.075 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:41:20.075 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -23:41:20.075 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -23:41:20.080 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -23:41:20.122 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -23:41:20.122 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -23:41:20.123 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -23:41:20.151 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -23:41:20.191 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -23:41:20.247 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -23:41:20.247 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -23:41:20.250 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -23:41:20.258 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -23:41:20.269 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -23:41:20.277 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -23:41:20.355 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -23:41:20.377 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -23:41:20.388 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -23:41:20.392 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:41:20.400 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -23:41:20.400 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -23:41:20.402 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -23:41:20.402 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -23:41:20.403 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -23:41:20.403 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -23:41:20.430 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,349 sec -23:41:20.437 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A -23:41:20.437 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D -23:41:20.437 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left -23:41:20.438 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -23:41:20.438 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right -23:41:20.438 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -23:41:20.447 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -23:41:20.455 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -23:41:20.457 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -23:41:20.458 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -23:41:20.459 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -23:41:20.459 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -23:41:20.461 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -23:41:20.464 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -23:41:20.464 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -23:41:20.465 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -23:41:20.465 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:41:20.476 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -23:41:20.476 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -23:41:20.476 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -23:41:20.476 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -23:41:20.476 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -23:41:20.476 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -23:41:20.479 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -23:41:20.479 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game -23:41:20.557 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,079 sec -23:41:20.601 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:41:20.606 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -23:41:20.606 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -23:41:23.402 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -23:41:23.403 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -23:41:23.404 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -23:41:23.405 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@1ee36b3d -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -23:41:23.406 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -23:42:03.975 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -23:42:03.976 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -23:42:03.976 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -23:42:03.979 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:42:03.981 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -23:42:03.982 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -23:42:03.993 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.49.23.log b/logs/FXGL-07-thg 10-2025-23.49.23.log deleted file mode 100644 index c55af77..0000000 --- a/logs/FXGL-07-thg 10-2025-23.49.23.log +++ /dev/null @@ -1,206 +0,0 @@ -23:48:57.444 [main ] DEBUG Logger - Configured Logger -23:48:57.461 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -23:48:57.800 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -23:48:57.803 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -23:48:57.803 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -23:48:57.804 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -23:48:57.804 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -23:48:57.804 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -23:48:57.804 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -23:48:57.804 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -23:48:57.879 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -23:48:57.913 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -23:48:57.914 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -23:48:57.914 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:48:57.915 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -23:48:57.917 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -23:48:57.977 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -23:48:57.983 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -23:48:58.023 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -23:48:58.023 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -23:48:58.023 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -23:48:58.051 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -23:48:58.092 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -23:48:58.145 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -23:48:58.145 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -23:48:58.147 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -23:48:58.155 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -23:48:58.165 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -23:48:58.172 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -23:48:58.251 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -23:48:58.274 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -23:48:58.283 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -23:48:58.287 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:48:58.295 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -23:48:58.296 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -23:48:58.298 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -23:48:58.299 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -23:48:58.299 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -23:48:58.299 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -23:48:58.331 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,348 sec -23:48:58.336 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -23:48:58.339 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A -23:48:58.339 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D -23:48:58.340 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left -23:48:58.340 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right -23:48:58.341 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -23:48:58.345 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -23:48:58.353 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -23:48:58.355 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -23:48:58.356 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -23:48:58.356 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -23:48:58.356 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -23:48:58.357 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -23:48:58.359 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -23:48:58.359 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -23:48:58.361 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -23:48:58.361 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:48:58.375 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -23:48:58.375 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -23:48:58.375 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -23:48:58.375 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -23:48:58.375 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -23:48:58.375 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -23:48:58.377 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game -23:48:58.439 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -23:48:58.464 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,087 sec -23:48:58.503 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:48:58.511 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -23:48:58.511 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -23:49:01.297 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -23:49:01.297 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -23:49:01.298 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -23:49:01.299 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -23:49:01.300 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -23:49:01.301 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -23:49:01.303 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@45ef8637 -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -23:49:01.304 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -23:49:01.305 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -23:49:23.317 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -23:49:23.317 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -23:49:23.317 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -23:49:23.319 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:49:23.321 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -23:49:23.321 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -23:49:23.330 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-07-thg 10-2025-23.49.25.log b/logs/FXGL-07-thg 10-2025-23.49.25.log deleted file mode 100644 index 5fdc630..0000000 --- a/logs/FXGL-07-thg 10-2025-23.49.25.log +++ /dev/null @@ -1,206 +0,0 @@ -23:49:09.070 [main ] DEBUG Logger - Configured Logger -23:49:09.088 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -23:49:09.406 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -23:49:09.409 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -23:49:09.409 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -23:49:09.409 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -23:49:09.409 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -23:49:09.409 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -23:49:09.410 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -23:49:09.410 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -23:49:09.476 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -23:49:09.510 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -23:49:09.511 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -23:49:09.511 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:49:09.511 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -23:49:09.514 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -23:49:09.576 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -23:49:09.581 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -23:49:09.623 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -23:49:09.623 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -23:49:09.624 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -23:49:09.651 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -23:49:09.688 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -23:49:09.743 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -23:49:09.743 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -23:49:09.745 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -23:49:09.753 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -23:49:09.763 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -23:49:09.770 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -23:49:09.850 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -23:49:09.867 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -23:49:09.876 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -23:49:09.879 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: C:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:49:09.886 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -23:49:09.886 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -23:49:09.889 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -23:49:09.889 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -23:49:09.890 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -23:49:09.891 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -23:49:09.919 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,338 sec -23:49:09.926 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A -23:49:09.926 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D -23:49:09.927 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left -23:49:09.927 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right -23:49:09.927 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -23:49:09.927 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -23:49:09.936 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -23:49:09.939 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -23:49:09.941 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -23:49:09.941 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -23:49:09.943 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -23:49:09.943 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -23:49:09.945 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -23:49:09.945 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -23:49:09.946 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -23:49:09.947 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:49:09.947 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -23:49:09.957 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -23:49:09.958 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -23:49:09.958 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -23:49:09.958 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -23:49:09.958 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -23:49:09.958 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -23:49:09.959 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Initializing game -23:49:10.017 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -23:49:10.037 [FXGL Background Thread 1 ] INFO FXGLApplication - Game initialization took: 0,077 sec -23:49:10.085 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -23:49:10.091 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -23:49:10.091 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -23:49:12.890 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -23:49:12.891 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -23:49:12.891 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -23:49:12.892 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -23:49:12.893 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -23:49:12.894 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -23:49:12.895 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -23:49:12.896 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@6c43fb21 -23:49:12.897 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -23:49:12.898 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -23:49:25.342 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -23:49:25.343 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -23:49:25.343 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -23:49:25.344 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: C:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -23:49:25.346 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -23:49:25.346 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -23:49:25.358 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-08-thg 10-2025-00.27.47.log b/logs/FXGL-08-thg 10-2025-00.27.47.log deleted file mode 100644 index 75ee13a..0000000 --- a/logs/FXGL-08-thg 10-2025-00.27.47.log +++ /dev/null @@ -1,206 +0,0 @@ -00:27:35.727 [main ] DEBUG Logger - Configured Logger -00:27:35.747 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -00:27:36.066 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -00:27:36.068 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -00:27:36.069 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -00:27:36.069 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -00:27:36.069 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -00:27:36.069 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -00:27:36.069 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -00:27:36.069 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -00:27:36.135 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -00:27:36.170 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -00:27:36.171 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -00:27:36.171 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -00:27:36.171 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -00:27:36.173 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -00:27:36.231 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -00:27:36.232 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -00:27:36.232 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -00:27:36.232 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -00:27:36.232 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -00:27:36.237 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -00:27:36.280 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -00:27:36.280 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -00:27:36.281 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -00:27:36.311 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -00:27:36.351 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -00:27:36.408 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -00:27:36.409 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -00:27:36.411 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -00:27:36.419 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -00:27:36.429 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -00:27:36.436 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -00:27:36.519 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -00:27:36.536 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -00:27:36.549 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -00:27:36.553 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -00:27:36.560 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -00:27:36.560 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -00:27:36.564 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -00:27:36.564 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -00:27:36.565 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -00:27:36.565 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -00:27:36.589 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,353 sec -00:27:36.598 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A -00:27:36.598 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D -00:27:36.598 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left -00:27:36.599 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right -00:27:36.599 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -00:27:36.599 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -00:27:36.608 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -00:27:36.610 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -00:27:36.613 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -00:27:36.614 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -00:27:36.615 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -00:27:36.616 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -00:27:36.618 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -00:27:36.618 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -00:27:36.620 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -00:27:36.622 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -00:27:36.623 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -00:27:36.635 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -00:27:36.636 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -00:27:36.636 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -00:27:36.636 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -00:27:36.636 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -00:27:36.636 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -00:27:36.638 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Initializing game -00:27:36.688 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -00:27:36.725 [FXGL Background Thread 4 ] INFO FXGLApplication - Game initialization took: 0,087 sec -00:27:36.749 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -00:27:36.753 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -00:27:36.753 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -00:27:39.563 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -00:27:39.563 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -00:27:39.564 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -00:27:39.565 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -00:27:39.566 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@56c18913 -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -00:27:39.567 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -00:27:39.568 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -00:27:47.550 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -00:27:47.550 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -00:27:47.550 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -00:27:47.553 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -00:27:47.555 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -00:27:47.555 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -00:27:47.564 [JavaFX Application Thread] DEBUG Logger - Closing Logger diff --git a/logs/FXGL-08-thg 10-2025-00.28.38.log b/logs/FXGL-08-thg 10-2025-00.28.38.log deleted file mode 100644 index 28015ff..0000000 --- a/logs/FXGL-08-thg 10-2025-00.28.38.log +++ /dev/null @@ -1,206 +0,0 @@ -00:28:19.643 [main ] DEBUG Logger - Configured Logger -00:28:19.663 [main ] DEBUG GameApplication - Logging settings -Title: Untitled -Version: 0.0 -Width: 900 -Height: 600 -Fullscreen: false -Intro: false -Profiling: false -Single step:false -App Mode: DEVELOPER -Menu Key: ESCAPE -Stage Style: DECORATED -Scene Factory: class com.github.codestorm.bounceverse.BounceVerseApp$1 - -00:28:19.978 [JavaFX Application Thread] DEBUG FXGLApplication - Initializing FXGL -00:28:19.980 [JavaFX Application Thread] INFO Engine - FXGL-21.1 (27.03.2024 07.52) on WINDOWS (J:21.0.8 FX:21.0.3) -00:28:19.981 [JavaFX Application Thread] DEBUG Engine - JRE Vendor Name: Eclipse Adoptium -00:28:19.981 [JavaFX Application Thread] DEBUG Engine - Running on OS: Windows 11 version 10.0 -00:28:19.981 [JavaFX Application Thread] DEBUG Engine - Architecture: amd64 -00:28:19.981 [JavaFX Application Thread] INFO Engine - Source code and latest versions at: https://github.com/AlmasB/FXGL -00:28:19.981 [JavaFX Application Thread] INFO Engine - Ask questions and discuss at: https://github.com/AlmasB/FXGL/discussions -00:28:19.981 [JavaFX Application Thread] INFO Engine - Join the FXGL chat at: https://gitter.im/AlmasB/FXGL -00:28:20.063 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Creating a JavaFX scene -00:28:20.096 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Target settings size: 900.0 x 600.0 -00:28:20.096 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled scene size: 900.0 x 600.0 -00:28:20.096 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -00:28:20.097 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Set initial scene to FXGLStartupScene -00:28:20.099 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Opening main window -00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Window border size: (16.0, 39.0) -00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled size: 900.0 x 600.0 -00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scaled ratio: (1.0, 1.0) -00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Scene size: 900.0 x 600.0 -00:28:20.158 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Stage size: 916.0 x 639.0 -00:28:20.162 [FXGL Background Thread 1 ] DEBUG Engine - Initializing environment variables -00:28:20.201 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - User app class for loading assets: class com.github.codestorm.bounceverse.BounceVerseApp -00:28:20.201 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Applying CSS: fxgl_dark.css -00:28:20.202 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/css/fxgl_dark.css -00:28:20.230 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Initializing application scenes -00:28:20.266 [FXGL Background Thread 1 ] DEBUG GameWorld - Game world initialized -00:28:20.315 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Physics world initialized: appHeight=600, physics.ppm=50,0 -00:28:20.316 [FXGL Background Thread 1 ] DEBUG PhysicsWorld - Using strategy: BRUTE_FORCE -00:28:20.318 [FXGL Background Thread 1 ] DEBUG GameScene - Game scene initialized: 900x600 -00:28:20.325 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createMenuBodyGameMenu() -00:28:20.336 [FXGL Background Thread 1 ] DEBUG FXGL.DefaultMenu - createOptionsMenu() -00:28:20.342 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/smoke.png -00:28:20.428 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/particles/trace_horizontal.png -00:28:20.446 [FXGL Background Thread 1 ] DEBUG GameApplicationServi - Application scenes initialized -00:28:20.456 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Loading FXGL system data -00:28:20.461 [FXGL Background Thread 1 ] DEBUG FileSystemAccess - Reading from: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -00:28:20.469 [FXGL Background Thread 1 ] DEBUG SystemBundleService - Bundle FXGL: {} -00:28:20.469 [FXGL Background Thread 1 ] DEBUG UpdaterService - Checking for updates -00:28:20.472 [FXGL Background Thread 4 ] DEBUG FXGLApplication - Loading fonts -00:28:20.473 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/VarelaRound-Regular.ttf -00:28:20.473 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Loading default localization -00:28:20.473 [FXGL Background Thread 1 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/languages/english.lang -00:28:20.496 [FXGL Background Thread 1 ] INFO FXGLApplication - FXGL initialization took: 0,333 sec -00:28:20.505 [JavaFX Application Thread] DEBUG Input - Registered new binding: action0 - A -00:28:20.506 [JavaFX Application Thread] DEBUG Input - Registered new binding: action1 - D -00:28:20.506 [JavaFX Application Thread] DEBUG Input - Registered new binding: action2 - Left -00:28:20.506 [JavaFX Application Thread] DEBUG Input - Registered new binding: action3 - Right -00:28:20.507 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_icon.png -00:28:20.511 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Abel-Regular.ttf -00:28:20.519 [JavaFX Application Thread] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/textures/fxgl_default_cursor.png -00:28:20.521 [JavaFX Application Thread] DEBUG Input - Registered new binding: Screenshot - CTRL+8 -00:28:20.521 [JavaFX Application Thread] DEBUG Input - Registered new binding: System info dump - CTRL+9 -00:28:20.523 [JavaFX Application Thread] DEBUG Input - Registered new binding: Restart - CTRL+R -00:28:20.523 [JavaFX Application Thread] DEBUG Input - Registered new binding: Toggle Debug Camera - CTRL+7 -00:28:20.524 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/TerminalLandMono-Regular.otf -00:28:20.526 [JavaFX Application Thread] DEBUG LoopRunner - Starting loop -00:28:20.526 [JavaFX Application Thread] DEBUG LoopRunner - Initializing JavaFX AnimationTimerLoop -00:28:20.527 [JavaFX Application Thread] DEBUG GameApplicationServi - Starting new game -00:28:20.528 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -00:28:20.535 [FXGL Background Thread 4 ] DEBUG FXGLAssetLoaderServi - Loading from file system: jar:file:/C:/Users/ADMIN/.gradle/caches/modules-2/files-2.1/com.github.almasb/fxgl/21.1/88c288ebc8641e470d974327703f09f8958e725d/fxgl-21.1.jar!/fxglassets/ui/fonts/Courier-Prime.ttf -00:28:20.540 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLStartupScene and adding to FXGLLoadingScene -00:28:20.540 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLStartupScene -> FXGLLoadingScene -00:28:20.540 [JavaFX Application Thread] DEBUG GameApplicationServi - Clearing previous game -00:28:20.540 [JavaFX Application Thread] DEBUG GameScene - Clearing game scene -00:28:20.540 [JavaFX Application Thread] DEBUG GameWorld - Clearing game world -00:28:20.541 [JavaFX Application Thread] DEBUG PhysicsWorld - Clearing physics world -00:28:20.542 [FXGL Background Thread 1 ] DEBUG FXGLApplication - Initializing game -00:28:20.592 [JavaFX Application Thread] DEBUG FXGLApplication - Registering font factories with UI factory -00:28:20.593 [FXGL Background Thread 1 ] INFO FXGLApplication - Game initialization took: 0,051 sec -00:28:20.656 [JavaFX Application Thread] DEBUG Input - Clearing active input actions -00:28:20.661 [JavaFX Application Thread] DEBUG GameApplicationServi - Removing overlay from FXGLLoadingScene and adding to GameScene -00:28:20.661 [JavaFX Application Thread] DEBUG PrimaryStageWindow - FXGLLoadingScene -> GameScene -00:28:23.472 [FXGL Background Thread 3 ] DEBUG Engine - Logging environment variables -00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - achievements: [] -00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - actualHeight: 600.0 -00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - actualHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - actualWidth: 900.0 -00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - actualWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - appIcon: fxgl_icon.png -00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - applicationMode: DEVELOPER -00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - cSSList: [fxgl_dark.css] -00:28:23.473 [FXGL Background Thread 3 ] DEBUG Engine - collisionDetectionStrategy: BRUTE_FORCE -00:28:23.474 [FXGL Background Thread 3 ] DEBUG Engine - configClass: Optional.empty -00:28:23.474 [FXGL Background Thread 3 ] DEBUG Engine - credits: [] -00:28:23.474 [FXGL Background Thread 3 ] DEBUG Engine - defaultCursor: CursorInfo(imageName=fxgl_default_cursor.png, hotspotX=7.0, hotspotY=6.0) -00:28:23.474 [FXGL Background Thread 3 ] DEBUG Engine - devBBoxColorProperty: ObjectProperty [value: 0xff0000ff] -00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - devEnableDebugCameraProperty: BooleanProperty [value: false] -00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - devSensorColorProperty: ObjectProperty [value: 0xffff00ff] -00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - devShowBBoxProperty: BooleanProperty [value: false] -00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - devShowPositionProperty: BooleanProperty [value: false] -00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - enabledMenuItems: [] -00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - engineServices: [class com.almasb.fxgl.app.services.FXGLAssetLoaderService, class com.almasb.fxgl.app.FXGLApplication$GameApplicationService, class com.almasb.fxgl.app.services.FXGLDialogService, class com.almasb.fxgl.app.services.IOTaskExecutorService, class com.almasb.fxgl.io.FileSystemService, class com.almasb.fxgl.localization.LocalizationService, class com.almasb.fxgl.app.services.SystemBundleService, class com.almasb.fxgl.profile.SaveLoadService, class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider, class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider, class com.almasb.fxgl.audio.AudioPlayer, class com.almasb.fxgl.notification.impl.NotificationServiceProvider, class com.almasb.fxgl.achievement.AchievementService, class com.almasb.fxgl.cutscene.CutsceneService, class com.almasb.fxgl.minigames.MiniGameService, class com.almasb.fxgl.net.NetService, class com.almasb.fxgl.app.services.UpdaterService, class com.almasb.fxgl.dev.DevService] -00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - fontGame: Abel-Regular.ttf -00:28:23.475 [FXGL Background Thread 3 ] DEBUG Engine - fontMono: TerminalLandMono-Regular.otf -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - fontSizeScaleUI: 1.0 -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - fontText: Courier-Prime.ttf -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - fontUI: VarelaRound-Regular.ttf -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - fullScreen: BooleanProperty [value: false] -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficulty: MEDIUM -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - gameDifficultyProperty: ObjectProperty [value: MEDIUM] -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolume: 0.5 -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - globalMusicVolumeProperty: DoubleProperty [value: 0.5] -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolume: 0.5 -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - globalSoundVolumeProperty: DoubleProperty [value: 0.5] -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - height: 600 -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - is3D: false -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isAndroid: false -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isBrowser: false -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isClickFeedbackEnabled: false -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isCloseConfirmation: false -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isDesktop: true -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isDeveloperMenuEnabled: false -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isEmbedded: false -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isEntityPreloadEnabled: true -00:28:23.476 [FXGL Background Thread 3 ] DEBUG Engine - isExperimentalTiledLargeMap: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isFileSystemWriteAllowed: true -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenAllowed: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isFullScreenFromStart: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isGameMenuEnabled: true -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isIOS: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isIntroEnabled: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isLinux: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isMac: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isMainMenuEnabled: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isManualResizeEnabled: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isMobile: false -00:28:23.477 [FXGL Background Thread 3 ] DEBUG Engine - isNative: false -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isPauseMusicWhenMinimized: true -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isPreserveResizeRatio: false -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isProfilingEnabled: false -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isScaleAffectedOnResize: true -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isSingleStep: false -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isUserProfileEnabled: false -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - isWindows: true -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - language: ObjectProperty [value: ENGLISH] -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - menuKey: ESCAPE -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - mouseSensitivity: 0.2 -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - notificationViewClass: class com.almasb.fxgl.notification.view.XboxNotificationView -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - pixelsPerMeter: 50.0 -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - platform: WINDOWS -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - prefHeightProperty: ReadOnlyDoubleProperty [value: 600.0] -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - prefWidthProperty: ReadOnlyDoubleProperty [value: 900.0] -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - profileDir: profiles/ -00:28:23.478 [FXGL Background Thread 3 ] DEBUG Engine - profileName: StringProperty [value: DEFAULT] -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - randomSeed: -1 -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - runtimeInfo: RuntimeInfo(platform=WINDOWS, version=21.1, build=27.03.2024 07.52) -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - saveFileExt: sav -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - scaledHeightProp$fxgl: DoubleProperty [bound, value: 600.0] -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - scaledWidthProp$fxgl: DoubleProperty [bound, value: 900.0] -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - sceneFactory: com.github.codestorm.bounceverse.BounceVerseApp$1@1ff824d5 -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - secondsIn24h: 60 -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuBack: menu/back.wav -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuPress: menu/press.wav -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - soundMenuSelect: menu/select.wav -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - soundNotification: core/notification.wav -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - stageStyle: DECORATED -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - supportedLanguages: [ENGLISH, FRENCH, GERMAN, HUNGARIAN, RUSSIAN] -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - ticksPerSecond: -1 -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - title: Untitled -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - urlGithub: https://github.com/AlmasB/FXGL -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - urlLeaderboard: http://fxgl-top.herokuapp.com/ -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - urlPOM: https://raw.githubusercontent.com/AlmasB/FXGL/release/README.md -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - userAppClass: class com.github.codestorm.bounceverse.BounceVerseApp -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - version: 0.0 -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - versionCheckDays: 7 -00:28:23.479 [FXGL Background Thread 3 ] DEBUG Engine - width: 900 -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - Logging services -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLAssetLoaderService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.FXGLApplication$GameApplicationService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.FXGLDialogService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.IOTaskExecutorService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.io.FileSystemService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.localization.LocalizationService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.SystemBundleService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.profile.SaveLoadService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLUIFactoryServiceProvider -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.ui.FXGLDialogFactoryServiceProvider -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.audio.AudioPlayer -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.notification.impl.NotificationServiceProvider -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.achievement.AchievementService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.cutscene.CutsceneService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.minigames.MiniGameService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.net.NetService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.app.services.UpdaterService -00:28:23.480 [FXGL Background Thread 3 ] DEBUG Engine - class com.almasb.fxgl.dev.DevService -00:28:38.266 [JavaFX Application Thread] DEBUG FXGLApplication - Exiting FXGL -00:28:38.266 [JavaFX Application Thread] DEBUG LoopRunner - Stopping loop -00:28:38.266 [JavaFX Application Thread] DEBUG SystemBundleService - Saving FXGL system data -00:28:38.268 [JavaFX Application Thread] DEBUG FileSystemAccess - Writing to: c:\Users\ADMIN\Documents\bounceverse\system\fxgl.bundle -00:28:38.269 [JavaFX Application Thread] DEBUG Async - Shutting down background threads -00:28:38.270 [JavaFX Application Thread] DEBUG PrimaryStageWindow - Closing main window -00:28:38.281 [JavaFX Application Thread] DEBUG Logger - Closing Logger From 8f753cfb62a0acf06cd20de8b52e3284045afe9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Mon, 20 Oct 2025 21:31:28 +0700 Subject: [PATCH 41/53] Replace `For*` interface tag by annotation (#16) * [skip ci] refactor: replace `For*` interface with `Suitable*` annotation (remove `Tag` system) * [skip ci] chore: reformat code and optimize import * [skip ci] chore: update JAVA_LANGUAGE to 24_PREVIEW * [skip ci] refactor: Assign new `For*` annotation for components * [skip ci] fix: fix null ref on `Utils.Time.Cooldown#current` --- .github/git-commit-instructions.md | 84 +++++++++++++----- .run/bytecode.run.xml | 45 +++++----- .run/dependencies.run.xml | 44 +++++----- .run/release.run.xml | 44 +++++----- .run/run.run.xml | 44 +++++----- .run/spotlessApply.run.xml | 30 +++---- .run/spotlessCheck.run.xml | 30 +++---- build.gradle | 2 + docs/dev/guide.md | 2 +- .../codestorm/bounceverse/Bounceverse.java | 10 +-- .../github/codestorm/bounceverse/Utils.java | 83 +++++++++--------- .../{data/tags => }/components/Behavior.java | 9 +- .../bounceverse/components/GameComponent.java | 15 ++++ .../{data/tags => }/components/Property.java | 9 +- .../components/_old/base/EntityComponent.java | 1 - .../components/_old/brick/ExplodeBrick.java | 4 +- .../components/_old/powerup/PowerUp.java | 72 +++++++-------- .../components/behaviors/CanShoot.java | 19 ++-- .../components/behaviors/brick/BrickDrop.java | 17 ++-- .../behaviors/brick/BrickExplode.java | 87 ++++++++++--------- .../behaviors/paddle/PaddleExpand.java | 9 +- .../{ShrinkPaddle.java => PaddleShrink.java} | 9 +- .../components/properties/Health.java | 2 +- .../components/properties/Shield.java | 22 ++--- .../components/properties/Velocity.java | 5 +- .../components/properties/Width.java | 11 ++- .../properties/brick/BrickHealth.java | 15 ++-- .../properties/brick/BrickShield.java | 9 +- .../properties/bullet/BulletVelocity.java | 8 +- .../bounceverse/core/LaunchOptions.java | 4 +- .../bounceverse/core/SettingsManager.java | 4 +- .../bounceverse/core/UserSetting.java | 51 ++++++----- .../bounceverse/core/systems/GameSystem.java | 20 ++--- .../bounceverse/core/systems/InputSystem.java | 20 ++--- .../core/systems/PhysicSystem.java | 20 ++--- .../bounceverse/core/systems/System.java | 4 +- .../bounceverse/core/systems/UISystem.java | 20 ++--- .../bounceverse/data/contracts/CanUndo.java | 14 +++ .../data/meta/entities/ForEntity.java | 23 +++++ .../data/meta/entities/SuitableEntity.java | 23 +++++ .../entities/SuitableEntityProcessor.java | 67 ++++++++++++++ .../bounceverse/data/tags/ComponentTag.java | 13 --- .../bounceverse/data/tags/EntityTag.java | 13 --- .../bounceverse/data/tags/RequirementTag.java | 11 --- .../codestorm/bounceverse/data/tags/Tag.java | 11 --- .../data/tags/entities/ForBall.java | 13 --- .../data/tags/entities/ForBrick.java | 13 --- .../data/tags/entities/ForBullet.java | 13 --- .../data/tags/entities/ForPaddle.java | 13 --- .../data/tags/entities/ForPowerUp.java | 13 --- .../data/tags/requirements/Optional.java | 17 ---- .../data/tags/requirements/Required.java | 21 ----- .../bounceverse/data/types/EntityType.java | 10 +-- .../bounceverse/factory/BrickFactory.java | 26 +++--- .../bounceverse/factory/WallFactory.java | 1 - src/main/resources/options/default.properties | 2 - 56 files changed, 613 insertions(+), 588 deletions(-) rename src/main/java/com/github/codestorm/bounceverse/{data/tags => }/components/Behavior.java (53%) create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/GameComponent.java rename src/main/java/com/github/codestorm/bounceverse/{data/tags => }/components/Property.java (53%) rename src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/{ShrinkPaddle.java => PaddleShrink.java} (73%) create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/contracts/CanUndo.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/meta/entities/ForEntity.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntity.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntityProcessor.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/ComponentTag.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/EntityTag.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/RequirementTag.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/Tag.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBullet.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Optional.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Required.java delete mode 100644 src/main/resources/options/default.properties diff --git a/.github/git-commit-instructions.md b/.github/git-commit-instructions.md index 197a919..f216d47 100644 --- a/.github/git-commit-instructions.md +++ b/.github/git-commit-instructions.md @@ -24,28 +24,39 @@ The commit message should be structured as follows: [optional footer(s)] ``` + ---
The commit contains the following structural elements, to communicate intent to the consumers of your library: -1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with [`PATCH`](http://semver.org/#summary) in Semantic Versioning). -1. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with [`MINOR`](http://semver.org/#summary) in Semantic Versioning). -1. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with [`MAJOR`](http://semver.org/#summary) in Semantic Versioning). +1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with [ + `PATCH`](http://semver.org/#summary) in Semantic Versioning). +1. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with [ + `MINOR`](http://semver.org/#summary) in Semantic Versioning). +1. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces + a breaking API change (correlating with [`MAJOR`](http://semver.org/#summary) in Semantic Versioning). A BREAKING CHANGE can be part of commits of any _type_. -1. _types_ other than `fix:` and `feat:` are allowed, for example [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) (based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)) recommends `build:`, `chore:`, +1. _types_ other than `fix:` and `feat:` are allowed, for + example [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) ( + based on + the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)) + recommends `build:`, `chore:`, `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others. 1. _footers_ other than `BREAKING CHANGE: ` may be provided and follow a convention similar to [git trailer format](https://git-scm.com/docs/git-interpret-trailers). -Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE). +Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic +Versioning (unless they include a BREAKING CHANGE).

-A scope may be provided to a commit's type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`. +A scope may be provided to a commit's type, to provide additional contextual information and is contained within +parenthesis, e.g., `feat(parser): add ability to parse arrays`. ## Examples ### Commit message with description and breaking change footer + ``` feat: allow provided config object to extend other configs @@ -53,16 +64,19 @@ BREAKING CHANGE: `extends` key in config file is now used for extending other co ``` ### Commit message with `!` to draw attention to breaking change + ``` feat!: send an email to the customer when a product is shipped ``` ### Commit message with scope and `!` to draw attention to breaking change + ``` feat(api)!: send an email to the customer when a product is shipped ``` ### Commit message with both `!` and BREAKING CHANGE footer + ``` chore!: drop support for Node 6 @@ -70,16 +84,19 @@ BREAKING CHANGE: use JavaScript features not available in Node 6. ``` ### Commit message with no body + ``` docs: correct spelling of CHANGELOG ``` ### Commit message with scope + ``` feat(lang): add Polish language ``` ### Commit message with multi-paragraph body and multiple footers + ``` fix: prevent racing of requests @@ -95,7 +112,8 @@ Refs: #123 ## Specification -The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt). +The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and +“OPTIONAL” in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt). 1. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed by the OPTIONAL scope, OPTIONAL `!`, and REQUIRED terminal colon and space. @@ -104,25 +122,31 @@ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL 1. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., `fix(parser):` 1. A description MUST immediately follow the colon and space after the type/scope prefix. - The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were contained in string_. -1. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description. + The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were + contained in string_. +1. A longer commit body MAY be provided after the short description, providing additional contextual information about + the code changes. The body MUST begin one blank line after the description. 1. A commit body is free-form and MAY consist of any number of newline separated paragraphs. 1. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of - a word token, followed by either a `:` or `#` separator, followed by a string value (this is inspired by the + a word token, followed by either a `:` or `#` separator, followed by a string value (this is inspired + by the [git trailer convention](https://git-scm.com/docs/git-interpret-trailers)). 1. A footer's token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate - the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token. + the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used + as a token. 1. A footer's value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed. 1. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the footer. -1. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g., +1. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, + space, and description, e.g., _BREAKING CHANGE: environment variables now take precedence over config files_. 1. If included in the type/scope prefix, breaking changes MUST be indicated by a `!` immediately before the `:`. If `!` is used, `BREAKING CHANGE:` MAY be omitted from the footer section, and the commit description SHALL be used to describe the breaking change. 1. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., _docs: update ref docs._ -1. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase. +1. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, + with the exception of BREAKING CHANGE which MUST be uppercase. 1. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer. ## Why Use Conventional Commits @@ -138,7 +162,8 @@ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL ### How should I deal with commit messages in the initial development phase? -We recommend that you proceed as if you've already released the product. Typically *somebody*, even if it's your fellow software developers, is using your software. They'll want to know what's fixed, what breaks etc. +We recommend that you proceed as if you've already released the product. Typically *somebody*, even if it's your fellow +software developers, is using your software. They'll want to know what's fixed, what breaks etc. ### Are the types in the commit title uppercase or lowercase? @@ -146,21 +171,27 @@ Any casing may be used, but it's best to be consistent. ### What do I do if the commit conforms to more than one of the commit types? -Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs. +Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive +us to make more organized commits and PRs. ### Doesn’t this discourage rapid development and fast iteration? -It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors. +It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects +with varied contributors. ### Might Conventional Commits lead developers to limit the type of commits they make because they'll be thinking in the types provided? -Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time. +Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the +flexibility of Conventional Commits allows your team to come up with their own types and change those types over time. ### How does this relate to SemVer? -`fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases. +`fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` +releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases. + +### How should I version my extensions to the Conventional Commits Specification, e.g. -### How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`? +`@jameswomack/conventional-commit-spec`? We recommend using SemVer to release your own extensions to this specification (and encourage you to make these extensions!) @@ -169,20 +200,25 @@ encourage you to make these extensions!) #### When you used a type that's of the spec but not the correct type, e.g. `fix` instead of `feat` -Prior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use. +Prior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, +the cleanup will be different according to what tools and processes you use. #### When you used a type *not* of the spec, e.g. `feet` instead of `feat` -In a worst case scenario, it's not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec. +In a worst case scenario, it's not the end of the world if a commit lands that does not meet the Conventional Commits +specification. It simply means that commit will be missed by tools that are based on the spec. ### Do all my contributors need to use the Conventional Commits specification? -No! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they're merged—adding no workload to casual committers. -A common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge. +No! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they're merged—adding +no workload to casual committers. +A common workflow for this is to have your git system automatically squash commits from a pull request and present a +form for the lead maintainer to enter the proper git commit message for the merge. ### How does Conventional Commits handle revert commits? -Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch? +Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release +instead be a patch? Conventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling authors to use the flexibility of _types_ and _footers_ to develop their logic for handling reverts. diff --git a/.run/bytecode.run.xml b/.run/bytecode.run.xml index af852c8..e40b2cb 100644 --- a/.run/bytecode.run.xml +++ b/.run/bytecode.run.xml @@ -1,24 +1,25 @@ - - - - - - true - true - false - false - - + + + + + + true + true + false + false + + \ No newline at end of file diff --git a/.run/dependencies.run.xml b/.run/dependencies.run.xml index f92d84e..5f3b8eb 100644 --- a/.run/dependencies.run.xml +++ b/.run/dependencies.run.xml @@ -1,24 +1,24 @@ - - - - - - true - true - false - false - - + + + + + + true + true + false + false + + \ No newline at end of file diff --git a/.run/release.run.xml b/.run/release.run.xml index 8e36db7..532ab9c 100644 --- a/.run/release.run.xml +++ b/.run/release.run.xml @@ -1,24 +1,24 @@ - - - - - - true - true - false - false - - + + + + + + true + true + false + false + + \ No newline at end of file diff --git a/.run/run.run.xml b/.run/run.run.xml index d11c14d..a708eb6 100644 --- a/.run/run.run.xml +++ b/.run/run.run.xml @@ -1,24 +1,24 @@ - - - - - - true - true - false - false - - + + + + + + true + true + false + false + + \ No newline at end of file diff --git a/.run/spotlessApply.run.xml b/.run/spotlessApply.run.xml index dd897b2..816f303 100644 --- a/.run/spotlessApply.run.xml +++ b/.run/spotlessApply.run.xml @@ -1,17 +1,17 @@ - - + + \ No newline at end of file diff --git a/.run/spotlessCheck.run.xml b/.run/spotlessCheck.run.xml index a435985..9558820 100644 --- a/.run/spotlessCheck.run.xml +++ b/.run/spotlessCheck.run.xml @@ -1,17 +1,17 @@ - - + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 1220ae6..e52f7b3 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,8 @@ dependencies { implementation 'com.github.almasb:fxgl:21.1' implementation 'com.google.guava:guava:33.5.0-jre' implementation 'com.moandjiezana.toml:toml4j:0.7.2' + implementation 'com.google.auto.service:auto-service-annotations:1.1.1' + annotationProcessor 'com.google.auto.service:auto-service:1.1.1' } application { diff --git a/docs/dev/guide.md b/docs/dev/guide.md index 6411499..2f049a0 100644 --- a/docs/dev/guide.md +++ b/docs/dev/guide.md @@ -2,7 +2,7 @@ ## 📋 Yêu cầu -* **[Oracle OpenJDK 24](https://openjdk.org/projects/jdk/24/)** (Language level: 24 Preview) +* **[Oracle OpenJDK 24](https://openjdk.org/projects/jdk/24/)** (Language level: 24 Preview) * **[Gradle](https://gradle.org/)** ## 🚀 Setup diff --git a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java index 9630ae0..7e80b2f 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java +++ b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java @@ -17,6 +17,11 @@ * gạch và dành được điểm số cao nhất. Nhưng liệu mọi thứ chỉ đơn giản như vậy? */ public final class Bounceverse extends GameApplication { + static void main(String[] args) { + LaunchOptions.load(args); + launch(args); + } + @Override protected void initSettings(com.almasb.fxgl.app.GameSettings settings) { try { @@ -45,9 +50,4 @@ protected void initPhysics() { protected void initUI() { UISystem.getInstance().apply(); } - - static void main(String[] args) { - LaunchOptions.load(args); - launch(args); - } } diff --git a/src/main/java/com/github/codestorm/bounceverse/Utils.java b/src/main/java/com/github/codestorm/bounceverse/Utils.java index e60e1f0..3ffb8ba 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Utils.java +++ b/src/main/java/com/github/codestorm/bounceverse/Utils.java @@ -9,8 +9,12 @@ /** Utilities. */ public final class Utils { + private Utils() {} + /** Input/Output utilities. */ public static final class IO { + private IO() {} + /** * Load .properties file. * @@ -82,8 +86,6 @@ public static List readTextFile(String path) { scanner.close(); return res; } - - private IO() {} } public static final class Time { @@ -93,20 +95,52 @@ public static final class Time { * @see ActiveCooldown */ public static final class Cooldown { + private final ActiveCooldown current = new ActiveCooldown(); + private Duration duration; + + public Cooldown(Duration duration) { + this.duration = duration; + } + + public Duration getDuration() { + return duration; + } + + /** + * Đặt thời lượng cooldown mới. + * + *

Lưu ý: Chỉ áp dụng cho cooldown mới. + * + * @param duration Thời lượng mới + */ + public void setDuration(Duration duration) { + this.duration = duration; + } + + public ActiveCooldown getCurrent() { + return current; + } + /** Đại diện cooldown hiện tại. Giống như một wrapper của {@link TimerAction}. */ public final class ActiveCooldown { private TimerAction waiter = null; private double timestamp = Double.NaN; - private Runnable customOnExpired = null; + private Runnable onExpiredCallback = null; + + private ActiveCooldown() {} /** Hành động khi cooldown hết. */ private void onExpired() { timestamp = Double.NaN; - if (customOnExpired != null) { - customOnExpired.run(); + if (onExpiredCallback != null) { + onExpiredCallback.run(); } } + public void setOnExpired(Runnable callback) { + this.onExpiredCallback = callback; + } + /** * Kiểm tra Cooldown hiện tại hết hạn chưa. * @@ -171,46 +205,7 @@ public void reduce(Duration duration) { waiter.update(duration.toMillis()); } } - - private ActiveCooldown() {} - } - - private Duration duration; - private ActiveCooldown current; - - /** - * Đặt callback khi cooldown hết hạn. - * - * @param callback Callback - */ - public void setOnExpired(Runnable callback) { - current.customOnExpired = callback; - } - - public Duration getDuration() { - return duration; - } - - /** - * Đặt thời lượng cooldown mới. - * - *

Lưu ý: Chỉ áp dụng cho cooldown mới. - * - * @param duration Thời lượng mới - */ - public void setDuration(Duration duration) { - this.duration = duration; - } - - public ActiveCooldown getCurrent() { - return current; - } - - public Cooldown(Duration duration) { - this.duration = duration; } } } - - private Utils() {} } diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/components/Behavior.java b/src/main/java/com/github/codestorm/bounceverse/components/Behavior.java similarity index 53% rename from src/main/java/com/github/codestorm/bounceverse/data/tags/components/Behavior.java rename to src/main/java/com/github/codestorm/bounceverse/components/Behavior.java index 04fea92..6444cce 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/components/Behavior.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/Behavior.java @@ -1,16 +1,17 @@ -package com.github.codestorm.bounceverse.data.tags.components; +package com.github.codestorm.bounceverse.components; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.ComponentTag; /** * * *

{@link Behavior}

* - *

Lớp này đại diện cho một {@link Component} biểu diễn Một {@link Component} biểu diễn * hành vi (behavior) của {@link Entity}. + * + * @see Property */ -public interface Behavior extends ComponentTag {} +public non-sealed interface Behavior extends GameComponent {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/GameComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/GameComponent.java new file mode 100644 index 0000000..8ffb927 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/GameComponent.java @@ -0,0 +1,15 @@ +package com.github.codestorm.bounceverse.components; + +import com.almasb.fxgl.entity.component.Component; + +/** + * + * + *

{@link GameComponent}

+ * + *

Minh họa cho một {@link Component} trong game. + * + *

Đọc thêm tài liệu về Component ở đây. + */ +sealed interface GameComponent permits Property, Behavior {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/components/Property.java b/src/main/java/com/github/codestorm/bounceverse/components/Property.java similarity index 53% rename from src/main/java/com/github/codestorm/bounceverse/data/tags/components/Property.java rename to src/main/java/com/github/codestorm/bounceverse/components/Property.java index ab58036..ede2eab 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/components/Property.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/Property.java @@ -1,16 +1,17 @@ -package com.github.codestorm.bounceverse.data.tags.components; +package com.github.codestorm.bounceverse.components; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.ComponentTag; /** * * *

{@link Property}

* - *

Lớp này đại diện cho một {@link Component} biểu diễn Một {@link Component} biểu diễn dữ * liệu (data/property) của {@link Entity}. + * + * @see Behavior */ -public interface Property extends ComponentTag {} +public non-sealed interface Property extends GameComponent {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java index e699d15..52b6681 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java @@ -2,7 +2,6 @@ import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.requirements.Optional; /** * diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java index 6c14a75..d1f7176 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java @@ -7,12 +7,12 @@ public class ExplodeBrick extends BrickComponent { + private static final int EXPLODE_RADIUS = 1; + public ExplodeBrick(int width, int height, int hp, Color baseColor) { super(width, height, hp, baseColor); } - private static final int EXPLODE_RADIUS = 1; - public int getRadius() { return EXPLODE_RADIUS; } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java index 987682d..cf67a09 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java @@ -22,6 +22,38 @@ public abstract class PowerUp { private double startAt; private double endAt; + /** + * Create PowerUp object. + * + * @param startAt Time that PowerUp start + * @param endAt Time that PowerUp end + */ + public PowerUp(double startAt, double endAt) { + setStartAt(startAt); + setEndAt(endAt); + } + + /** + * Create PowerUp object. + * + * @param duration Duration + * @param after Duration to wait before active + */ + public PowerUp(@NotNull Duration duration, @NotNull Duration after) { + this( + FXGL.getGameTimer().getNow() + after.toMillis(), + FXGL.getGameTimer().getNow() + after.toMillis() + duration.toMillis()); + } + + /** + * Create PowerUp object and active. + * + * @param duration Duration + */ + public PowerUp(@NotNull Duration duration) { + this(duration, Duration.ZERO); + } + /** Update {@link #waitAction} when {@link #startAt} is changed. */ private void updateWaitAction() { final var gameTimer = FXGL.getGameTimer(); @@ -78,49 +110,17 @@ public double getStartAt() { return startAt; } - public double getEndAt() { - return endAt; - } - public void setStartAt(double startAt) { this.startAt = startAt; updateWaitAction(); } + public double getEndAt() { + return endAt; + } + public void setEndAt(double endAt) { this.endAt = endAt; updateActiveAction(); } - - /** - * Create PowerUp object. - * - * @param startAt Time that PowerUp start - * @param endAt Time that PowerUp end - */ - public PowerUp(double startAt, double endAt) { - setStartAt(startAt); - setEndAt(endAt); - } - - /** - * Create PowerUp object. - * - * @param duration Duration - * @param after Duration to wait before active - */ - public PowerUp(@NotNull Duration duration, @NotNull Duration after) { - this( - FXGL.getGameTimer().getNow() + after.toMillis(), - FXGL.getGameTimer().getNow() + after.toMillis() + duration.toMillis()); - } - - /** - * Create PowerUp object and active. - * - * @param duration Duration - */ - public PowerUp(@NotNull Duration duration) { - this(duration, Duration.ZERO); - } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java index e2b9470..32ba146 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java @@ -4,7 +4,6 @@ import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.component.Component; import com.github.codestorm.bounceverse.Utils.Time.Cooldown; -import com.github.codestorm.bounceverse.data.tags.requirements.Optional; import javafx.geometry.Point2D; import javafx.util.Duration; @@ -15,9 +14,17 @@ * * Cung cấp khả năng bắn đạn cho Entity. */ -public class CanShoot extends Component implements Optional { +public class CanShoot extends Component { private final Cooldown cooldown; + public CanShoot(double cooldown) { + this(Duration.seconds(cooldown)); + } + + public CanShoot(Duration cooldown) { + this.cooldown = new Cooldown(cooldown); + } + public void shoot() { if (!cooldown.getCurrent().expired()) { return; @@ -44,12 +51,4 @@ public void shoot() { public Cooldown getCooldown() { return cooldown; } - - public CanShoot(double cooldown) { - this(Duration.seconds(cooldown)); - } - - public CanShoot(Duration cooldown) { - this.cooldown = new Cooldown(cooldown); - } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java index 8f62f13..1d74771 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java @@ -1,10 +1,10 @@ package com.github.codestorm.bounceverse.components.behaviors.brick; import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.Behavior; import com.github.codestorm.bounceverse.components._old.base.EntityComponent; -import com.github.codestorm.bounceverse.data.tags.components.Behavior; -import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.Optional; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import com.github.codestorm.bounceverse.data.types.EntityType; import java.util.List; /** @@ -16,9 +16,14 @@ * * @deprecated TODO: Lớp này chưa hoàn thiện! */ -public final class BrickDrop extends Component implements Behavior, ForBrick, Optional { +@ForEntity(EntityType.BRICK) +public final class BrickDrop extends Component implements Behavior { private List items; + public BrickDrop(List items) { + this.items = items; + } + /** Hành động rơi ra vật phẩm. */ private void drop() { // TODO: How to drop? @@ -36,8 +41,4 @@ public List getItems() { public void setItems(List items) { this.items = items; } - - public BrickDrop(List items) { - this.items = items; - } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java index 76bd641..5e2c755 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java @@ -1,26 +1,35 @@ package com.github.codestorm.bounceverse.components.behaviors.brick; import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.Behavior; import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; -import com.github.codestorm.bounceverse.data.tags.components.Behavior; -import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.Optional; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; import com.github.codestorm.bounceverse.data.types.EntityType; -import java.util.List; /** * * *

{@link BrickExplode}

* - *

Lớp này biểu diễn hành vi nổ của viên gạch. Khi viên gạch bị phá hủy, nó sẽ kích hoạt hiệu ứng - * nổ, có thể gây sát thương đến các viên gạch xung quanh trong bán kính xác định. + *

Lớp này biểu diễn hành vi nổ của viên gạch. Khi viên gạch bị phá hủy sẽ bị nổ, có thể gây sát + * thương đến các viên gạch xung quanh trong bán kính xác định. */ -public final class BrickExplode extends Component implements Behavior, ForBrick, Optional { - public static final int DEFAULT_EXPLODE_RADIUS = 1; - private int explodeRadius; +@ForEntity(EntityType.BRICK) +public final class BrickExplode extends Component implements Behavior { + public static final int DEFAULT_RADIUS = 1; + private int radius; + + public BrickExplode(int radius) { + if (radius <= 0) { + throw new IllegalArgumentException("Radius must be positive"); + } + this.radius = radius; + } + + public BrickExplode() { + this(DEFAULT_RADIUS); + } /** * Triggers the explosion effect of this brick. @@ -28,32 +37,29 @@ public final class BrickExplode extends Component implements Behavior, ForBrick, *

This method can be extended to apply damage to surrounding bricks */ private void explode() { - double cx = getEntity().getCenter().getX(); - double cy = getEntity().getCenter().getY(); - - List entities = FXGL.getGameWorld().getEntities(); - for (var entity : entities) { - if (entity == getEntity()) continue; - if (!entity.isType(EntityType.BRICK)) continue; + final double cx = getEntity().getCenter().getX(); + final double cy = getEntity().getCenter().getY(); + final double cw = getEntity().getWidth(); + final double ch = getEntity().getHeight(); - double ex = entity.getCenter().getX(); - double ey = entity.getCenter().getY(); - - double dx = Math.abs(ex - cx) / getEntity().getWidth(); - double dy = Math.abs(ey - cy) / getEntity().getHeight(); - - if (Math.hypot(dx, dy) <= explodeRadius) { - entity.getComponentOptional(BrickHealth.class) - .ifPresent( - health -> { - health.damage(1); - - if (health.isDead() - && entity.hasComponent(BrickExplode.class)) { - entity.getComponent(BrickExplode.class).explode(); + final var nearEntities = + FXGL.getGameWorld().getEntitiesByType(EntityType.BRICK).stream() + .filter( + e -> { + if (e == getEntity()) { + return false; } - }); - } + + final double ex = e.getCenter().getX(); + final double ey = e.getCenter().getY(); + final double dx = Math.abs(ex - cx) / cw; + final double dy = Math.abs(ey - cy) / ch; + return Math.hypot(dx, dy) <= radius; + }) + .toList(); + for (var entity : nearEntities) { + final var health = entity.getComponent(BrickHealth.class); + health.damage(1); } } @@ -62,16 +68,11 @@ public void onRemoved() { explode(); } - public int getExplodeRadius() { - return explodeRadius; - } - - public void setExplodeRadius(int explodeRadius) { - this.explodeRadius = explodeRadius; + public int getRadius() { + return radius; } - public BrickExplode(int explodeRadius) { - assert explodeRadius > 0; - this.explodeRadius = explodeRadius; + public void setRadius(int radius) { + this.radius = radius; } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java index 79c17c3..456fe56 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java @@ -1,12 +1,13 @@ package com.github.codestorm.bounceverse.components.behaviors.paddle; import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.Behavior; import com.github.codestorm.bounceverse.components.properties.Width; -import com.github.codestorm.bounceverse.data.tags.components.Behavior; -import com.github.codestorm.bounceverse.data.tags.entities.ForPaddle; -import com.github.codestorm.bounceverse.data.tags.requirements.Optional; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import com.github.codestorm.bounceverse.data.types.EntityType; -public class PaddleExpand extends Component implements Behavior, ForPaddle, Optional { +@ForEntity(EntityType.PADDLE) +public class PaddleExpand extends Component implements Behavior { private final double expandedWidth = 200; private final double duration = 5.0; private double timer = 0; diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShrink.java similarity index 73% rename from src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java rename to src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShrink.java index 987e27c..0f6ca86 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/ShrinkPaddle.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShrink.java @@ -1,12 +1,13 @@ package com.github.codestorm.bounceverse.components.behaviors.paddle; import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.Behavior; import com.github.codestorm.bounceverse.components.properties.Width; -import com.github.codestorm.bounceverse.data.tags.components.Behavior; -import com.github.codestorm.bounceverse.data.tags.entities.ForPaddle; -import com.github.codestorm.bounceverse.data.tags.requirements.Optional; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import com.github.codestorm.bounceverse.data.types.EntityType; -public class ShrinkPaddle extends Component implements Behavior, ForPaddle, Optional { +@ForEntity(EntityType.PADDLE) +public class PaddleShrink extends Component implements Behavior { private final double shrinkedWidth = 60; private final double duration = 5.0; diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java index 23cfcc7..b10c5bf 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java @@ -2,7 +2,7 @@ import com.almasb.fxgl.dsl.components.HealthIntComponent; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.components.Property; +import com.github.codestorm.bounceverse.components.Property; /** * diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java index 0bfccc2..e721fa6 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java @@ -1,7 +1,7 @@ package com.github.codestorm.bounceverse.components.properties; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.components.Property; +import com.github.codestorm.bounceverse.components.Property; import java.util.Arrays; import java.util.HashSet; import javafx.geometry.Side; @@ -17,10 +17,20 @@ public abstract class Shield extends Component implements Property { private HashSet sides = new HashSet<>(); + public Shield() {} + + public Shield(Side... sides) { + addSide(sides); + } + public HashSet getSides() { return sides; } + public void setSides(HashSet sides) { + this.sides = sides; + } + /** * Kiểm tra khiên có bảo vệ được cạnh mong muốn không. * @@ -31,10 +41,6 @@ public boolean hasSide(Side side) { return sides.contains(side); } - public void setSides(HashSet sides) { - this.sides = sides; - } - public void addSide(Side... sides) { this.sides.addAll(Arrays.asList(sides)); } @@ -42,10 +48,4 @@ public void addSide(Side... sides) { public void removeSide(Side... sides) { Arrays.asList(sides).forEach(this.sides::remove); } - - public Shield() {} - - public Shield(Side... sides) { - addSide(sides); - } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java index 0f4af0f..adf2084 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java @@ -2,8 +2,7 @@ import com.almasb.fxgl.core.math.Vec2; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.components.Property; -import com.github.codestorm.bounceverse.data.tags.requirements.Optional; +import com.github.codestorm.bounceverse.components.Property; import com.github.codestorm.bounceverse.data.types.UnitVelocity; import javafx.geometry.Point2D; @@ -16,7 +15,7 @@ * * @see Vec2 */ -public class Velocity extends Component implements Property, Optional { +public class Velocity extends Component implements Property { private final Vec2 vector; public Velocity(Vec2 velocity) { diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java index aeb921f..c809170 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java @@ -1,10 +1,9 @@ package com.github.codestorm.bounceverse.components.properties; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.components.Property; +import com.github.codestorm.bounceverse.components.Property; public class Width extends Component implements Property { - private double originalWidth; @Override @@ -16,16 +15,16 @@ public double getOriginalWidth() { return originalWidth; } + public double getWidth() { + return entity.getWidth(); + } + public void setWidth(double width) { var transform = entity.getTransformComponent(); transform.setAnchoredPosition(entity.getCenter()); entity.setScaleX(width / originalWidth); } - public double getWidth() { - return entity.getWidth(); - } - public void resetWidth() { entity.setScaleX(1.0); } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java index 468c581..bca60e2 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java @@ -3,8 +3,8 @@ import com.almasb.fxgl.dsl.components.HealthIntComponent; import com.almasb.fxgl.entity.component.CoreComponent; import com.github.codestorm.bounceverse.components.properties.Health; -import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.Required; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import com.github.codestorm.bounceverse.data.types.EntityType; /** * @@ -14,7 +14,8 @@ *

Lớp này đại diện cho thuộc tính HP của Viên gạch. */ @CoreComponent -public final class BrickHealth extends Health implements ForBrick, Required { +@ForEntity(EntityType.BRICK) +public final class BrickHealth extends Health { public BrickHealth(int maxHealth) { super(maxHealth); } @@ -26,10 +27,14 @@ public void onUpdate(double tpf) { } public void damage(int amount) { - if (amount <= 0) return; + if (amount <= 0) { + return; + } HealthIntComponent h = getHealth(); - if (h.isZero()) return; + if (h.isZero()) { + return; + } h.damage(amount); } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java index 657d308..308ddd2 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java @@ -1,9 +1,9 @@ package com.github.codestorm.bounceverse.components.properties.brick; import com.github.codestorm.bounceverse.components.properties.Shield; -import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.Optional; -import com.github.codestorm.bounceverse.data.types.Side; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import com.github.codestorm.bounceverse.data.types.EntityType; +import javafx.geometry.Side; /** * @@ -12,7 +12,8 @@ * *

Lớp này đại diện cho Khiên bảo vệ Viên gạch. */ -public final class BrickShield extends Shield implements ForBrick, Optional { +@ForEntity(EntityType.BRICK) +public final class BrickShield extends Shield { private static final int BONUS_SCORE = 20; public BrickShield() {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java index ea7d696..456e475 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java @@ -3,10 +3,9 @@ import com.almasb.fxgl.core.math.Vec2; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.component.CoreComponent; +import com.github.codestorm.bounceverse.components.Behavior; import com.github.codestorm.bounceverse.components.properties.Velocity; -import com.github.codestorm.bounceverse.data.tags.components.Behavior; -import com.github.codestorm.bounceverse.data.tags.entities.ForBullet; -import com.github.codestorm.bounceverse.data.tags.requirements.Required; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; import com.github.codestorm.bounceverse.data.types.EntityType; import javafx.geometry.Point2D; @@ -18,7 +17,8 @@ * Đại diện cho vận tốc hiện có của entity {@link EntityType#BULLET}. */ @CoreComponent -public final class BulletVelocity extends Velocity implements Behavior, ForBullet, Required { +@ForEntity(EntityType.BULLET) +public final class BulletVelocity extends Velocity implements Behavior { public BulletVelocity(Vec2 velocity) { super(velocity); } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java b/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java index 29ca454..80308c6 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java @@ -14,6 +14,8 @@ public final class LaunchOptions { private static boolean debug = false; + private LaunchOptions() {} + /** * Tải các launch options từ Command-line Arguments. * @@ -28,6 +30,4 @@ public static void load(String... args) { public static boolean isDebug() { return debug; } - - private LaunchOptions() {} } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/SettingsManager.java b/src/main/java/com/github/codestorm/bounceverse/core/SettingsManager.java index b5ec6e6..60f5170 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/SettingsManager.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/SettingsManager.java @@ -16,6 +16,8 @@ * @see GameSettings */ public final class SettingsManager { + private SettingsManager() {} + /** * Tải các settings từ file đã thiết lập vào CTDL. * @@ -53,6 +55,4 @@ public static void load(GameSettings target) throws IOException { target.setMainMenuEnabled(true); target.setIntroEnabled(true); } - - private SettingsManager() {} } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/UserSetting.java b/src/main/java/com/github/codestorm/bounceverse/core/UserSetting.java index 9f278ae..097d63f 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/UserSetting.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/UserSetting.java @@ -17,33 +17,10 @@ */ public final class UserSetting { private static final String FORMAT = "toml"; - - /** Setting về Hình ảnh. */ - public static final class Video { - private int width = 1024; - private int height = 768; - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - private Video() {} - } - private Video video = new Video(); + private UserSetting() {} + /** * Lấy tên file setting tương ứng của người chơi. * @@ -103,5 +80,27 @@ public void setVideo(Video video) { this.video = video; } - private UserSetting() {} + /** Setting về Hình ảnh. */ + public static final class Video { + private int width = 1024; + private int height = 768; + + private Video() {} + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + } } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java index 5de6df2..cdb1d6a 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java @@ -7,15 +7,7 @@ import com.github.codestorm.bounceverse.factory.WallFactory; public final class GameSystem extends System { - /** - * Lazy-loaded singleton holder. - * - *

Follow - * Initialization-on-demand holder idiom. - */ - private static final class Holder { - static final GameSystem INSTANCE = new GameSystem(); - } + private GameSystem() {} public static GameSystem getInstance() { return GameSystem.Holder.INSTANCE; @@ -42,5 +34,13 @@ public void apply() { FXGL.spawn("normalBrick", 200, 200); } - private GameSystem() {} + /** + * Lazy-loaded singleton holder. + * + *

Follow + * Initialization-on-demand holder idiom. + */ + private static final class Holder { + static final GameSystem INSTANCE = new GameSystem(); + } } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java index 5d60d9c..2778e20 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java @@ -7,16 +7,6 @@ import javafx.scene.input.KeyCode; public class InputSystem extends System { - /** - * Lazy-loaded singleton holder. - * - *

Follow - * Initialization-on-demand holder idiom. - */ - private static final class Holder { - static final InputSystem INSTANCE = new InputSystem(); - } - public static InputSystem getInstance() { return InputSystem.Holder.INSTANCE; } @@ -61,4 +51,14 @@ protected void onActionEnd() { }, KeyCode.RIGHT); } + + /** + * Lazy-loaded singleton holder. + * + *

Follow + * Initialization-on-demand holder idiom. + */ + private static final class Holder { + static final InputSystem INSTANCE = new InputSystem(); + } } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java index 416fb5d..ff73a43 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java @@ -21,15 +21,7 @@ */ public final class PhysicSystem extends System { - /** - * Lazy-loaded singleton holder. - * - *

Follow - * Initialization-on-demand holder idiom. - */ - private static final class Holder { - static final PhysicSystem INSTANCE = new PhysicSystem(); - } + private PhysicSystem() {} public static PhysicSystem getInstance() { return Holder.INSTANCE; @@ -79,5 +71,13 @@ protected void onCollision(Entity paddle, Entity wall) { }); } - private PhysicSystem() {} + /** + * Lazy-loaded singleton holder. + * + *

Follow + * Initialization-on-demand holder idiom. + */ + private static final class Holder { + static final PhysicSystem INSTANCE = new PhysicSystem(); + } } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java index adba5ca..b7108f3 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java @@ -20,12 +20,12 @@ * */ abstract class System { + protected System() {} + /** * Áp dụng logic của hệ thống vào game. * *

Sử dụng trên {@link Bounceverse} */ public abstract void apply(); - - protected System() {} } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java index 89ccea1..9e40364 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java @@ -3,7 +3,16 @@ import com.almasb.fxgl.dsl.FXGL; import javafx.scene.paint.Color; -public class UISystem extends System { +public final class UISystem extends System { + public static UISystem getInstance() { + return UISystem.Holder.INSTANCE; + } + + @Override + public void apply() { + FXGL.getGameScene().setBackgroundColor(Color.web("#2B2B2B")); + } + /** * Lazy-loaded singleton holder. * @@ -13,13 +22,4 @@ public class UISystem extends System { private static final class Holder { static final UISystem INSTANCE = new UISystem(); } - - public static UISystem getInstance() { - return UISystem.Holder.INSTANCE; - } - - @Override - public void apply() { - FXGL.getGameScene().setBackgroundColor(Color.web("#2B2B2B")); - } } diff --git a/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanUndo.java b/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanUndo.java new file mode 100644 index 0000000..f32d1d7 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanUndo.java @@ -0,0 +1,14 @@ +package com.github.codestorm.bounceverse.data.contracts; + +/** + * + * + *

{@link CanUndo}

+ * + * Có thể quay lại trạng thái lúc trước khi thực thi. + */ +public interface CanUndo { + void apply(); + + void undo(); +} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/ForEntity.java b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/ForEntity.java new file mode 100644 index 0000000..1063d9d --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/ForEntity.java @@ -0,0 +1,23 @@ +package com.github.codestorm.bounceverse.data.meta.entities; + +import com.github.codestorm.bounceverse.data.types.EntityType; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * + * + *

@{@link ForEntity}

+ * + * Đánh dấu class chỉ định là phù hợp cho entity nào. + * + * @see SuitableEntity + * @see EntityType + */ +@Retention(RetentionPolicy.CLASS) +@Target(ElementType.TYPE) +public @interface ForEntity { + EntityType[] value(); +} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntity.java b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntity.java new file mode 100644 index 0000000..6c5c7ed --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntity.java @@ -0,0 +1,23 @@ +package com.github.codestorm.bounceverse.data.meta.entities; + +import com.github.codestorm.bounceverse.data.types.EntityType; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * + * + *

@{@link SuitableEntity}

+ * + * Đánh dấu sự yêu cầu tham số truyền vào phải phù hợp với entity được chỉ định. + * + * @see ForEntity + * @see EntityType + */ +@Retention(RetentionPolicy.SOURCE) +@Target({ElementType.PARAMETER, ElementType.TYPE_PARAMETER, ElementType.TYPE_USE}) +public @interface SuitableEntity { + EntityType[] value(); +} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntityProcessor.java b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntityProcessor.java new file mode 100644 index 0000000..52e9741 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntityProcessor.java @@ -0,0 +1,67 @@ +package com.github.codestorm.bounceverse.data.meta.entities; + +import com.google.auto.service.AutoService; +import java.util.HashSet; +import java.util.Set; +import javax.annotation.processing.AbstractProcessor; +import javax.annotation.processing.Processor; +import javax.annotation.processing.RoundEnvironment; +import javax.lang.model.element.*; +import javax.tools.Diagnostic; + +/** + * + * + *

{@link SuitableEntityProcessor}

+ * + * {@link Processor} kiểm tra cho annotation {@link SuitableEntity}. + */ +@AutoService(Processor.class) +public final class SuitableEntityProcessor extends AbstractProcessor { + @Override + public Set getSupportedAnnotationTypes() { + return Set.of(SuitableEntity.class.getCanonicalName()); + } + + @Override + public boolean process(Set annotations, RoundEnvironment roundEnv) { + for (Element element : roundEnv.getElementsAnnotatedWith(SuitableEntity.class)) { + if (element.getKind() != ElementKind.PARAMETER) { + continue; + } + + // Phía yêu cầu (@SuitableEntity) + final var requireParameter = (VariableElement) element; + final var requireAnnotation = requireParameter.getAnnotation(SuitableEntity.class); + final var requiredTypes = Set.of(requireAnnotation.value()); + + // Phía thực tế (parameter) + final var actualClassElement = + processingEnv.getTypeUtils().asElement(requireParameter.asType()); + if (actualClassElement == null) { + continue; + } + final var actualAnnotation = actualClassElement.getAnnotation(ForEntity.class); + + // Kiểm tra + if (actualAnnotation != null) { + final var actualTypes = Set.of(actualAnnotation.value()); + final var missingTypes = new HashSet<>(requiredTypes); + missingTypes.removeAll(actualTypes); + + for (var missingType : missingTypes) { + final var message = + String.format( + "Parameter '%s' must suitable for '%s', but '%s' does not.", + requireParameter.getSimpleName(), + missingType.name(), + actualClassElement.getSimpleName()); + processingEnv + .getMessager() + .printMessage(Diagnostic.Kind.ERROR, message, requireParameter); + } + } + } + return true; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/ComponentTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/ComponentTag.java deleted file mode 100644 index b443080..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/ComponentTag.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags; - -/** - * - * - *

{@link ComponentTag}

- * - *

Các nhãn về loại của {@link com.almasb.fxgl.entity.component.Component} trong game. - * - *

Đọc thêm tài liệu về Component ở đây. - */ -public non-sealed interface ComponentTag extends Tag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/EntityTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/EntityTag.java deleted file mode 100644 index 18ee51f..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/EntityTag.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags; - -/** - * - * - *

{@link EntityTag}

- * - *

Các nhãn về loại của {@link com.almasb.fxgl.entity.Entity} trong game. - * - *

Đọc thêm tài liệu về Entity ở đây. - */ -public non-sealed interface EntityTag extends Tag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/RequirementTag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/RequirementTag.java deleted file mode 100644 index 10b98b3..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/RequirementTag.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags; - -/** - * - * - *

{@link RequirementTag}

- * - *

Các nhãn về tính yêu cầu phải có hay không của {@link - * com.almasb.fxgl.entity.component.Component} trong Entity. - */ -public non-sealed interface RequirementTag extends Tag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/Tag.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/Tag.java deleted file mode 100644 index 9e00894..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/Tag.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags; - -/** - * - * - *

{@link Tag}

- * - *

Tag cho class, được dùng để đánh dấu class theo tính chất. Thường được sử dụng thông qua - * generic. - */ -public sealed interface Tag permits ComponentTag, EntityTag, RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java deleted file mode 100644 index 98a462d..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags.entities; - -import com.github.codestorm.bounceverse.data.tags.EntityTag; -import com.github.codestorm.bounceverse.data.types.EntityType; - -/** - * - * - *

{@link ForBall}

- * - * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#BALL}. - */ -public interface ForBall extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java deleted file mode 100644 index 0291041..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags.entities; - -import com.github.codestorm.bounceverse.data.tags.EntityTag; -import com.github.codestorm.bounceverse.data.types.EntityType; - -/** - * - * - *

{@link ForBrick}

- * - * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#BRICK}. - */ -public interface ForBrick extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBullet.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBullet.java deleted file mode 100644 index 76408c9..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBullet.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags.entities; - -import com.github.codestorm.bounceverse.data.tags.EntityTag; -import com.github.codestorm.bounceverse.data.types.EntityType; - -/** - * - * - *

{@link ForBullet}

- * - * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#BULLET}. - */ -public interface ForBullet extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java deleted file mode 100644 index 4f0c790..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags.entities; - -import com.github.codestorm.bounceverse.data.tags.EntityTag; -import com.github.codestorm.bounceverse.data.types.EntityType; - -/** - * - * - *

{@link ForPaddle}

- * - * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#PADDLE}. - */ -public interface ForPaddle extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java deleted file mode 100644 index ae84ba0..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags.entities; - -import com.github.codestorm.bounceverse.data.tags.EntityTag; -import com.github.codestorm.bounceverse.data.types.EntityType; - -/** - * - * - *

{@link ForPowerUp}

- * - * Nhãn cho các thành phần có thể sử dụng với entity kiểu {@link EntityType#POWER_UP}. - */ -public interface ForPowerUp extends EntityTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Optional.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Optional.java deleted file mode 100644 index 9036850..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Optional.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags.requirements; - -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.data.tags.RequirementTag; - -/** - * - * - *

{@link Optional}

- * - * Nhãn cho các thành phần không gắn liền vĩnh viễn với đối tượng. - * - *

Chú ý: Dùng nhãn này tại {@link Component} đầu cuối được gắn trực tiếp với entity. - * - * @see Required - */ -public interface Optional extends RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Required.java b/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Required.java deleted file mode 100644 index c369766..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/Required.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.github.codestorm.bounceverse.data.tags.requirements; - -import com.almasb.fxgl.entity.Entity; -import com.almasb.fxgl.entity.component.Component; -import com.almasb.fxgl.entity.component.CoreComponent; -import com.github.codestorm.bounceverse.data.tags.RequirementTag; - -/** - * - * - *

{@link Required}

- * - * Nhãn cho các thành phần yêu cầu phải có từ khi khởi tạo {@link Entity} và gắn liền với đối tượng - * đó. - * - *

Chú ý: Hãy thêm annotation @{@link CoreComponent} vào {@link Component} đầu cuối (tức - * component được gắn trực tiếp với entity). - * - * @see Optional - */ -public interface Required extends RequirementTag {} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java index eb587ab..223be18 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java @@ -1,5 +1,6 @@ package com.github.codestorm.bounceverse.data.types; +import com.almasb.fxgl.dsl.EntityBuilder; import com.almasb.fxgl.entity.Entity; /** @@ -7,13 +8,12 @@ * *

{@link EntityType}

* - * Loại của {@link com.almasb.fxgl.entity.Entity}, dùng để phân biệt giữa các entity có loại khác - * nhau. + * Loại của {@link Entity}, dùng để phân biệt giữa các entity có loại khác nhau. * - *

Sử dụng {@link com.almasb.fxgl.dsl.EntityBuilder#type(Enum)} để gán cho entity và {@link - * Entity#getType()} để truy xuất, hoặc {@link Entity#isType(Object)} để kiểm tra. + *

Sử dụng {@link EntityBuilder#type(Enum)} để gán cho entity và {@link Entity#getType()} để truy + * xuất, hoặc {@link Entity#isType(Object)} để kiểm tra. * - * @see com.almasb.fxgl.dsl.EntityBuilder + * @see EntityBuilder * @see Entity */ public enum EntityType { diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java index 4414bee..c370cf0 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java @@ -7,8 +7,7 @@ import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.component.Component; import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; -import com.github.codestorm.bounceverse.data.tags.entities.ForBrick; -import com.github.codestorm.bounceverse.data.tags.requirements.Optional; +import com.github.codestorm.bounceverse.data.meta.entities.SuitableEntity; import com.github.codestorm.bounceverse.data.types.EntityType; import javafx.geometry.Point2D; import javafx.scene.paint.Color; @@ -20,13 +19,11 @@ * *

{@link BrickFactory}

* - *

Factory để tạo các entity loại {@link - * com.github.codestorm.bounceverse.data.types.EntityType#BRICK} trong trò chơi. + *

Factory để tạo các entity loại {@link EntityType#BRICK} trong trò chơi. * * @see EntityFactory */ public final class BrickFactory implements EntityFactory { - private static final int DEFAULT_WIDTH = 80; private static final int DEFAULT_HEIGHT = 30; private static final Color DEFAULT_COLOR = Color.LIGHTBLUE; @@ -38,13 +35,14 @@ public final class BrickFactory implements EntityFactory { * @param pos Vị trí * @param hp HP * @param view Khung nhìn - * @param components Các components tùy chọn + * @param components Các components thêm vào * @return Entity Brick mới tạo - * @param Component không bắt buộc phải có của Brick */ - @NotNull @SafeVarargs - private static Entity newBrick( - Point2D pos, int hp, Rectangle view, OptionalBrickComponent... components) { + @NotNull private static Entity newBrick( + Point2D pos, + int hp, + Rectangle view, + @SuitableEntity(EntityType.BRICK) Component... components) { return FXGL.entityBuilder() .type(EntityType.BRICK) .at(pos) @@ -59,13 +57,11 @@ private static * * @param pos Vị trí * @param hp HP - * @param components Các components tùy chọn + * @param components Các components thêm vào * @return Entity Brick mới tạo - * @param Component không bắt buộc phải có của Brick */ - @NotNull @SafeVarargs - private static Entity newBrick( - Point2D pos, int hp, OptionalBrickComponent... components) { + @NotNull private static Entity newBrick( + Point2D pos, int hp, @SuitableEntity(EntityType.BRICK) Component... components) { return newBrick( pos, hp, new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_COLOR), components); } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java index 1b7b191..41846bd 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java @@ -8,7 +8,6 @@ import com.almasb.fxgl.entity.components.CollidableComponent; import com.github.codestorm.bounceverse.components.properties.Wall; import com.github.codestorm.bounceverse.data.types.EntityType; -import com.github.codestorm.bounceverse.data.types.Side; import javafx.scene.shape.Rectangle; public class WallFactory implements EntityFactory { diff --git a/src/main/resources/options/default.properties b/src/main/resources/options/default.properties deleted file mode 100644 index 5e394fb..0000000 --- a/src/main/resources/options/default.properties +++ /dev/null @@ -1,2 +0,0 @@ -width=1024 -height=768 \ No newline at end of file From 40825058106dc5cfcb98e08ec4686dafedf52c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Tue, 21 Oct 2025 20:25:37 +0700 Subject: [PATCH 42/53] feat: add Attack and Attributes components for entity interactions Introduce Attack and Attributes classes to manage damage and defense mechanics for entities. The Attack class allows entities to inflict damage based on their attributes, while the Attributes class holds general property values like defense. This enhances gameplay dynamics by enabling combat interactions. --- .../codestorm/bounceverse/Bounceverse.java | 6 +- .../github/codestorm/bounceverse/Utils.java | 79 +++++++++-- .../bounceverse/components/Behavior.java | 17 --- .../bounceverse/components/GameComponent.java | 15 --- .../components/_old/ball/Ball.java | 103 -------------- .../components/_old/base/EntityComponent.java | 26 ---- .../components/_old/brick/BrickComponent.java | 104 --------------- .../components/_old/brick/BrickFactory.java | 92 ------------- .../components/_old/brick/ExplodeBrick.java | 64 --------- .../components/_old/brick/PowerBrick.java | 31 ----- .../components/_old/brick/ProtectedBrick.java | 35 ----- .../components/_old/paddle/ExpendPaddle.java | 12 -- .../components/_old/paddle/LaserPaddle.java | 29 ---- .../components/_old/paddle/Paddle.java | 76 ----------- .../components/_old/paddle/ShrinkPaddle.java | 12 -- .../components/_old/powerup/PowerUp.java | 126 ------------------ .../components/behaviors/Attack.java | 51 +++++++ .../components/behaviors/Behavior.java | 20 +++ .../components/behaviors/CanShoot.java | 54 -------- .../behaviors/CooldownBehavior.java | 45 +++++++ .../components/behaviors/Explosion.java | 54 ++++++++ .../components/behaviors/HeathDeath.java | 31 +++++ .../components/behaviors/ScaleChange.java | 64 +++++++++ .../behaviors/UndoableBehavior.java | 80 +++++++++++ .../components/behaviors/brick/BrickDrop.java | 44 ------ .../behaviors/brick/BrickExplode.java | 78 ----------- .../behaviors/paddle/PaddleExpand.java | 34 ----- .../behaviors/paddle/PaddleMovement.java | 32 +++++ .../behaviors/paddle/PaddleShooting.java | 70 ++++++++++ .../behaviors/paddle/PaddleShrink.java | 35 ----- .../components/properties/Attributes.java | 25 ++++ .../components/properties/Health.java | 42 ------ .../components/{ => properties}/Property.java | 8 +- .../components/properties/Shield.java | 46 +++---- .../components/properties/Velocity.java | 56 -------- .../components/properties/Width.java | 31 ----- .../properties/brick/BrickHealth.java | 45 ------- .../properties/brick/BrickShield.java | 42 ------ .../properties/bullet/BulletVelocity.java | 48 ------- .../bounceverse/core/LaunchOptions.java | 5 +- .../bounceverse/core/systems/GameSystem.java | 13 +- .../bounceverse/core/systems/InputSystem.java | 49 +++++-- .../core/systems/PhysicSystem.java | 68 +++------- .../bounceverse/core/systems/System.java | 12 +- .../bounceverse/core/systems/UISystem.java | 13 +- .../data/contracts/CanExecute.java | 19 +++ .../bounceverse/data/contracts/CanUndo.java | 11 +- .../data/meta/entities/ForEntity.java | 3 +- .../entities/SuitableEntityProcessor.java | 50 +++---- .../{UnitVelocity.java => DirectionUnit.java} | 11 +- .../bounceverse/data/types/EntityType.java | 5 +- .../bounceverse/factory/SceneFactory.java | 10 ++ .../factory/{ => entities}/BrickFactory.java | 9 +- .../factory/{ => entities}/BulletFactory.java | 22 ++- .../factory/{ => entities}/PaddleFactory.java | 34 +++-- .../factory/{ => entities}/WallFactory.java | 8 +- .../bounceverse/scenes/MainMenu.java | 8 ++ 57 files changed, 782 insertions(+), 1430 deletions(-) delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/Behavior.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/GameComponent.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/ball/Ball.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/brick/PowerBrick.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ProtectedBrick.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ExpendPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/LaserPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/Paddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ShrinkPaddle.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/Attack.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/Behavior.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/CooldownBehavior.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/Explosion.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/HeathDeath.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/ScaleChange.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/UndoableBehavior.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleMovement.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShooting.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShrink.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Attributes.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java rename src/main/java/com/github/codestorm/bounceverse/components/{ => properties}/Property.java (56%) delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/contracts/CanExecute.java rename src/main/java/com/github/codestorm/bounceverse/data/types/{UnitVelocity.java => DirectionUnit.java} (68%) rename src/main/java/com/github/codestorm/bounceverse/factory/{ => entities}/BrickFactory.java (89%) rename src/main/java/com/github/codestorm/bounceverse/factory/{ => entities}/BulletFactory.java (56%) rename src/main/java/com/github/codestorm/bounceverse/factory/{ => entities}/PaddleFactory.java (51%) rename src/main/java/com/github/codestorm/bounceverse/factory/{ => entities}/WallFactory.java (87%) diff --git a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java index 7e80b2f..053aac4 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java +++ b/src/main/java/com/github/codestorm/bounceverse/Bounceverse.java @@ -11,13 +11,13 @@ *

{@link Bounceverse}

* * Phần Hệ thống Chương trình chính của game, nơi mà mọi thứ bắt đầu từ {@link #main(String[])}... - * - *

Game {@link Bounceverse} được lấy cảm hứng từ game Arkanoid nổi tiếng, nơi người chơi điều + *
+ * Game {@link Bounceverse} được lấy cảm hứng từ game Arkanoid nổi tiếng, nơi người chơi điều * khiển một thanh để đỡ bóng và phá vỡ các viên gạch. Mục tiêu của game là phá vỡ tất cả các viên * gạch và dành được điểm số cao nhất. Nhưng liệu mọi thứ chỉ đơn giản như vậy? */ public final class Bounceverse extends GameApplication { - static void main(String[] args) { + public static void main(String[] args) { LaunchOptions.load(args); launch(args); } diff --git a/src/main/java/com/github/codestorm/bounceverse/Utils.java b/src/main/java/com/github/codestorm/bounceverse/Utils.java index 3ffb8ba..b358385 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Utils.java +++ b/src/main/java/com/github/codestorm/bounceverse/Utils.java @@ -1,10 +1,13 @@ package com.github.codestorm.bounceverse; import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.time.TimerAction; import java.io.IOException; import java.io.InputStream; import java.util.*; +import javafx.geometry.Rectangle2D; +import javafx.scene.shape.Circle; import javafx.util.Duration; /** Utilities. */ @@ -37,9 +40,8 @@ public static Properties loadProperties(String path) throws IOException { /** * Convert an array of key=value pairs into a hashmap. The string "key=" maps key onto "", * while just "key" maps key onto null. The value may contain '=' characters, only the first - * "=" is a delimiter. - * - *

Source code from here. + * "=" is a delimiter.
+ * Source code from here. * * @param args command-line arguments in the key=value format (or just key= or key) * @param defaults a map of default values, may be null. Mappings to null are not copied to @@ -96,20 +98,15 @@ public static final class Time { */ public static final class Cooldown { private final ActiveCooldown current = new ActiveCooldown(); - private Duration duration; - - public Cooldown(Duration duration) { - this.duration = duration; - } + private Duration duration = Duration.INDEFINITE; public Duration getDuration() { return duration; } /** - * Đặt thời lượng cooldown mới. - * - *

Lưu ý: Chỉ áp dụng cho cooldown mới. + * Đặt thời lượng cooldown mới.
+ * Lưu ý: Chỉ áp dụng cho cooldown mới. * * @param duration Thời lượng mới */ @@ -121,14 +118,18 @@ public ActiveCooldown getCurrent() { return current; } - /** Đại diện cooldown hiện tại. Giống như một wrapper của {@link TimerAction}. */ + public Cooldown() {} + + public Cooldown(Duration duration) { + this.duration = duration; + } + + /** Cooldown thời điểm hiện tại. Giống như một wrapper của {@link TimerAction}. */ public final class ActiveCooldown { private TimerAction waiter = null; private double timestamp = Double.NaN; private Runnable onExpiredCallback = null; - private ActiveCooldown() {} - /** Hành động khi cooldown hết. */ private void onExpired() { timestamp = Double.NaN; @@ -137,6 +138,11 @@ private void onExpired() { } } + /** + * Callback thực thi khi cooldown hết hạn. + * + * @param callback Callback sẽ thực thi + */ public void setOnExpired(Runnable callback) { this.onExpiredCallback = callback; } @@ -166,12 +172,14 @@ public void makeNew() { timestamp = gameTimer.getNow(); } + /** Tạm dừng cooldown. */ public void pause() { if (!expired()) { waiter.pause(); } } + /** Tiếp tục cooldown. */ public void resume() { if (!expired()) { waiter.resume(); @@ -205,7 +213,50 @@ public void reduce(Duration duration) { waiter.update(duration.toMillis()); } } + + private ActiveCooldown() {} } } } + + public static final class Geometric { + /** + * Lọc các Entity trong phạm vi Hình tròn. + * + * @param circle Hình tròn + * @return Các entity + */ + public static List getEntityInCircle(Circle circle) { + final var cx = circle.getCenterX(); + final var cy = circle.getCenterY(); + final var radius = circle.getRadius(); + + return getEntityInCircle(cx, cy, radius); + } + + /** + * Lọc các Entity trong phạm vi Hình tròn. + * + * @param cx Tâm X + * @param cy Tâm Y + * @param radius Bán kính + * @return Các entity + */ + public static List getEntityInCircle(double cx, double cy, double radius) { + final Rectangle2D outRect = + new Rectangle2D(cx - radius, cy - radius, 2 * radius, 2 * radius); + return FXGL.getGameWorld().getEntitiesInRange(outRect).stream() + .filter( + e -> { + double nearestX = + Math.max(e.getX(), Math.min(cx, e.getX() + e.getWidth())); + double nearestY = + Math.max(e.getY(), Math.min(cy, e.getY() + e.getHeight())); + double dx = cx - nearestX; + double dy = cy - nearestY; + return (dx * dx + dy * dy) <= radius * radius; + }) + .toList(); + } + } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/Behavior.java b/src/main/java/com/github/codestorm/bounceverse/components/Behavior.java deleted file mode 100644 index 6444cce..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/Behavior.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.github.codestorm.bounceverse.components; - -import com.almasb.fxgl.entity.Entity; -import com.almasb.fxgl.entity.component.Component; - -/** - * - * - *

{@link Behavior}

- * - *

Một {@link Component} biểu diễn - * hành vi (behavior) của {@link Entity}. - * - * @see Property - */ -public non-sealed interface Behavior extends GameComponent {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/GameComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/GameComponent.java deleted file mode 100644 index 8ffb927..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/GameComponent.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.github.codestorm.bounceverse.components; - -import com.almasb.fxgl.entity.component.Component; - -/** - * - * - *

{@link GameComponent}

- * - *

Minh họa cho một {@link Component} trong game. - * - *

Đọc thêm tài liệu về Component ở đây. - */ -sealed interface GameComponent permits Property, Behavior {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/ball/Ball.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/ball/Ball.java deleted file mode 100644 index 7095532..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/ball/Ball.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.ball; - -/** - * - * - *

{@link Ball}

- * - * Ball is a player-controlled object used to hit other objects via the Paddle. A ball has position - * (x, y), velocity (vx, vy), and a radius. - * - *

This class provides utility methods for resetting position, setting velocity, checking bounds, - * and accessing attributes. Subclasses must implement movement and bounce behaviors. - */ -public abstract class Ball { - private double x; - private double y; - private double vx; - private double vy; - private double radius; - - /** Default constructor. */ - public Ball() {} - - /** Constructor with full parameters. */ - public Ball(double x, double y, double vx, double vy, double radius) { - this.x = x; - this.y = y; - this.vx = vx; - this.vy = vy; - this.radius = radius; - } - - /** Draws the ball on the screen. */ - public void draw() {} - - /** - * Resets the ball to a new position and velocity. - * - * @param startX new X coordinate - * @param startY new Y coordinate - * @param startVx new horizontal velocity - * @param startVy new vertical velocity - */ - public void reset(double startX, double startY, double startVx, double startVy) { - this.x = startX; - this.y = startY; - this.vx = startVx; - this.vy = startVy; - } - - /** Updates the position of the ball according to its velocity. */ - public abstract void move(); - - /** Handles behavior when the ball bounces against a horizontal wall. */ - public abstract void bounceHorizontal(); - - /** Handles behavior when the ball bounces against a vertical wall. */ - public abstract void bounceVertical(); - - /** - * Sets the velocity of the ball. - * - * @param vx horizontal velocity - * @param vy vertical velocity - */ - public void setVelocity(double vx, double vy) { - this.vx = vx; - this.vy = vy; - } - - /** - * Checks whether the ball is out of bounds. - * - * @return {@code true} if the ball is outside the allowed boundary, {@code false} otherwise - */ - public boolean isOutOfBounds() { - return true; - } - - public double getX() { - return x; - } - - public double getY() { - return y; - } - - public double getVx() { - return vx; - } - - public double getVy() { - return vy; - } - - public double getRadius() { - return radius; - } - - public void setRadius(double radius) { - this.radius = radius; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java deleted file mode 100644 index 52b6681..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/base/EntityComponent.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.base; - -import com.almasb.fxgl.entity.Entity; -import com.almasb.fxgl.entity.component.Component; - -/** - * - * - *

{@link EntityComponent}

- * - *

Lớp này đại diện cho các {@link Component} chung của {@link Entity} như là một Component. Sau - * khi kế thừa, bên trong nên có các Component buộc cần phải có của Entity, đồng thời thêm Component - * vào Entity thông qua override phương thức {@link Component#onAdded()} bằng cách gọi phương thức - * {@link Entity#addComponent(Component)}. - * - *

Tại sao lại cần có? Nguyên nhân của nhu cầu sinh ra lớp này là vì engine FXGL mà game - * sử dụng tuân theo mô hình Entity-Component-System (ECS), - * khi mà Entity không nên được kế thừa để phát triển thêm mà được xây dựng theo qua nguyên tắc composition over - * inheritance. Ngoài ra ta lại cần nhu cầu xác định kiểu của Entity một cách chặt chẽ nữa. Vậy - * nên, một thuộc tính kiểu trong Entity như này là cần thiết. - * - * @see Optional - */ -public abstract class EntityComponent extends Component {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java deleted file mode 100644 index 9764fb7..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickComponent.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.brick; - -import com.almasb.fxgl.entity.component.Component; -import javafx.scene.paint.Color; -import javafx.scene.shape.Rectangle; - -public class BrickComponent extends Component { - private final int width; - private final int height; - private final int initialHp; - private final Color baseColor; - private int hp; - private boolean destroyed; - private Rectangle view; - - /** Represents the core behavior and appearance of a brick in the game. */ - public BrickComponent(int width, int height, int hp, Color baseColor) { - this.width = width; - this.height = height; - this.hp = hp; - this.initialHp = hp; - this.baseColor = baseColor; - this.destroyed = false; - } - - public int getWidth() { - return width; - } - - public int getHeight() { - return height; - } - - public int getHp() { - return hp; - } - - public void setHp(int hp) { - this.hp = hp; - } - - public boolean isDestroyed() { - return hp <= 0; - } - - public void setDestroyed(boolean destroyed) { - this.destroyed = destroyed; - } - - /** Create a rectangular visual for brick. */ - public void onAdded() { - // Lấy view của Entity - view = new Rectangle(width, height); - view.setArcWidth(8); - view.setArcHeight(8); - updateColor(); - getEntity().getViewComponent().addChild(view); - } - - /** - * Reduces the brick's hit points by one when hit. - * - *

If hit points reach zero, the brick is marked as destroyed. - */ - public void hit() { - if (!destroyed && hp > 0) { - hp--; - if (hp == 0) { - destroyed = true; - onDestroyed(); - } else { - updateColor(); - } - } - } - - /** - * Updates the brick’s color based on remaining HP. - * - *

The color gradually darkens as HP decreases, while keeping the base hue consistent across - * brick types. - */ - private void updateColor() { - float ratio = (float) hp / initialHp; - Color dimmed = baseColor.deriveColor(0, 1, 0.6 + 0.4 * ratio, 1); - view.setFill(dimmed); - view.setStroke(Color.BLACK); - } - - /** - * Handles destruction behavior when the brick is fully broken. - * - *

By default, removes the brick entity from the game world. Subclasses may override this for - * custom effects (e.g. explosions). - */ - protected void onDestroyed() { - getEntity().removeFromWorld(); - } - - // Return the score gained by destroying the brick. - public int getScore() { - return initialHp * 10; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java deleted file mode 100644 index 2b1f2c4..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/BrickFactory.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.brick; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.Entity; -import com.almasb.fxgl.entity.EntityFactory; -import javafx.scene.Group; -import javafx.scene.paint.Color; -import javafx.scene.shape.Rectangle; - -/** Factory class responsible for creating various types of brick entities used in the game. */ -public class BrickFactory implements EntityFactory { - private static final int DEFAULT_WIDTH = 80; - private static final int DEFAULT_HEIGHT = 30; - private static final int DEFAULT_HP = 1; - - // Normal Brick. - public static Entity newBrick(double x, double y) { - return FXGL.entityBuilder() - .at(x, y) - .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT)) - .with( - new BrickComponent( - DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_HP, Color.LIGHTBLUE)) - .build(); - } - - // Strong Brick. - public static Entity newStrongBrick(double x, double y) { - return FXGL.entityBuilder() - .at(x, y) - .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT)) - .with( - new BrickComponent( - DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_HP * 3, Color.ORANGE)) - .build(); - } - - // Explode Brick. - public static Entity newExplodeBrick(double x, double y) { - return FXGL.entityBuilder() - .at(x, y) - .viewWithBBox(new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT)) - .with(new ExplodeBrick(DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_HP, Color.RED)) - .build(); - } - - // Protected Brick. - public static Entity newProtectedBrick(double x, double y, String shieldSide) { - ProtectedBrick protectedBrick = - new ProtectedBrick( - DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_HP, Color.WHITE, shieldSide); - - Rectangle body = new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT); - body.setArcWidth(8); - body.setArcHeight(8); - - Rectangle shield = null; - double thickness = 8; - - switch (protectedBrick.getShieldSide().toLowerCase()) { - case "top" -> shield = new Rectangle(-0.5, -1.5, DEFAULT_WIDTH + 1, thickness); - case "bottom" -> - shield = - new Rectangle( - -0.5, - DEFAULT_HEIGHT - thickness + 1, - DEFAULT_WIDTH + 1, - thickness); - case "left" -> shield = new Rectangle(-1.5, -0.5, thickness, DEFAULT_HEIGHT + 1); - case "right" -> - shield = - new Rectangle( - DEFAULT_WIDTH - thickness + 1, - -0.5, - thickness, - DEFAULT_HEIGHT + 1); - } - - if (shield != null) { - shield.setFill(Color.GOLD); - } - - Group view = new Group(); - if (shield == null) { - view = new Group(body); - } else { - view = new Group(body, shield); - } - - return FXGL.entityBuilder().at(x, y).viewWithBBox(view).with(protectedBrick).build(); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java deleted file mode 100644 index d1f7176..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ExplodeBrick.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.brick; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.Entity; -import java.util.List; -import javafx.scene.paint.Color; - -public class ExplodeBrick extends BrickComponent { - - private static final int EXPLODE_RADIUS = 1; - - public ExplodeBrick(int width, int height, int hp, Color baseColor) { - super(width, height, hp, baseColor); - } - - public int getRadius() { - return EXPLODE_RADIUS; - } - - /** - * Handles a hit on this brick. - * - *

Decreases hit points using the parent logic. If the brick is destroyed after the hit, it - * triggers an explosion. - */ - @Override - public void hit() { - super.hit(); - if (isDestroyed()) { - explode(); - } - } - - /** - * Triggers the explosion effect of this brick. - * - *

This method can be extended to apply damage to surrounding bricks - */ - private void explode() { - double cx = getEntity().getCenter().getX(); - double cy = getEntity().getCenter().getY(); - - List entites = FXGL.getGameWorld().getEntities(); - for (Entity e : entites) { - if (e == getEntity()) continue; - if (!e.hasComponent(BrickComponent.class)) continue; - - BrickComponent brick = e.getComponent(BrickComponent.class); - if (brick.isDestroyed()) { - continue; - } - - double ex = e.getCenter().getX(); - double ey = e.getCenter().getY(); - - double dx = Math.abs(ex - cx) / getWidth(); - double dy = Math.abs(ey - cy) / getHeight(); - - if (dx <= EXPLODE_RADIUS && dy <= EXPLODE_RADIUS) { - brick.hit(); - } - } - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/PowerBrick.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/PowerBrick.java deleted file mode 100644 index 4b05fed..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/PowerBrick.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.brick; - -import javafx.scene.paint.Color; - -public class PowerBrick extends BrickComponent { - - public PowerBrick(int width, int height, int hp, Color baseColor) { - super(width, height, hp, baseColor); - } - - /** - * Handles a hit on this power brick. - * - *

Executes the normal hit logic from the parent class. If the brick is destroyed after the - * hit, it will randomly spawn its power-up. - */ - @Override - public void hit() { - super.hit(); - if (isDestroyed()) { - activePower(); - } - } - - /** - * Spawns the power-up associated with this brick. - * - *

Subclasses should override this method to define the specific power-up effect. - */ - public void activePower() {} -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ProtectedBrick.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ProtectedBrick.java deleted file mode 100644 index 5bd66a0..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/brick/ProtectedBrick.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.brick; - -import javafx.scene.paint.Color; - -public class ProtectedBrick extends BrickComponent { - private String shieldSide; - - public ProtectedBrick(int width, int height, int hp, Color baseColor, String shieldSide) { - super(width, height, hp, baseColor); - this.shieldSide = shieldSide; - } - - public String getShieldSide() { - return shieldSide; - } - - public void setShieldSide(String shieldSide) { - this.shieldSide = shieldSide; - } - - /** Handles a hit on this protected brick from a given direction. */ - public void hit(String direction) { - if (!isDestroyed()) { - if (!direction.equalsIgnoreCase(shieldSide)) { - super.hit(); - } - } - } - - // Score from protected brick have more than 20 points. - @Override - public int getScore() { - return super.getScore() + 20; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ExpendPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ExpendPaddle.java deleted file mode 100644 index 2fd0d92..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ExpendPaddle.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.paddle; - -/** A special type of {@link Paddle} that is wider than the normal paddle. */ -public class ExpendPaddle extends Paddle { - // The scale factor applied to the paddle's width. - private static final double SCALE = 1.5; - - // Create a new expended paddle. - public ExpendPaddle(int x, int y, int width, int height, double speed) { - super(x, y, (int) (width * SCALE), height, speed); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/LaserPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/LaserPaddle.java deleted file mode 100644 index 6653385..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/LaserPaddle.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.paddle; - -import java.util.ArrayList; -import java.util.List; - -/** - * A special type of {@link Paddle} that can shoot bullets upward to destroy bricks. This is usually - * activated by a power-up. - */ -public class LaserPaddle extends Paddle { - /** List of bullets currently fired by the paddle. */ - private List bullets; - - // Create a new LaserPaddle instance - public LaserPaddle(int x, int y, int width, int height, double speed) { - super(x, y, width, height, speed); - this.bullets = new ArrayList<>(); - } - - // Shoots bullet from paddle. - public void shoot() {} - - /** Updates all bullets when them get off-screen or hit the brick. */ - public void updateBullets() {} - - public List getBullets() { - return bullets; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/Paddle.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/Paddle.java deleted file mode 100644 index 882958f..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/Paddle.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.paddle; - -/** - * Represents the paddle controlled by the player in the game. - * - *

The paddle can move horizontally, reset its position, and is the base class for other paddle - * variants (expand, shrink, laser, etc.). - */ -public class Paddle { - private int x; - private int y; - private int width; - private int height; - private double speed; - - public Paddle(int x, int y, int width, int height, double speed) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - this.speed = speed; - } - - // getter & setter. - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - public void setHeight(int height) { - this.height = height; - } - - public double getSpeed() { - return speed; - } - - public void setSpeed(double speed) { - this.speed = speed; - } - - // Move the paddle left. - public void moveLeft() {} - - // Move the paddle right. - public void moveRight() {} - - // Reset the paddle to a specific position. - public void resetPosition(int startX, int startY) { - this.x = startX; - this.y = startY; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ShrinkPaddle.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ShrinkPaddle.java deleted file mode 100644 index a8ca334..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/paddle/ShrinkPaddle.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.paddle; - -/** A special type of {@link Paddle} that is narrower than the normal paddle. */ -public class ShrinkPaddle extends Paddle { - // The scale factor applied to the paddle's width. - private static final double SCALE = 0.7; - - // Create a new shrunk paddle. - public ShrinkPaddle(int x, int y, int width, int height, double speed) { - super(x, y, (int) (width * SCALE), height, speed); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java b/src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java deleted file mode 100644 index cf67a09..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/_old/powerup/PowerUp.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.github.codestorm.bounceverse.components._old.powerup; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.time.TimerAction; -import javafx.util.Duration; -import org.jetbrains.annotations.NotNull; - -/** - * - * - *

{@link PowerUp}

- * - * PowerUps provide special effects and abilities to playable objects. They are designed to - * update based on events (lazy-update). - * - *

You need to extend this class to create another class that can provide effects though - * {@link #apply()} and {@link #unapply()} method. - */ -public abstract class PowerUp { - private TimerAction waitAction; - private TimerAction activeAction; - private double startAt; - private double endAt; - - /** - * Create PowerUp object. - * - * @param startAt Time that PowerUp start - * @param endAt Time that PowerUp end - */ - public PowerUp(double startAt, double endAt) { - setStartAt(startAt); - setEndAt(endAt); - } - - /** - * Create PowerUp object. - * - * @param duration Duration - * @param after Duration to wait before active - */ - public PowerUp(@NotNull Duration duration, @NotNull Duration after) { - this( - FXGL.getGameTimer().getNow() + after.toMillis(), - FXGL.getGameTimer().getNow() + after.toMillis() + duration.toMillis()); - } - - /** - * Create PowerUp object and active. - * - * @param duration Duration - */ - public PowerUp(@NotNull Duration duration) { - this(duration, Duration.ZERO); - } - - /** Update {@link #waitAction} when {@link #startAt} is changed. */ - private void updateWaitAction() { - final var gameTimer = FXGL.getGameTimer(); - final var currentTime = gameTimer.getNow(); - // when not executed - if (currentTime < startAt) { - if (waitAction != null) { - waitAction.expire(); - } - final var timeLeft = Duration.millis(startAt - currentTime); - waitAction = gameTimer.runOnceAfter(this::doApply, timeLeft); - } - } - - /** Update {@link #activeAction} when {@link #endAt} is changed. */ - private void updateActiveAction() { - final var gameTimer = FXGL.getGameTimer(); - final var currentTime = gameTimer.getNow(); - // when not executed - if (currentTime < endAt) { - if (activeAction != null) { - activeAction.expire(); - } - final var timeLeft = Duration.millis(endAt - currentTime); - activeAction = gameTimer.runOnceAfter(this::doUnapply, timeLeft); - } - } - - /** Wrapper for {@link #apply()} method. */ - protected void doApply() { - apply(); - } - - /** Wrapper for {@link #unapply()} method. */ - protected void doUnapply() { - unapply(); - } - - /** - * Apply PowerUp effects. - * - *

Automatically used when power up becomes active. - */ - protected abstract void apply(); - - /** - * Unapply PowerUp effects. - * - *

Automatically used when power up ends. - */ - protected abstract void unapply(); - - public double getStartAt() { - return startAt; - } - - public void setStartAt(double startAt) { - this.startAt = startAt; - updateWaitAction(); - } - - public double getEndAt() { - return endAt; - } - - public void setEndAt(double endAt) { - this.endAt = endAt; - updateActiveAction(); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Attack.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Attack.java new file mode 100644 index 0000000..f68083d --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Attack.java @@ -0,0 +1,51 @@ +package com.github.codestorm.bounceverse.components.behaviors; + +import com.almasb.fxgl.dsl.components.HealthIntComponent; +import com.almasb.fxgl.entity.Entity; +import com.github.codestorm.bounceverse.components.properties.Attributes; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import java.util.List; + +/** + * + * + *

{@link Attack}

+ * + * Hành động tấn công/gây sát thương của {@link Entity}.
+ */ +@ForEntity({}) +public class Attack extends Behavior { + public static final int DEFAULT_DAMAGE = 1; + private int damage = DEFAULT_DAMAGE; + + @Override + public void execute(List data) { + List entities = + data.stream().filter(obj -> obj instanceof Entity).map(e -> (Entity) e).toList(); + for (var obj : entities) { + final var theirHealth = obj.getComponentOptional(HealthIntComponent.class); + if (theirHealth.isEmpty()) { + continue; + } + final var theirAttributes = obj.getComponentOptional(Attributes.class); + final var theirDefense = theirAttributes.map(Attributes::getDefense).orElse(0); + + final var actualDamage = damage >= 0 ? Math.min(0, damage - theirDefense) : damage; + theirHealth.get().damage(actualDamage); + } + } + + public int getDamage() { + return damage; + } + + public void setDamage(int damage) { + this.damage = damage; + } + + public Attack() {} + + public Attack(int damage) { + this.damage = damage; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Behavior.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Behavior.java new file mode 100644 index 0000000..b093be6 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Behavior.java @@ -0,0 +1,20 @@ +package com.github.codestorm.bounceverse.components.behaviors; + +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.properties.Property; +import com.github.codestorm.bounceverse.data.contracts.CanExecute; + +/** + * + * + *

{@link Behavior}

+ * + *
+ * Một {@link Component} biểu diễn + * hành vi (behavior) của {@link Entity}. + * + * @see Property + */ +public abstract class Behavior extends Component implements CanExecute {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java deleted file mode 100644 index 32ba146..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CanShoot.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.github.codestorm.bounceverse.components.behaviors; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.SpawnData; -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.Utils.Time.Cooldown; -import javafx.geometry.Point2D; -import javafx.util.Duration; - -/** - * - * - *

{@link CanShoot}

- * - * Cung cấp khả năng bắn đạn cho Entity. - */ -public class CanShoot extends Component { - private final Cooldown cooldown; - - public CanShoot(double cooldown) { - this(Duration.seconds(cooldown)); - } - - public CanShoot(Duration cooldown) { - this.cooldown = new Cooldown(cooldown); - } - - public void shoot() { - if (!cooldown.getCurrent().expired()) { - return; - } - - var entity = getEntity(); - double halfWidth = entity.getWidth() / 2; - double leftX = entity.getCenter().getX() - halfWidth + 4; - double rightX = entity.getCenter().getX() + halfWidth - 8; - double y = entity.getY() - 10; - - SpawnData dataLeft = - new SpawnData(leftX, y).put("speed", 450.0).put("direction", new Point2D(0, -1)); - - SpawnData dataRight = - new SpawnData(rightX, y).put("speed", 450.0).put("direction", new Point2D(0, -1)); - - FXGL.spawn("bullet", dataLeft); - FXGL.spawn("bullet", dataRight); - - cooldown.getCurrent().makeNew(); - } - - public Cooldown getCooldown() { - return cooldown; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CooldownBehavior.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CooldownBehavior.java new file mode 100644 index 0000000..300ba53 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/CooldownBehavior.java @@ -0,0 +1,45 @@ +package com.github.codestorm.bounceverse.components.behaviors; + +import com.github.codestorm.bounceverse.Utils.Time.Cooldown; +import com.github.codestorm.bounceverse.data.contracts.CanExecute; +import java.util.List; +import javafx.util.Duration; + +/** + * + * + *

{@link CooldownBehavior}

+ * + * {@link Behavior} sau khi thực thi sẽ mất thời gian để có thể {@link #executeLogic(List)} lại. + */ +public abstract class CooldownBehavior extends Behavior implements CanExecute { + private final Cooldown cooldown = new Cooldown(); + + public Cooldown getCooldown() { + return cooldown; + } + + /** + * Logic bên trong {@link CanExecute#execute(List)}. + * + * @param data Dữ liệu truyền vào + * @return {@code true} nếu cho phép thực thi, ngược lại {@code false} + */ + protected abstract boolean executeLogic(List data); + + @Override + public final void execute(List data) { + if (!cooldown.getCurrent().expired()) { + return; + } + if (executeLogic(data)) { + cooldown.getCurrent().makeNew(); + } + } + + protected CooldownBehavior() {} + + protected CooldownBehavior(Duration duration) { + cooldown.setDuration(duration); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Explosion.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Explosion.java new file mode 100644 index 0000000..30f2a5d --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Explosion.java @@ -0,0 +1,54 @@ +package com.github.codestorm.bounceverse.components.behaviors; + +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.component.Required; +import com.github.codestorm.bounceverse.Utils; +import com.github.codestorm.bounceverse.components.properties.Attributes; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import java.util.List; + +/** + * + * + *

{@link Explosion}

+ * + *
+ * Hành vi nổ của {@link Entity}, có thể gây sát thương hoặc hồi máu cho những đối tượng xung quanh. + *
+ * Yêu cầu entity có {@link Attributes} trước. + */ +@Required(Attributes.class) +@ForEntity({}) +public final class Explosion extends Attack { + public static final int DEFAULT_RADIUS = 1; + private int radius = DEFAULT_RADIUS; + + @Override + public void execute(List data) { + final var attributes = entity.getComponent(Attributes.class); + final double cx = getEntity().getCenter().getX(); + final double cy = getEntity().getCenter().getY(); + + final var nearEntities = Utils.Geometric.getEntityInCircle(cx, cy, radius); + super.execute(nearEntities.stream().map(e -> (Object) e).toList()); + } + + @Override + public void onRemoved() { + execute(null); + } + + public int getRadius() { + return radius; + } + + public void setRadius(int radius) { + this.radius = Math.abs(radius); + } + + public Explosion() {} + + public Explosion(int radius) { + setRadius(radius); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/HeathDeath.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/HeathDeath.java new file mode 100644 index 0000000..18a07d4 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/HeathDeath.java @@ -0,0 +1,31 @@ +package com.github.codestorm.bounceverse.components.behaviors; + +import com.almasb.fxgl.dsl.components.HealthIntComponent; +import com.almasb.fxgl.entity.component.Required; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import java.util.List; + +/** + * + * + *

{@link HeathDeath}

+ * + * Hành động chết vì yêu :< vì hết máu.
+ * Yêu cầu entity có {@link HealthIntComponent} trước. + */ +@Required(HealthIntComponent.class) +@ForEntity({}) +public class HeathDeath extends Behavior { + @Override + public void execute(List data) { + final var health = entity.getComponent(HealthIntComponent.class); + if (health != null && health.isZero()) { + entity.removeFromWorld(); + } + } + + @Override + public void onUpdate(double tpf) { + execute(null); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/ScaleChange.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/ScaleChange.java new file mode 100644 index 0000000..1d74394 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/ScaleChange.java @@ -0,0 +1,64 @@ +package com.github.codestorm.bounceverse.components.behaviors; + +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.components.TransformComponent; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import java.util.ArrayList; +import java.util.List; + +/** + * + * + *

{@link ScaleChange}

+ * + * Hành vi ScaleChange. Có thể {@link #execute(List)} nhiều lần nhưng sẽ không thể stack lên nhau + * (và không làm mới).
+ * ScaleChange sẽ áp dụng thông qua {@link Entity#getTransformComponent()} (tức cả view và + * bounding). + * + * @see TransformComponent + */ +@ForEntity({}) +public class ScaleChange extends UndoableBehavior { + public static final double DONT_CHANGE = 1; + private double scaleWidth = DONT_CHANGE; + private double scaleHeight = DONT_CHANGE; + + @Override + protected List executeLogic(List data) { + if (scaleWidth <= 0 || scaleHeight <= 0) { + return null; + } + final var transform = entity.getTransformComponent(); + transform.setScaleX(transform.getScaleX() * scaleWidth); + transform.setScaleY(transform.getScaleY() * scaleHeight); + return new ArrayList<>(); + } + + @Override + protected boolean undoLogic(List data) { + if (scaleWidth <= 0 || scaleHeight <= 0) { + return false; + } + final var transform = entity.getTransformComponent(); + transform.setScaleX(transform.getScaleX() / scaleWidth); + transform.setScaleY(transform.getScaleY() / scaleHeight); + return true; + } + + public double getScaleWidth() { + return scaleWidth; + } + + public void setScaleWidth(double scaleWidth) { + this.scaleWidth = scaleWidth; + } + + public double getScaleHeight() { + return scaleHeight; + } + + public void setScaleHeight(double scaleHeight) { + this.scaleHeight = scaleHeight; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/UndoableBehavior.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/UndoableBehavior.java new file mode 100644 index 0000000..bd04a97 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/UndoableBehavior.java @@ -0,0 +1,80 @@ +package com.github.codestorm.bounceverse.components.behaviors; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.time.TimerAction; +import com.github.codestorm.bounceverse.data.contracts.CanUndo; +import java.util.List; +import javafx.util.Duration; + +/** + * + * + *

{@link UndoableBehavior}

+ * + * {@link Behavior} có thể thực thi và hoàn tác được. + * + * @see CanUndo + */ +public abstract class UndoableBehavior extends Behavior implements CanUndo { + protected Duration duration = Duration.INDEFINITE; + private List modified = null; + private TimerAction current; + + /** + * Có phải hành động đã được thực thi không. + * + * @return {@code true} nếu đã thực thi, {@code false} nếu chưa + */ + public final boolean isActive() { + return current != null && current.isExpired() && modified != null; + } + + /** + * Logic bên trong {@link #execute(List)}. + * + * @param data Dữ liệu truyền vào + * @return {@code null} nếu không thực thi, {@link List} các dữ liệu cần hoàn tác lại sau này + * nếu ngược lại + */ + protected abstract List executeLogic(List data); + + /** + * Logic bên trong {@link CanUndo#undo()}. + * + * @param data Dữ liệu cần hoàn tác + * @return {@code true} nếu cho phép hoàn tác, {@code false} nếu không. + */ + protected abstract boolean undoLogic(List data); + + @Override + public final void execute(List data) { + if (isActive()) { + return; + } + + modified = executeLogic(data); + if (modified != null) { + current = FXGL.getGameTimer().runOnceAfter(this::undo, duration); + } + } + + @Override + public final void undo() { + if (!isActive()) { + return; + } + + if (undoLogic(modified)) { + current = null; + modified = null; + } + } + + public Duration getDuration() { + return duration; + } + + public void setDuration(Duration duration) { + this.duration = duration; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java deleted file mode 100644 index 1d74771..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.github.codestorm.bounceverse.components.behaviors.brick; - -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.Behavior; -import com.github.codestorm.bounceverse.components._old.base.EntityComponent; -import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; -import com.github.codestorm.bounceverse.data.types.EntityType; -import java.util.List; - -/** - * - * - *

{@link BrickDrop}

- * - * Lớp này biểu diễn hành vi rơi ra vật phẩm của Viên gạch sau khi bị phá hủy. - * - * @deprecated TODO: Lớp này chưa hoàn thiện! - */ -@ForEntity(EntityType.BRICK) -public final class BrickDrop extends Component implements Behavior { - private List items; - - public BrickDrop(List items) { - this.items = items; - } - - /** Hành động rơi ra vật phẩm. */ - private void drop() { - // TODO: How to drop? - } - - @Override - public void onRemoved() { - drop(); - } - - public List getItems() { - return items; - } - - public void setItems(List items) { - this.items = items; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java deleted file mode 100644 index 5e2c755..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.github.codestorm.bounceverse.components.behaviors.brick; - -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.Behavior; -import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; -import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; -import com.github.codestorm.bounceverse.data.types.EntityType; - -/** - * - * - *

{@link BrickExplode}

- * - *

Lớp này biểu diễn hành vi nổ của viên gạch. Khi viên gạch bị phá hủy sẽ bị nổ, có thể gây sát - * thương đến các viên gạch xung quanh trong bán kính xác định. - */ -@ForEntity(EntityType.BRICK) -public final class BrickExplode extends Component implements Behavior { - public static final int DEFAULT_RADIUS = 1; - private int radius; - - public BrickExplode(int radius) { - if (radius <= 0) { - throw new IllegalArgumentException("Radius must be positive"); - } - this.radius = radius; - } - - public BrickExplode() { - this(DEFAULT_RADIUS); - } - - /** - * Triggers the explosion effect of this brick. - * - *

This method can be extended to apply damage to surrounding bricks - */ - private void explode() { - final double cx = getEntity().getCenter().getX(); - final double cy = getEntity().getCenter().getY(); - final double cw = getEntity().getWidth(); - final double ch = getEntity().getHeight(); - - final var nearEntities = - FXGL.getGameWorld().getEntitiesByType(EntityType.BRICK).stream() - .filter( - e -> { - if (e == getEntity()) { - return false; - } - - final double ex = e.getCenter().getX(); - final double ey = e.getCenter().getY(); - final double dx = Math.abs(ex - cx) / cw; - final double dy = Math.abs(ey - cy) / ch; - return Math.hypot(dx, dy) <= radius; - }) - .toList(); - for (var entity : nearEntities) { - final var health = entity.getComponent(BrickHealth.class); - health.damage(1); - } - } - - @Override - public void onRemoved() { - explode(); - } - - public int getRadius() { - return radius; - } - - public void setRadius(int radius) { - this.radius = radius; - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java deleted file mode 100644 index 456fe56..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleExpand.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.github.codestorm.bounceverse.components.behaviors.paddle; - -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.Behavior; -import com.github.codestorm.bounceverse.components.properties.Width; -import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; -import com.github.codestorm.bounceverse.data.types.EntityType; - -@ForEntity(EntityType.PADDLE) -public class PaddleExpand extends Component implements Behavior { - private final double expandedWidth = 200; - private final double duration = 5.0; - private double timer = 0; - private boolean expanded = false; - - public void active() { - var width = entity.getComponent(Width.class); - width.resetWidth(); - width.setWidth(expandedWidth); - expanded = true; - timer = 0; - } - - @Override - public void onUpdate(double tpf) { - if (expanded) { - timer += tpf; - if (timer >= duration) { - entity.getComponent(Width.class).resetWidth(); - expanded = false; - } - } - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleMovement.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleMovement.java new file mode 100644 index 0000000..8545c24 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleMovement.java @@ -0,0 +1,32 @@ +package com.github.codestorm.bounceverse.components.behaviors.paddle; + +import com.almasb.fxgl.entity.component.Required; +import com.almasb.fxgl.physics.PhysicsComponent; +import com.github.codestorm.bounceverse.components.behaviors.Behavior; +import com.github.codestorm.bounceverse.data.types.DirectionUnit; +import java.util.List; + +@Required(PhysicsComponent.class) +public class PaddleMovement extends Behavior { + public static final double NORMAL_SPEED = 100; + public static final double DASH_SPEED = NORMAL_SPEED * 2; + private double speed = NORMAL_SPEED; + + @Override + public void execute(List data) { + final var physics = entity.getComponent(PhysicsComponent.class); + final var standVector = DirectionUnit.STAND.getVector(); + for (var obj : data) { + final var direction = (DirectionUnit) obj; + switch (direction) { + case LEFT -> + physics.setLinearVelocity( + physics.getVelocityX() - speed, physics.getVelocityY()); + case RIGHT -> + physics.setLinearVelocity( + physics.getVelocityX() + speed, physics.getVelocityY()); + case STAND -> physics.setLinearVelocity(standVector.x, standVector.y); + } + } + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShooting.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShooting.java new file mode 100644 index 0000000..2b80f03 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShooting.java @@ -0,0 +1,70 @@ +package com.github.codestorm.bounceverse.components.behaviors.paddle; + +import com.almasb.fxgl.core.math.Vec2; +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.SpawnData; +import com.github.codestorm.bounceverse.Utils.Time.Cooldown; +import com.github.codestorm.bounceverse.components.behaviors.Attack; +import com.github.codestorm.bounceverse.components.behaviors.Behavior; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; +import com.github.codestorm.bounceverse.data.types.DirectionUnit; +import com.github.codestorm.bounceverse.data.types.EntityType; +import java.util.List; +import javafx.util.Duration; + +/** + * + * + *

{@link PaddleShooting}

+ * + * Khả năng {@link EntityType#PADDLE} có thể bắn ra {@link EntityType#BULLET}. + */ +@ForEntity(EntityType.PADDLE) +public class PaddleShooting extends Behavior { + private static final double OFFSET_LEFT = 4; + private static final double OFFSET_RIGHT = -8; + private static final double OFFSET_HEIGHT = -10; + private static final Vec2 BULLET_VELOCITY = DirectionUnit.UP.getVector().mul(450); + + private final Cooldown cooldown; + + public PaddleShooting(double cooldown) { + this(Duration.seconds(cooldown)); + } + + public PaddleShooting(Duration cooldown) { + this.cooldown = new Cooldown(cooldown); + } + + @Override + public void execute(List data) { + if (!cooldown.getCurrent().expired()) { + return; + } + double leftX = entity.getX() + OFFSET_LEFT; + double rightX = entity.getRightX() + OFFSET_RIGHT; + double y = entity.getY() + OFFSET_HEIGHT; + + final var attack = entity.getComponentOptional(Attack.class); + if (attack.isEmpty()) { + return; + } + + var leftData = + new SpawnData(leftX, y) + .put("velocity", BULLET_VELOCITY) + .put("damage", attack.get().getDamage()); + var rightData = + new SpawnData(rightX, y) + .put("velocity", BULLET_VELOCITY) + .put("damage", attack.get().getDamage()); + + FXGL.spawn("paddleBullet", leftData); + FXGL.spawn("paddleBullet", rightData); + cooldown.getCurrent().makeNew(); + } + + public Cooldown getCooldown() { + return cooldown; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShrink.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShrink.java deleted file mode 100644 index 0f6ca86..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleShrink.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.github.codestorm.bounceverse.components.behaviors.paddle; - -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.Behavior; -import com.github.codestorm.bounceverse.components.properties.Width; -import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; -import com.github.codestorm.bounceverse.data.types.EntityType; - -@ForEntity(EntityType.PADDLE) -public class PaddleShrink extends Component implements Behavior { - - private final double shrinkedWidth = 60; - private final double duration = 5.0; - private double timer = 0; - private boolean shrinked = false; - - public void active() { - var width = entity.getComponent(Width.class); - width.resetWidth(); - width.setWidth(shrinkedWidth); - shrinked = true; - timer = 0; - } - - @Override - public void onUpdate(double tpf) { - if (shrinked) { - timer += tpf; - if (timer >= duration) { - entity.getComponent(Width.class).resetWidth(); - shrinked = false; - } - } - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Attributes.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Attributes.java new file mode 100644 index 0000000..bd27d9a --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Attributes.java @@ -0,0 +1,25 @@ +package com.github.codestorm.bounceverse.components.properties; + +import com.almasb.fxgl.entity.Entity; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; + +/** + * + * + *

{@link Attributes}

+ * + * Các chỉ số thuộc tính chung (chưa cụ thể thành class) của {@link Entity}. + */ +@ForEntity({}) +public final class Attributes extends Property { + public static final int DEFAULT_DEFENSE = 0; + private int defense = DEFAULT_DEFENSE; + + public int getDefense() { + return defense; + } + + public void setDefense(int defense) { + this.defense = defense; + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java deleted file mode 100644 index b10c5bf..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.github.codestorm.bounceverse.components.properties; - -import com.almasb.fxgl.dsl.components.HealthIntComponent; -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.Property; - -/** - * - * - *

{@link Health}

- * - *

Lớp này đại diện cho thuộc tính HP của Entity. Khi HP về 0, Entity sẽ bị xóa khỏi thế giới. - */ -public abstract class Health extends Component implements Property { - private final HealthIntComponent health; - - public Health(int maxHealth) { - health = new HealthIntComponent(maxHealth); - } - - public Health(HealthIntComponent health) { - this.health = health; - } - - public HealthIntComponent getHealth() { - return health; - } - - @Override - public void onAdded() { - super.onAdded(); - entity.addComponent(health); - } - - @Override - public void onUpdate(double tpf) { - super.onUpdate(tpf); - if (health.isZero()) { - entity.removeFromWorld(); - } - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/Property.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Property.java similarity index 56% rename from src/main/java/com/github/codestorm/bounceverse/components/Property.java rename to src/main/java/com/github/codestorm/bounceverse/components/properties/Property.java index ede2eab..016058e 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/Property.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Property.java @@ -1,17 +1,19 @@ -package com.github.codestorm.bounceverse.components; +package com.github.codestorm.bounceverse.components.properties; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.component.Component; +import com.github.codestorm.bounceverse.components.behaviors.Behavior; /** * * *

{@link Property}

* - *

Một {@link Component} biểu diễn + * Một {@link Component} biểu diễn dữ * liệu (data/property) của {@link Entity}. * * @see Behavior */ -public non-sealed interface Property extends GameComponent {} +public abstract class Property extends Component {} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java index e721fa6..229cb5c 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java @@ -1,9 +1,9 @@ package com.github.codestorm.bounceverse.components.properties; -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.Property; +import com.almasb.fxgl.entity.Entity; +import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; import java.util.Arrays; -import java.util.HashSet; +import java.util.EnumSet; import javafx.geometry.Side; /** @@ -11,36 +11,30 @@ * *

{@link Shield}

* - *

Lớp này đại diện cho Khiên bảo vệ Entity. Khiên có thể bảo vệ Entity từ một hoặc nhiều phía - * khỏi bị tấn công. + * Khiên bảo vệ {@link Entity}. Khiên có thể bảo vệ một hoặc nhiều phía khỏi bị tấn công. */ -public abstract class Shield extends Component implements Property { - private HashSet sides = new HashSet<>(); +@ForEntity({}) +public class Shield extends Property { + private EnumSet sides = EnumSet.noneOf(Side.class); - public Shield() {} - - public Shield(Side... sides) { - addSide(sides); + /** + * Kiểm tra khiên có bảo vệ được cạnh mong muốn không. + * + * @param sides Cạnh cần kiểm tra + * @return {@code true} nếu bảo vệ được, ngược lại {@code false} + */ + public boolean hasSide(Side... sides) { + return this.sides.containsAll(Arrays.asList(sides)); } - public HashSet getSides() { + public EnumSet getSides() { return sides; } - public void setSides(HashSet sides) { + public void setSides(EnumSet sides) { this.sides = sides; } - /** - * Kiểm tra khiên có bảo vệ được cạnh mong muốn không. - * - * @param side Cạnh cần kiểm tra - * @return {@code true} nếu cạnh được bảo vệ, ngược lại {@code false} - */ - public boolean hasSide(Side side) { - return sides.contains(side); - } - public void addSide(Side... sides) { this.sides.addAll(Arrays.asList(sides)); } @@ -48,4 +42,10 @@ public void addSide(Side... sides) { public void removeSide(Side... sides) { Arrays.asList(sides).forEach(this.sides::remove); } + + public Shield() {} + + public Shield(Side... sides) { + addSide(sides); + } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java deleted file mode 100644 index adf2084..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Velocity.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.github.codestorm.bounceverse.components.properties; - -import com.almasb.fxgl.core.math.Vec2; -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.Property; -import com.github.codestorm.bounceverse.data.types.UnitVelocity; -import javafx.geometry.Point2D; - -/** - * - * - *

{@link Velocity}

- * - * Vận tốc hiện có của Entity. Giống như một Wrapper của {@link Vec2} dưới dạng {@link Component}. - * - * @see Vec2 - */ -public class Velocity extends Component implements Property { - private final Vec2 vector; - - public Velocity(Vec2 velocity) { - this.vector = velocity; - } - - public Velocity(Point2D velocity) { - this(new Vec2(velocity)); - } - - public Velocity(double vx, double vy) { - this(new Vec2(vx, vy)); - } - - /** - * Dừng lại. - * - * @see UnitVelocity#STAND - */ - public void stop() { - setVector(UnitVelocity.STAND.getVector()); - } - - @Override - public void onUpdate(double tpf) { - if (!vector.equals(UnitVelocity.STAND.getVector())) { - entity.translate(vector.mul(tpf)); - } - } - - public Vec2 getVector() { - return vector; - } - - public void setVector(Vec2 vector) { - this.vector.set(vector); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java deleted file mode 100644 index c809170..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/Width.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.github.codestorm.bounceverse.components.properties; - -import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.Property; - -public class Width extends Component implements Property { - private double originalWidth; - - @Override - public void onAdded() { - originalWidth = entity.getWidth(); - } - - public double getOriginalWidth() { - return originalWidth; - } - - public double getWidth() { - return entity.getWidth(); - } - - public void setWidth(double width) { - var transform = entity.getTransformComponent(); - transform.setAnchoredPosition(entity.getCenter()); - entity.setScaleX(width / originalWidth); - } - - public void resetWidth() { - entity.setScaleX(1.0); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java deleted file mode 100644 index bca60e2..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.github.codestorm.bounceverse.components.properties.brick; - -import com.almasb.fxgl.dsl.components.HealthIntComponent; -import com.almasb.fxgl.entity.component.CoreComponent; -import com.github.codestorm.bounceverse.components.properties.Health; -import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; -import com.github.codestorm.bounceverse.data.types.EntityType; - -/** - * - * - *

{@link BrickHealth}

- * - *

Lớp này đại diện cho thuộc tính HP của Viên gạch. - */ -@CoreComponent -@ForEntity(EntityType.BRICK) -public final class BrickHealth extends Health { - public BrickHealth(int maxHealth) { - super(maxHealth); - } - - @Override - public void onUpdate(double tpf) { - super.onUpdate(tpf); - // updateColor here - } - - public void damage(int amount) { - if (amount <= 0) { - return; - } - HealthIntComponent h = getHealth(); - - if (h.isZero()) { - return; - } - - h.damage(amount); - } - - public boolean isDead() { - return getHealth().isZero(); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java deleted file mode 100644 index 308ddd2..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.github.codestorm.bounceverse.components.properties.brick; - -import com.github.codestorm.bounceverse.components.properties.Shield; -import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; -import com.github.codestorm.bounceverse.data.types.EntityType; -import javafx.geometry.Side; - -/** - * - * - *

{@link BrickShield}

- * - *

Lớp này đại diện cho Khiên bảo vệ Viên gạch. - */ -@ForEntity(EntityType.BRICK) -public final class BrickShield extends Shield { - private static final int BONUS_SCORE = 20; - - public BrickShield() {} - - // TODO: Add shield view - // case "top" -> shield = new Rectangle(-0.5, -1.5, DEFAULT_WIDTH + 1, thickness); - // case "bottom" -> - // shield = - // new Rectangle( - // -0.5, - // DEFAULT_HEIGHT - thickness + 1, - // DEFAULT_WIDTH + 1, - // thickness); - // case "left" -> shield = new Rectangle(-1.5, -0.5, thickness, DEFAULT_HEIGHT + 1); - // case "right" -> - // shield = - // new Rectangle( - // DEFAULT_WIDTH - thickness + 1, - // -0.5, - // thickness, - // DEFAULT_HEIGHT + 1); - - public BrickShield(Side... sides) { - super(sides); - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java b/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java deleted file mode 100644 index 456e475..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/properties/bullet/BulletVelocity.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.github.codestorm.bounceverse.components.properties.bullet; - -import com.almasb.fxgl.core.math.Vec2; -import com.almasb.fxgl.dsl.FXGL; -import com.almasb.fxgl.entity.component.CoreComponent; -import com.github.codestorm.bounceverse.components.Behavior; -import com.github.codestorm.bounceverse.components.properties.Velocity; -import com.github.codestorm.bounceverse.data.meta.entities.ForEntity; -import com.github.codestorm.bounceverse.data.types.EntityType; -import javafx.geometry.Point2D; - -/** - * - * - *

{@link BulletVelocity}

- * - * Đại diện cho vận tốc hiện có của entity {@link EntityType#BULLET}. - */ -@CoreComponent -@ForEntity(EntityType.BULLET) -public final class BulletVelocity extends Velocity implements Behavior { - public BulletVelocity(Vec2 velocity) { - super(velocity); - } - - public BulletVelocity(Point2D velocity) { - super(velocity); - } - - public BulletVelocity(double vx, double vy) { - super(vx, vy); - } - - @Override - public void onUpdate(double tpf) { - super.onUpdate(tpf); - - final var viewport = FXGL.getGameScene().getViewport().getVisibleArea(); - final var entity = getEntity(); - // Remove when out of playground - if (entity.getRightX() < viewport.getMinX() - || entity.getX() > viewport.getMaxX() - || entity.getBottomY() < viewport.getMinY() - || entity.getY() > viewport.getMaxY()) { - entity.removeFromWorld(); - } - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java b/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java index 80308c6..aa3681e 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/LaunchOptions.java @@ -7,9 +7,8 @@ * *

{@link LaunchOptions}

* - * Các tùy chọn khi khởi động được áp dụng trong game. - * - *

Sử dụng {@link #load(String...)} để tải các options. + * Các tùy chọn khi khởi động được áp dụng trong game.
+ * Sử dụng {@link #load(String...)} để tải các options. */ public final class LaunchOptions { private static boolean debug = false; diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java index cdb1d6a..3914537 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java @@ -1,10 +1,10 @@ package com.github.codestorm.bounceverse.core.systems; import com.almasb.fxgl.dsl.FXGL; -import com.github.codestorm.bounceverse.factory.BrickFactory; -import com.github.codestorm.bounceverse.factory.BulletFactory; -import com.github.codestorm.bounceverse.factory.PaddleFactory; -import com.github.codestorm.bounceverse.factory.WallFactory; +import com.github.codestorm.bounceverse.factory.entities.BrickFactory; +import com.github.codestorm.bounceverse.factory.entities.BulletFactory; +import com.github.codestorm.bounceverse.factory.entities.PaddleFactory; +import com.github.codestorm.bounceverse.factory.entities.WallFactory; public final class GameSystem extends System { private GameSystem() {} @@ -35,9 +35,8 @@ public void apply() { } /** - * Lazy-loaded singleton holder. - * - *

Follow + * Lazy-loaded singleton holder.
+ * Follow
* Initialization-on-demand holder idiom. */ private static final class Holder { diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java index 2778e20..bc68f6d 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java @@ -2,10 +2,20 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.input.UserAction; -import com.github.codestorm.bounceverse.components.properties.Velocity; +import com.github.codestorm.bounceverse.components.behaviors.paddle.PaddleMovement; +import com.github.codestorm.bounceverse.data.types.DirectionUnit; import com.github.codestorm.bounceverse.data.types.EntityType; +import java.util.List; import javafx.scene.input.KeyCode; +/** + * + * + *

{@link InputSystem}

+ * + * {@link System} quản lý Input trong game.
+ * Đây là một Singleton, cần lấy instance thông qua {@link #getInstance()}. + */ public class InputSystem extends System { public static InputSystem getInstance() { return InputSystem.Holder.INSTANCE; @@ -20,14 +30,26 @@ public void apply() { protected void onActionBegin() { FXGL.getGameWorld() .getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Velocity.class).left()); + .forEach( + e -> + e.getComponent(PaddleMovement.class) + .execute( + List.of( + DirectionUnit + .LEFT))); } @Override protected void onActionEnd() { FXGL.getGameWorld() .getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Velocity.class).stop()); + .forEach( + e -> + e.getComponent(PaddleMovement.class) + .execute( + List.of( + DirectionUnit + .STAND))); } }, KeyCode.LEFT); @@ -39,23 +61,34 @@ protected void onActionEnd() { protected void onActionBegin() { FXGL.getGameWorld() .getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Velocity.class).right()); + .forEach( + e -> + e.getComponent(PaddleMovement.class) + .execute( + List.of( + DirectionUnit + .RIGHT))); } @Override protected void onActionEnd() { FXGL.getGameWorld() .getEntitiesByType(EntityType.PADDLE) - .forEach(e -> e.getComponent(Velocity.class).stop()); + .forEach( + e -> + e.getComponent(PaddleMovement.class) + .execute( + List.of( + DirectionUnit + .STAND))); } }, KeyCode.RIGHT); } /** - * Lazy-loaded singleton holder. - * - *

Follow + * Lazy-loaded singleton holder.
+ * Follow
* Initialization-on-demand holder idiom. */ private static final class Holder { diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java index ff73a43..bfeb5b9 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java @@ -3,78 +3,48 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.physics.CollisionHandler; -import com.github.codestorm.bounceverse.components.properties.Velocity; -import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; -import com.github.codestorm.bounceverse.components.properties.wall.Border; +import com.github.codestorm.bounceverse.components.behaviors.Attack; import com.github.codestorm.bounceverse.data.types.EntityType; +import java.util.List; /** * * *

{@link PhysicSystem}

* - * Hệ thống xử lý vật lý. - * - *

Đây là một Singleton, cần lấy instance thông qua {@link #getInstance()}. + * {@link System} quản lý Vật lý trong game.
+ * Đây là một Singleton, cần lấy instance thông qua {@link #getInstance()}. * * @see System */ public final class PhysicSystem extends System { - private PhysicSystem() {} public static PhysicSystem getInstance() { return Holder.INSTANCE; } - // ? Tạo các Group CollisionHandler ở đây (dùng composition) @Override public void apply() { - // Bullet vs Brick - FXGL.getPhysicsWorld() - .addCollisionHandler( - new CollisionHandler(EntityType.BULLET, EntityType.BRICK) { - @Override - protected void onCollisionBegin(Entity bullet, Entity brick) { - // Nếu brick có máu -> trừ 1 HP - if (brick.hasComponent(BrickHealth.class)) { - brick.getComponent(BrickHealth.class).damage(1); - // TODO: kiểm tra shield - } - - // Hủy viên đạn - bullet.removeFromWorld(); - } - }); + final var physicWorld = FXGL.getPhysicsWorld(); - // Paddle vs Wall - FXGL.getPhysicsWorld() - .addCollisionHandler( - new CollisionHandler(EntityType.PADDLE, EntityType.WALL) { - @Override - protected void onCollision(Entity paddle, Entity wall) { - if (wall.hasComponent(Border.class)) { - var wallProp = wall.getComponent(Wall.class); - var move = paddle.getComponentOptional(Velocity.class); - - move.ifPresent(m -> m.setVector(0)); - - switch (wallProp.getSide()) { - case LEFT -> paddle.setX(wall.getRightX()); - case RIGHT -> paddle.setX(wall.getX() - paddle.getWidth()); - default -> - throw new IllegalArgumentException( - "Unexpected value: " + wallProp.getSide()); - } - } - } - }); + // Bullet vs Brick + physicWorld.addCollisionHandler( + new CollisionHandler(EntityType.BULLET, EntityType.BRICK) { + @Override + protected void onCollisionBegin(Entity bullet, Entity brick) { + final var bulletAttack = bullet.getComponentOptional(Attack.class); + if (bulletAttack.isEmpty()) { + return; + } + bulletAttack.get().execute(List.of(brick)); + } + }); } /** - * Lazy-loaded singleton holder. - * - *

Follow + * Lazy-loaded singleton holder.
+ * Follow
* Initialization-on-demand holder idiom. */ private static final class Holder { diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java index b7108f3..61bb3ed 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/System.java @@ -7,9 +7,10 @@ * *

{@link System}

* - * Hệ thống logic trong game. Các lớp kế thừa nên thiết kế dựa trên (lazy-loaded) Singleton. - * - *

Tất cả logic của hệ thống được áp dụng thông qua {@link #apply()}. + * Hệ thống của game, đảm nhiệm cho một thành phần nào đó của game.
+ *
+ * Các lớp kế thừa nên thiết kế dựa trên (lazy-loaded) Singleton.
+ * Tất cả logic của hệ thống được áp dụng thông qua {@link #apply()}. * *

FAQ

* @@ -23,9 +24,8 @@ abstract class System { protected System() {} /** - * Áp dụng logic của hệ thống vào game. - * - *

Sử dụng trên {@link Bounceverse} + * Áp dụng logic của hệ thống vào game.
+ * Sử dụng trên {@link Bounceverse} */ public abstract void apply(); } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java index 9e40364..ca92148 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/UISystem.java @@ -3,6 +3,14 @@ import com.almasb.fxgl.dsl.FXGL; import javafx.scene.paint.Color; +/** + * + * + *

{@link UISystem}

+ * + * {@link System} quản lý Giao diện trong game.
+ * Đây là một Singleton, cần lấy instance thông qua {@link #getInstance()}. + */ public final class UISystem extends System { public static UISystem getInstance() { return UISystem.Holder.INSTANCE; @@ -14,9 +22,8 @@ public void apply() { } /** - * Lazy-loaded singleton holder. - * - *

Follow + * Lazy-loaded singleton holder.
+ * Follow
* Initialization-on-demand holder idiom. */ private static final class Holder { diff --git a/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanExecute.java b/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanExecute.java new file mode 100644 index 0000000..72f19c1 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanExecute.java @@ -0,0 +1,19 @@ +package com.github.codestorm.bounceverse.data.contracts; + +import java.util.List; + +/** + * + * + *

{@link CanExecute}

+ * + * Có thể thưc thi hành động nào đó. + */ +public interface CanExecute { + /** + * Thực thi hành động. + * + * @param data Dữ liệu truyền vào + */ + void execute(List data); +} diff --git a/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanUndo.java b/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanUndo.java index f32d1d7..5d27151 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanUndo.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanUndo.java @@ -1,14 +1,17 @@ package com.github.codestorm.bounceverse.data.contracts; +import com.github.codestorm.bounceverse.components.behaviors.UndoableBehavior; + /** * * *

{@link CanUndo}

* - * Có thể quay lại trạng thái lúc trước khi thực thi. + * Có thể hoàn tác trạng thái về lúc trước khi thực thi. Chỉ hỗ trợ thực thi 1 lần. + * + * @see UndoableBehavior */ -public interface CanUndo { - void apply(); - +public interface CanUndo extends CanExecute { + /** Hoàn tác trạng thái về trước đó. */ void undo(); } diff --git a/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/ForEntity.java b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/ForEntity.java index 1063d9d..2cf8f40 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/ForEntity.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/ForEntity.java @@ -11,7 +11,8 @@ * *

@{@link ForEntity}

* - * Đánh dấu class chỉ định là phù hợp cho entity nào. + * Đánh dấu class chỉ định là phù hợp cho entity nào.
+ * Nếu chỉ định tất cả entity, hãy truyền vào mảng rỗng {@code {}}. * * @see SuitableEntity * @see EntityType diff --git a/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntityProcessor.java b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntityProcessor.java index 52e9741..8991aa6 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntityProcessor.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/meta/entities/SuitableEntityProcessor.java @@ -1,7 +1,8 @@ package com.github.codestorm.bounceverse.data.meta.entities; import com.google.auto.service.AutoService; -import java.util.HashSet; +import java.util.Arrays; +import java.util.EnumSet; import java.util.Set; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.Processor; @@ -26,35 +27,38 @@ public Set getSupportedAnnotationTypes() { @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { for (Element element : roundEnv.getElementsAnnotatedWith(SuitableEntity.class)) { - if (element.getKind() != ElementKind.PARAMETER) { - continue; - } - - // Phía yêu cầu (@SuitableEntity) - final var requireParameter = (VariableElement) element; - final var requireAnnotation = requireParameter.getAnnotation(SuitableEntity.class); - final var requiredTypes = Set.of(requireAnnotation.value()); + if (element.getKind() == ElementKind.PARAMETER) { + // Phía yêu cầu (parameter của @SuitableEntity) + final var requireParameter = (VariableElement) element; + final var requireAnnotation = requireParameter.getAnnotation(SuitableEntity.class); + final var requiredTypes = EnumSet.copyOf(Arrays.asList(requireAnnotation.value())); - // Phía thực tế (parameter) - final var actualClassElement = - processingEnv.getTypeUtils().asElement(requireParameter.asType()); - if (actualClassElement == null) { - continue; - } - final var actualAnnotation = actualClassElement.getAnnotation(ForEntity.class); + // Phía thực tế (parameter truyền vào trong hàm) + final var actualClassElement = + processingEnv.getTypeUtils().asElement(requireParameter.asType()); + if (actualClassElement == null) { + continue; + } + final var actualAnnotation = actualClassElement.getAnnotation(ForEntity.class); - // Kiểm tra - if (actualAnnotation != null) { - final var actualTypes = Set.of(actualAnnotation.value()); - final var missingTypes = new HashSet<>(requiredTypes); - missingTypes.removeAll(actualTypes); + // Kiểm tra (bao hàm - loại trừ) + if (actualAnnotation != null) { + final var actualTypes = EnumSet.copyOf(Arrays.asList(actualAnnotation.value())); + if (actualTypes.isEmpty()) { + continue; // bao phủ cả (quy ước là mảng rỗng) + } + requiredTypes.removeAll(actualTypes); + if (requiredTypes.isEmpty()) { + continue; // đáp ứng hết + } + } - for (var missingType : missingTypes) { + for (var requiredType : requiredTypes) { final var message = String.format( "Parameter '%s' must suitable for '%s', but '%s' does not.", requireParameter.getSimpleName(), - missingType.name(), + requiredType.name(), actualClassElement.getSimpleName()); processingEnv .getMessager() diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/UnitVelocity.java b/src/main/java/com/github/codestorm/bounceverse/data/types/DirectionUnit.java similarity index 68% rename from src/main/java/com/github/codestorm/bounceverse/data/types/UnitVelocity.java rename to src/main/java/com/github/codestorm/bounceverse/data/types/DirectionUnit.java index 9f43b50..c73a55f 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/types/UnitVelocity.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/DirectionUnit.java @@ -5,13 +5,13 @@ /** * * - *

{@link UnitVelocity}

+ *

{@link DirectionUnit}

* * Vector đơn vị đại diện cho hướng di chuyển. * * @see Vec2 */ -public enum UnitVelocity { +public enum DirectionUnit { LEFT(-1, 0), RIGHT(1, 0), UP(0, -1), @@ -20,10 +20,15 @@ public enum UnitVelocity { private final Vec2 vector; - UnitVelocity(double vx, double vy) { + DirectionUnit(double vx, double vy) { this.vector = new Vec2(vx, vy).normalize(); } + /** + * Lấy vector {@link Vec2} tương ứng. + * + * @return Vector + */ public Vec2 getVector() { return vector; } diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java index 223be18..7a8909b 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java @@ -8,9 +8,8 @@ * *

{@link EntityType}

* - * Loại của {@link Entity}, dùng để phân biệt giữa các entity có loại khác nhau. - * - *

Sử dụng {@link EntityBuilder#type(Enum)} để gán cho entity và {@link Entity#getType()} để truy + * Loại của {@link Entity}, dùng để phân biệt giữa các entity có loại khác nhau.
+ * Sử dụng {@link EntityBuilder#type(Enum)} để gán cho entity và {@link Entity#getType()} để truy * xuất, hoặc {@link Entity#isType(Object)} để kiểm tra. * * @see EntityBuilder diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/SceneFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/SceneFactory.java index 466f9fc..b69acf9 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/SceneFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/SceneFactory.java @@ -1,9 +1,19 @@ package com.github.codestorm.bounceverse.factory; import com.almasb.fxgl.app.scene.FXGLMenu; +import com.almasb.fxgl.scene.Scene; import com.github.codestorm.bounceverse.scenes.MainMenu; import org.jetbrains.annotations.NotNull; +/** + * + * + *

{@link SceneFactory}

+ * + * Nơi sản xuất các {@link Scene} cho trò chơi. + * + * @see com.almasb.fxgl.app.scene.SceneFactory + */ public class SceneFactory extends com.almasb.fxgl.app.scene.SceneFactory { @NotNull @Override public FXGLMenu newMainMenu() { diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BrickFactory.java similarity index 89% rename from src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java rename to src/main/java/com/github/codestorm/bounceverse/factory/entities/BrickFactory.java index c370cf0..a146ac6 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BrickFactory.java @@ -1,12 +1,12 @@ -package com.github.codestorm.bounceverse.factory; +package com.github.codestorm.bounceverse.factory.entities; import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.dsl.components.HealthIntComponent; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.EntityFactory; import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.component.Component; -import com.github.codestorm.bounceverse.components.properties.brick.BrickHealth; import com.github.codestorm.bounceverse.data.meta.entities.SuitableEntity; import com.github.codestorm.bounceverse.data.types.EntityType; import javafx.geometry.Point2D; @@ -19,7 +19,8 @@ * *

{@link BrickFactory}

* - *

Factory để tạo các entity loại {@link EntityType#BRICK} trong trò chơi. + *
+ * Factory để tạo các entity loại {@link EntityType#BRICK} trong trò chơi. * * @see EntityFactory */ @@ -47,7 +48,7 @@ public final class BrickFactory implements EntityFactory { .type(EntityType.BRICK) .at(pos) .viewWithBBox(view) - .with(new BrickHealth(hp)) + .with(new HealthIntComponent(hp)) .with(components) .build(); } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BulletFactory.java similarity index 56% rename from src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java rename to src/main/java/com/github/codestorm/bounceverse/factory/entities/BulletFactory.java index e07a718..4f2847e 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/BulletFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BulletFactory.java @@ -1,25 +1,37 @@ -package com.github.codestorm.bounceverse.factory; +package com.github.codestorm.bounceverse.factory.entities; import static com.almasb.fxgl.dsl.FXGL.entityBuilder; +import com.almasb.fxgl.core.math.Vec2; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.entity.EntityFactory; import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.components.CollidableComponent; -import com.github.codestorm.bounceverse.components.properties.bullet.BulletVelocity; +import com.almasb.fxgl.physics.PhysicsComponent; import com.github.codestorm.bounceverse.data.types.EntityType; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; +/** + * + * + *

{@link BulletFactory}

+ * + * Factory để tạo các entity loại {@link EntityType#BULLET} trong trò chơi. + * + * @see EntityFactory + */ public final class BulletFactory implements EntityFactory { - @Spawns("bullet") + @Spawns("paddleBullet") public Entity newBullet(SpawnData data) { + final var physics = new PhysicsComponent(); + physics.setLinearVelocity(((Vec2) data.get("velocity")).toPoint2D()); + return entityBuilder(data) .type(EntityType.BULLET) .viewWithBBox(new Circle(4, Color.YELLOW)) - .with(new CollidableComponent(true)) - .with(new BulletVelocity(data.get("speed"), data.get("direction"))) + .with(new CollidableComponent(true), physics) .build(); } } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java similarity index 51% rename from src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java rename to src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java index cd52e4c..f178d17 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/PaddleFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.factory; +package com.github.codestorm.bounceverse.factory.entities; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; @@ -8,30 +8,44 @@ import com.almasb.fxgl.entity.components.CollidableComponent; import com.almasb.fxgl.physics.BoundingShape; import com.almasb.fxgl.physics.HitBox; -import com.github.codestorm.bounceverse.components.properties.Velocity; -import com.github.codestorm.bounceverse.components.properties.Width; +import com.github.codestorm.bounceverse.components.behaviors.ScaleChange; +import com.github.codestorm.bounceverse.components.behaviors.paddle.PaddleShooting; import com.github.codestorm.bounceverse.data.types.EntityType; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; +import javafx.util.Duration; +/** + * + * + *

{@link PaddleFactory}

+ * + * Factory để tạo các entity loại {@link EntityType#PADDLE} trong trò chơi. + * + * @see EntityFactory + */ public class PaddleFactory implements EntityFactory { private static final double DEFAULT_WIDTH = 150; private static final double DEFAULT_HEIGHT = 20; + private static final double DEFAULT_ARC_WIDTH = 14; + private static final double DEFAULT_ARC_HEIGHT = 14; + private static final Duration DEFAULT_SHOOT_COOLDOWN = Duration.ZERO; @Spawns("paddle") public Entity newPaddle(SpawnData data) { - Rectangle view = new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT); - view.setArcWidth(14); - view.setArcHeight(14); - view.setFill(Color.LIGHTBLUE); + Rectangle view = new Rectangle(DEFAULT_WIDTH, DEFAULT_HEIGHT, Color.LIGHTBLUE); + view.setArcWidth(DEFAULT_ARC_WIDTH); + view.setArcHeight(DEFAULT_ARC_HEIGHT); return FXGL.entityBuilder(data) .type(EntityType.PADDLE) .view(view) .bbox(new HitBox(BoundingShape.box(DEFAULT_WIDTH, DEFAULT_HEIGHT))) - .with(new CollidableComponent(true)) - .with(new Velocity(400)) - .with(new Width()) + .with( + new CollidableComponent(true), + new ScaleChange(), + new PaddleShooting(DEFAULT_SHOOT_COOLDOWN)) .build(); + // TODO: Thêm điều chỉnh tốc độ } } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/WallFactory.java similarity index 87% rename from src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java rename to src/main/java/com/github/codestorm/bounceverse/factory/entities/WallFactory.java index 41846bd..2ee00ba 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/WallFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/WallFactory.java @@ -1,4 +1,4 @@ -package com.github.codestorm.bounceverse.factory; +package com.github.codestorm.bounceverse.factory.entities; import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; @@ -6,12 +6,10 @@ import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.components.CollidableComponent; -import com.github.codestorm.bounceverse.components.properties.Wall; import com.github.codestorm.bounceverse.data.types.EntityType; import javafx.scene.shape.Rectangle; public class WallFactory implements EntityFactory { - private static final double WALL_THICKNESS = 20; @Spawns("wallLeft") @@ -20,7 +18,6 @@ public Entity newWallLeft(SpawnData data) { .type(EntityType.WALL) .at(0, 0) .viewWithBBox(new Rectangle(WALL_THICKNESS, FXGL.getAppHeight())) - .with(new Wall(Side.LEFT)) .with(new CollidableComponent(true)) .build(); } @@ -32,7 +29,6 @@ public Entity newWallRight(SpawnData data) { .type(EntityType.WALL) .at(x, 0) .viewWithBBox(new Rectangle(WALL_THICKNESS, FXGL.getAppHeight())) - .with(new Wall(Side.RIGHT)) .with(new CollidableComponent(true)) .build(); } @@ -43,7 +39,6 @@ public Entity newWallTop(SpawnData data) { .type(EntityType.WALL) .at(0, 0) .viewWithBBox(new Rectangle(FXGL.getAppWidth(), WALL_THICKNESS)) - .with(new Wall(Side.TOP)) .with(new CollidableComponent(true)) .build(); } @@ -55,7 +50,6 @@ public Entity newWallBottom(SpawnData data) { .type(EntityType.WALL) .at(0, y) .viewWithBBox(new Rectangle(FXGL.getAppWidth(), WALL_THICKNESS)) - .with(new Wall(Side.BOTTOM)) .with(new CollidableComponent(true)) .build(); } diff --git a/src/main/java/com/github/codestorm/bounceverse/scenes/MainMenu.java b/src/main/java/com/github/codestorm/bounceverse/scenes/MainMenu.java index 3c182d1..4e1f726 100644 --- a/src/main/java/com/github/codestorm/bounceverse/scenes/MainMenu.java +++ b/src/main/java/com/github/codestorm/bounceverse/scenes/MainMenu.java @@ -1,8 +1,16 @@ package com.github.codestorm.bounceverse.scenes; import com.almasb.fxgl.app.scene.FXGLDefaultMenu; +import com.almasb.fxgl.app.scene.FXGLMenu; import com.almasb.fxgl.app.scene.MenuType; +/** + * + * + *

{@link MainMenu}

+ * + * {@link FXGLMenu} loại {@link MenuType#MAIN_MENU} được sử dụng trong trò chơi. + */ public class MainMenu extends FXGLDefaultMenu { public MainMenu() { super(MenuType.MAIN_MENU); From 689f6904388de2e42e87d3c44eef8964c171f71d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 22 Oct 2025 00:22:23 +0700 Subject: [PATCH 43/53] fix(paddle): fix freeze paddle --- .../behaviors/paddle/PaddleMovement.java | 32 ------------ .../bounceverse/core/systems/InputSystem.java | 51 ++++--------------- .../factory/entities/PaddleFactory.java | 5 +- 3 files changed, 12 insertions(+), 76 deletions(-) delete mode 100644 src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleMovement.java diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleMovement.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleMovement.java deleted file mode 100644 index 8545c24..0000000 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/paddle/PaddleMovement.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.github.codestorm.bounceverse.components.behaviors.paddle; - -import com.almasb.fxgl.entity.component.Required; -import com.almasb.fxgl.physics.PhysicsComponent; -import com.github.codestorm.bounceverse.components.behaviors.Behavior; -import com.github.codestorm.bounceverse.data.types.DirectionUnit; -import java.util.List; - -@Required(PhysicsComponent.class) -public class PaddleMovement extends Behavior { - public static final double NORMAL_SPEED = 100; - public static final double DASH_SPEED = NORMAL_SPEED * 2; - private double speed = NORMAL_SPEED; - - @Override - public void execute(List data) { - final var physics = entity.getComponent(PhysicsComponent.class); - final var standVector = DirectionUnit.STAND.getVector(); - for (var obj : data) { - final var direction = (DirectionUnit) obj; - switch (direction) { - case LEFT -> - physics.setLinearVelocity( - physics.getVelocityX() - speed, physics.getVelocityY()); - case RIGHT -> - physics.setLinearVelocity( - physics.getVelocityX() + speed, physics.getVelocityY()); - case STAND -> physics.setLinearVelocity(standVector.x, standVector.y); - } - } - } -} diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java index bc68f6d..92cebba 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java @@ -2,10 +2,9 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.input.UserAction; -import com.github.codestorm.bounceverse.components.behaviors.paddle.PaddleMovement; import com.github.codestorm.bounceverse.data.types.DirectionUnit; import com.github.codestorm.bounceverse.data.types.EntityType; -import java.util.List; + import javafx.scene.input.KeyCode; /** @@ -27,29 +26,15 @@ public void apply() { .addAction( new UserAction("Move Left") { @Override - protected void onActionBegin() { - FXGL.getGameWorld() - .getEntitiesByType(EntityType.PADDLE) - .forEach( - e -> - e.getComponent(PaddleMovement.class) - .execute( - List.of( - DirectionUnit - .LEFT))); - } - - @Override - protected void onActionEnd() { + protected void onAction() { FXGL.getGameWorld() .getEntitiesByType(EntityType.PADDLE) .forEach( e -> - e.getComponent(PaddleMovement.class) - .execute( - List.of( - DirectionUnit - .STAND))); + e.translate( + DirectionUnit.LEFT + .getVector() + .mul(10))); } }, KeyCode.LEFT); @@ -58,29 +43,15 @@ protected void onActionEnd() { .addAction( new UserAction("Move Right") { @Override - protected void onActionBegin() { - FXGL.getGameWorld() - .getEntitiesByType(EntityType.PADDLE) - .forEach( - e -> - e.getComponent(PaddleMovement.class) - .execute( - List.of( - DirectionUnit - .RIGHT))); - } - - @Override - protected void onActionEnd() { + protected void onAction() { FXGL.getGameWorld() .getEntitiesByType(EntityType.PADDLE) .forEach( e -> - e.getComponent(PaddleMovement.class) - .execute( - List.of( - DirectionUnit - .STAND))); + e.translate( + DirectionUnit.RIGHT + .getVector() + .mul(10))); } }, KeyCode.RIGHT); diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java index f178d17..cad019c 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java @@ -6,8 +6,6 @@ import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.components.CollidableComponent; -import com.almasb.fxgl.physics.BoundingShape; -import com.almasb.fxgl.physics.HitBox; import com.github.codestorm.bounceverse.components.behaviors.ScaleChange; import com.github.codestorm.bounceverse.components.behaviors.paddle.PaddleShooting; import com.github.codestorm.bounceverse.data.types.EntityType; @@ -39,8 +37,7 @@ public Entity newPaddle(SpawnData data) { return FXGL.entityBuilder(data) .type(EntityType.PADDLE) - .view(view) - .bbox(new HitBox(BoundingShape.box(DEFAULT_WIDTH, DEFAULT_HEIGHT))) + .viewWithBBox(view) .with( new CollidableComponent(true), new ScaleChange(), From 7f860370b323932331882934fa2c753263090c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 22 Oct 2025 00:38:47 +0700 Subject: [PATCH 44/53] ci: update CI conditions to use startsWith for skip ci Modified CI configuration to use startsWith instead of contains for detecting '[skip ci]' in commit messages, improving clarity and functionality. --- .github/workflows/build.yml | 2 +- .github/workflows/spotless.yml | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7a7fa9..41b3574 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ permissions: jobs: build: - if: "github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')" + if: "github.event_name != 'push' || !startsWith(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/.github/workflows/spotless.yml b/.github/workflows/spotless.yml index 017c640..41ade9c 100644 --- a/.github/workflows/spotless.yml +++ b/.github/workflows/spotless.yml @@ -15,15 +15,18 @@ concurrency: jobs: check: runs-on: ubuntu-latest - if: "github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')" + if: "github.event_name != 'push' || !startsWith(github.event.head_commit.message, '[skip ci]')" steps: - - uses: actions/checkout@v5 + - name: Checkout repository + uses: actions/checkout@v5 + - name: Setup JDK uses: actions/setup-java@v5 with: distribution: oracle java-version: 24 cache: gradle + - name: Run Spotless check run: | chmod +x gradlew @@ -32,23 +35,27 @@ jobs: apply: runs-on: ubuntu-latest needs: check - if: needs.check.result == 'failure' + if: ${{ needs.check.result == 'failure' }} steps: - - uses: actions/checkout@v5 + - name: Checkout repository + uses: actions/checkout@v5 + - name: Setup JDK uses: actions/setup-java@v5 with: distribution: oracle java-version: 24 cache: gradle + - name: Run Spotless apply run: | chmod +x gradlew ./gradlew spotlessApply + - name: Commit and Push run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add -A - git commit -m "[skip ci] Apply automatic code formatting" + git commit -m "[skip ci] chore: Apply automatic code formatting" git push From 17541868d3439c57f4d3aff31c45f3ff7386c1f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 22 Oct 2025 00:44:39 +0700 Subject: [PATCH 45/53] chore: correct spelling and rename classes for consistency Renamed `HeathDeath` to `HealthDeath` and fixed spelling in `CanExecute` documentation. These changes improve code readability and maintainability. --- .../behaviors/{HeathDeath.java => HealthDeath.java} | 4 ++-- .../codestorm/bounceverse/core/systems/InputSystem.java | 1 - .../codestorm/bounceverse/data/contracts/CanExecute.java | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) rename src/main/java/com/github/codestorm/bounceverse/components/behaviors/{HeathDeath.java => HealthDeath.java} (91%) diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/HeathDeath.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/HealthDeath.java similarity index 91% rename from src/main/java/com/github/codestorm/bounceverse/components/behaviors/HeathDeath.java rename to src/main/java/com/github/codestorm/bounceverse/components/behaviors/HealthDeath.java index 18a07d4..4669748 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/HeathDeath.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/HealthDeath.java @@ -8,14 +8,14 @@ /** * * - *

{@link HeathDeath}

+ *

{@link HealthDeath}

* * Hành động chết vì yêu :< vì hết máu.
* Yêu cầu entity có {@link HealthIntComponent} trước. */ @Required(HealthIntComponent.class) @ForEntity({}) -public class HeathDeath extends Behavior { +public class HealthDeath extends Behavior { @Override public void execute(List data) { final var health = entity.getComponent(HealthIntComponent.class); diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java index 92cebba..ca578fe 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/InputSystem.java @@ -4,7 +4,6 @@ import com.almasb.fxgl.input.UserAction; import com.github.codestorm.bounceverse.data.types.DirectionUnit; import com.github.codestorm.bounceverse.data.types.EntityType; - import javafx.scene.input.KeyCode; /** diff --git a/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanExecute.java b/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanExecute.java index 72f19c1..3951ea1 100644 --- a/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanExecute.java +++ b/src/main/java/com/github/codestorm/bounceverse/data/contracts/CanExecute.java @@ -7,7 +7,7 @@ * *

{@link CanExecute}

* - * Có thể thưc thi hành động nào đó. + * Có thể thực thi hành động nào đó. */ public interface CanExecute { /** From 8b5ef507bbddf9bbe2a73a13ab8f91c8c68845b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 22 Oct 2025 01:16:46 +0700 Subject: [PATCH 46/53] [skip ci] chore: add CODEOWNERS (cherry picked from commit 06f6adc8a47ae75d78831e1bf06bef354b1bba18) --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..6427dfe --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @thnhmai06 \ No newline at end of file From 1f97c73bffc7eb80be0b084c94f5223f5ad7b29f Mon Sep 17 00:00:00 2001 From: minngoc1213 <156768586+minngoc1213@users.noreply.github.com> Date: Wed, 22 Oct 2025 16:44:12 +0700 Subject: [PATCH 47/53] Add Ball entity and Ball, Brick physic/collision components (#14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add game context and ball entity * feat: generate brick and ball, add simple collision * feat: apply FXGL physic * feat: spotlessApply * chore: delete empty file `CollisionSystem.java` * refactor: update branch with new project structures Introduce AnchorPoint enum for common anchor points on Rectangle2D. Refactor BallFactory to use default values for ball properties and improve entity spawning logic. Update collision handling in PhysicSystem for better interaction between entities. --------- Co-authored-by: Mai Thành <62001770+thnhmai06@users.noreply.github.com> (cherry picked from commit 4b9e256d4b0540023704957deb953795f3fe3484) --- build.gradle | 19 +++ .../github/codestorm/bounceverse/Utils.java | 17 +++ .../components/behaviors/Attack.java | 5 +- .../bounceverse/core/systems/GameSystem.java | 48 +++++-- .../core/systems/PhysicSystem.java | 74 +++++++++- .../bounceverse/data/types/AnchorPoint.java | 52 +++++++ .../factory/entities/BallFactory.java | 70 ++++++++++ .../factory/entities/BrickFactory.java | 14 +- .../factory/entities/BulletFactory.java | 4 +- .../factory/entities/PaddleFactory.java | 7 +- .../factory/entities/WallFactory.java | 132 ++++++++++++++---- 11 files changed, 384 insertions(+), 58 deletions(-) create mode 100644 src/main/java/com/github/codestorm/bounceverse/data/types/AnchorPoint.java create mode 100644 src/main/java/com/github/codestorm/bounceverse/factory/entities/BallFactory.java diff --git a/build.gradle b/build.gradle index e52f7b3..ab6afa5 100644 --- a/build.gradle +++ b/build.gradle @@ -72,3 +72,22 @@ spotless { formatAnnotations() } } + +// enable flexible constructors (preview feature) +tasks.withType(JavaCompile).configureEach { + options.compilerArgs += "--enable-preview" +} + +tasks.withType(Test).configureEach { + jvmArgs += "--enable-preview" +} + +tasks.withType(JavaExec).configureEach { + jvmArgs += "--enable-preview" +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(24) + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/Utils.java b/src/main/java/com/github/codestorm/bounceverse/Utils.java index b358385..93f75f8 100644 --- a/src/main/java/com/github/codestorm/bounceverse/Utils.java +++ b/src/main/java/com/github/codestorm/bounceverse/Utils.java @@ -3,6 +3,7 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.time.TimerAction; +import com.github.codestorm.bounceverse.data.types.DirectionUnit; import java.io.IOException; import java.io.InputStream; import java.util.*; @@ -259,4 +260,20 @@ public static List getEntityInCircle(double cx, double cy, double radius .toList(); } } + + public static final class Collision { + public static DirectionUnit getCollisionDirection(Entity source, Entity target) { + var fromBox = source.getBoundingBoxComponent(); + var toBox = target.getBoundingBoxComponent(); + + var fCenter = fromBox.getCenterWorld(); + var tCenter = toBox.getCenterWorld(); + + var direction = tCenter.subtract(fCenter); + + return Math.abs(direction.getX()) > Math.abs(direction.getY()) + ? direction.getX() > 0 ? DirectionUnit.RIGHT : DirectionUnit.LEFT + : direction.getY() > 0 ? DirectionUnit.DOWN : DirectionUnit.UP; + } + } } diff --git a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Attack.java b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Attack.java index f68083d..30f021b 100644 --- a/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Attack.java +++ b/src/main/java/com/github/codestorm/bounceverse/components/behaviors/Attack.java @@ -30,8 +30,11 @@ public void execute(List data) { final var theirAttributes = obj.getComponentOptional(Attributes.class); final var theirDefense = theirAttributes.map(Attributes::getDefense).orElse(0); - final var actualDamage = damage >= 0 ? Math.min(0, damage - theirDefense) : damage; + final var actualDamage = damage >= 0 ? Math.max(0, damage - theirDefense) : damage; theirHealth.get().damage(actualDamage); + if (theirHealth.get().isZero()) { + theirHealth.get().getEntity().removeFromWorld(); + } } } diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java index 3914537..9ed5117 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/GameSystem.java @@ -1,10 +1,8 @@ package com.github.codestorm.bounceverse.core.systems; import com.almasb.fxgl.dsl.FXGL; -import com.github.codestorm.bounceverse.factory.entities.BrickFactory; -import com.github.codestorm.bounceverse.factory.entities.BulletFactory; -import com.github.codestorm.bounceverse.factory.entities.PaddleFactory; -import com.github.codestorm.bounceverse.factory.entities.WallFactory; +import com.almasb.fxgl.entity.EntityFactory; +import com.github.codestorm.bounceverse.factory.entities.*; public final class GameSystem extends System { private GameSystem() {} @@ -13,25 +11,45 @@ public static GameSystem getInstance() { return GameSystem.Holder.INSTANCE; } - @Override - public void apply() { - FXGL.getGameWorld().addEntityFactory(new BrickFactory()); - FXGL.getGameWorld().addEntityFactory(new BulletFactory()); - FXGL.getGameWorld().addEntityFactory(new PaddleFactory()); - FXGL.getGameWorld().addEntityFactory(new WallFactory()); + private static void addFactory(EntityFactory... factories) { + for (var factory : factories) { + FXGL.getGameWorld().addEntityFactory(factory); + } + } - // Spawn walls. + private static void spawnWalls() { + FXGL.spawn("wallTop"); + FXGL.spawn("wallBottom"); FXGL.spawn("wallLeft"); FXGL.spawn("wallRight"); - FXGL.spawn("wallTop"); + } - // Spawn paddle + @Override + public void apply() { + addFactory( + new WallFactory(), + new BrickFactory(), + new BulletFactory(), + new PaddleFactory(), + new BallFactory()); + + // Wall + spawnWalls(); + + // Brick + for (int y = 1; y <= 6; y++) { + for (int x = 1; x <= 10; x++) { + FXGL.spawn("normalBrick", 85 * x, 35 * y); + } + } + + // Paddle double px = FXGL.getAppWidth() / 2.0 - 60; double py = FXGL.getAppHeight() - 40; FXGL.spawn("paddle", px, py); - FXGL.spawn("normalBrick", 100, 100); - FXGL.spawn("normalBrick", 200, 200); + // Ball + FXGL.spawn("ball"); } /** diff --git a/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java b/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java index bfeb5b9..ce09a68 100644 --- a/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java +++ b/src/main/java/com/github/codestorm/bounceverse/core/systems/PhysicSystem.java @@ -3,6 +3,8 @@ import com.almasb.fxgl.dsl.FXGL; import com.almasb.fxgl.entity.Entity; import com.almasb.fxgl.physics.CollisionHandler; +import com.almasb.fxgl.physics.PhysicsComponent; +import com.github.codestorm.bounceverse.Utils; import com.github.codestorm.bounceverse.components.behaviors.Attack; import com.github.codestorm.bounceverse.data.types.EntityType; import java.util.List; @@ -27,17 +29,83 @@ public static PhysicSystem getInstance() { @Override public void apply() { final var physicWorld = FXGL.getPhysicsWorld(); + physicWorld.setGravity(0, 0); // Bullet vs Brick physicWorld.addCollisionHandler( new CollisionHandler(EntityType.BULLET, EntityType.BRICK) { @Override protected void onCollisionBegin(Entity bullet, Entity brick) { - final var bulletAttack = bullet.getComponentOptional(Attack.class); - if (bulletAttack.isEmpty()) { + final var atk = bullet.getComponentOptional(Attack.class); + if (atk.isEmpty()) { return; } - bulletAttack.get().execute(List.of(brick)); + atk.get().execute(List.of(brick)); + } + }); + + // Ball vs Brick + physicWorld.addCollisionHandler( + new CollisionHandler(EntityType.BALL, EntityType.BRICK) { + @Override + protected void onCollisionBegin(Entity ball, Entity brick) { + // collision + final var collisionDirection = + Utils.Collision.getCollisionDirection(ball, brick); + + final var physics = ball.getComponent(PhysicsComponent.class); + switch (collisionDirection) { + case UP, DOWN -> + physics.setLinearVelocity( + physics.getVelocityX(), -physics.getVelocityY()); + case LEFT, RIGHT -> + physics.setLinearVelocity( + -physics.getVelocityX(), physics.getVelocityY()); + } + + // damage + final var atk = ball.getComponent(Attack.class); + atk.execute(List.of(brick)); + } + }); + + // Ball vs Paddle + physicWorld.addCollisionHandler( + new CollisionHandler(EntityType.BALL, EntityType.PADDLE) { + @Override + protected void onCollisionBegin(Entity ball, Entity paddle) { + final var collisionDirection = + Utils.Collision.getCollisionDirection(ball, paddle); + + final var physics = ball.getComponent(PhysicsComponent.class); + switch (collisionDirection) { + case UP, DOWN -> + physics.setLinearVelocity( + physics.getVelocityX(), -physics.getVelocityY()); + case LEFT, RIGHT -> + physics.setLinearVelocity( + -physics.getVelocityX(), physics.getVelocityY()); + } + } + }); + + // Ball vs Wall + physicWorld.addCollisionHandler( + new CollisionHandler(EntityType.BALL, EntityType.WALL) { + @Override + protected void onCollisionBegin(Entity ball, Entity wall) { + final var collisionDirection = + Utils.Collision.getCollisionDirection(ball, wall); + + final var physics = ball.getComponent(PhysicsComponent.class); + switch (collisionDirection) { + case UP, DOWN -> + physics.setLinearVelocity( + physics.getVelocityX(), -physics.getVelocityY()); + case LEFT, RIGHT -> + physics.setLinearVelocity( + -physics.getVelocityX(), physics.getVelocityY()); + } } }); } diff --git a/src/main/java/com/github/codestorm/bounceverse/data/types/AnchorPoint.java b/src/main/java/com/github/codestorm/bounceverse/data/types/AnchorPoint.java new file mode 100644 index 0000000..8fa32d2 --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/data/types/AnchorPoint.java @@ -0,0 +1,52 @@ +package com.github.codestorm.bounceverse.data.types; + +import javafx.geometry.Point2D; +import javafx.geometry.Rectangle2D; +import javafx.scene.shape.Rectangle; + +/** + * + * + *

{@link AnchorPoint}

+ * + * Các cạnh neo phổ biến trên {@link Rectangle2D}. + */ +public enum AnchorPoint { + TOP_LEFT(0, 0), + TOP_CENTER(0.5, 0), + TOP_RIGHT(1, 0), + BOTTOM_LEFT(0, 1), + BOTTOM_CENTER(0.5, 1), + BOTTOM_RIGHT(1, 1), + CENTER_LEFT(0, 0.5), + CENTER(0.5, 0.5), + CENTER_RIGHT(1, 0.5); + + private final Point2D point; + + AnchorPoint(double nx, double ny) { + this.point = new Point2D(nx, ny); + } + + /** + * Lấy {@link AnchorPoint} trên một {@link Rectangle2D} + * + * @param rect Hình chữ nhật 2D + * @return Vị trí tương ứng trên hình + */ + public Point2D of(Rectangle2D rect) { + final var movement = + new Point2D(rect.getWidth() * point.getX(), rect.getHeight() * point.getY()); + return new Point2D(rect.getMinX(), rect.getMinY()).add(movement); + } + + /** + * Lấy {@link AnchorPoint} trên một {@link Rectangle} + * + * @param rect Hình chữ nhật + * @return Vị trí tương ứng trên hình + */ + public Point2D of(Rectangle rect) { + return of(new Rectangle2D(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight())); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/entities/BallFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BallFactory.java new file mode 100644 index 0000000..59088fa --- /dev/null +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BallFactory.java @@ -0,0 +1,70 @@ +package com.github.codestorm.bounceverse.factory.entities; + +import com.almasb.fxgl.dsl.FXGL; +import com.almasb.fxgl.entity.Entity; +import com.almasb.fxgl.entity.EntityFactory; +import com.almasb.fxgl.entity.SpawnData; +import com.almasb.fxgl.entity.Spawns; +import com.almasb.fxgl.physics.PhysicsComponent; +import com.almasb.fxgl.physics.box2d.dynamics.BodyType; +import com.almasb.fxgl.physics.box2d.dynamics.FixtureDef; +import com.github.codestorm.bounceverse.components.behaviors.Attack; +import com.github.codestorm.bounceverse.data.types.EntityType; +import javafx.geometry.Point2D; +import javafx.scene.paint.Color; +import javafx.scene.shape.Circle; + +/** + * + * + *

{@link BallFactory}

+ * + *

This class defines and spawns a new {@link EntityType#BALL} entity in the game world. + * + *

By default, the spawned ball has: + * + *

    + *
  • Radius = {@link #DEFAULT_RADIUS} + *
  • Position: {@link #DEFAULT_POS} + *
  • Color: {@link #DEFAULT_COLOR} + *
+ * + * @author minngoc1213 + */ +public class BallFactory implements EntityFactory { + public static final int DEFAULT_RADIUS = 10; + public static final Point2D DEFAULT_POS = new Point2D(400, 500); + public static final Color DEFAULT_COLOR = Color.RED; + + @Spawns("ball") + public Entity spawnBall(SpawnData data) { + PhysicsComponent physics = new PhysicsComponent(); + + var fixture = new FixtureDef(); + fixture.setDensity(1.0f); + fixture.setFriction(0f); + fixture.setRestitution(1f); + + physics.setFixtureDef(fixture); + physics.setBodyType(BodyType.DYNAMIC); + + // set ball doesn't rotate + physics.setOnPhysicsInitialized( + () -> { + physics.setLinearVelocity(200, 200); + physics.setAngularVelocity(0); + physics.getBody().setFixedRotation(true); + physics.getBody().setLinearDamping(0f); + physics.getBody().setAngularDamping(0f); + }); + + return FXGL.entityBuilder(data) + .type(EntityType.BALL) + .at(DEFAULT_POS) + .viewWithBBox(new Circle(DEFAULT_RADIUS, DEFAULT_COLOR)) + .collidable() + .with(physics, new Attack()) + .anchorFromCenter() + .buildAndAttach(); + } +} diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/entities/BrickFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BrickFactory.java index a146ac6..f74633e 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/entities/BrickFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BrickFactory.java @@ -7,6 +7,9 @@ import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; import com.almasb.fxgl.entity.component.Component; +import com.almasb.fxgl.physics.PhysicsComponent; +import com.almasb.fxgl.physics.box2d.dynamics.BodyType; +import com.almasb.fxgl.physics.box2d.dynamics.FixtureDef; import com.github.codestorm.bounceverse.data.meta.entities.SuitableEntity; import com.github.codestorm.bounceverse.data.types.EntityType; import javafx.geometry.Point2D; @@ -44,11 +47,20 @@ public final class BrickFactory implements EntityFactory { int hp, Rectangle view, @SuitableEntity(EntityType.BRICK) Component... components) { + var physics = new PhysicsComponent(); + var fixture = new FixtureDef(); + fixture.setFriction(0f); + fixture.setRestitution(1f); + + physics.setFixtureDef(fixture); + physics.setBodyType(BodyType.STATIC); + return FXGL.entityBuilder() .type(EntityType.BRICK) .at(pos) .viewWithBBox(view) - .with(new HealthIntComponent(hp)) + .collidable() + .with(physics, new HealthIntComponent(hp)) .with(components) .build(); } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/entities/BulletFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BulletFactory.java index 4f2847e..b585049 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/entities/BulletFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/BulletFactory.java @@ -7,7 +7,6 @@ import com.almasb.fxgl.entity.EntityFactory; import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; -import com.almasb.fxgl.entity.components.CollidableComponent; import com.almasb.fxgl.physics.PhysicsComponent; import com.github.codestorm.bounceverse.data.types.EntityType; import javafx.scene.paint.Color; @@ -31,7 +30,8 @@ public Entity newBullet(SpawnData data) { return entityBuilder(data) .type(EntityType.BULLET) .viewWithBBox(new Circle(4, Color.YELLOW)) - .with(new CollidableComponent(true), physics) + .collidable() + .with(physics) .build(); } } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java index cad019c..a328031 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/PaddleFactory.java @@ -5,7 +5,6 @@ import com.almasb.fxgl.entity.EntityFactory; import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; -import com.almasb.fxgl.entity.components.CollidableComponent; import com.github.codestorm.bounceverse.components.behaviors.ScaleChange; import com.github.codestorm.bounceverse.components.behaviors.paddle.PaddleShooting; import com.github.codestorm.bounceverse.data.types.EntityType; @@ -38,10 +37,8 @@ public Entity newPaddle(SpawnData data) { return FXGL.entityBuilder(data) .type(EntityType.PADDLE) .viewWithBBox(view) - .with( - new CollidableComponent(true), - new ScaleChange(), - new PaddleShooting(DEFAULT_SHOOT_COOLDOWN)) + .collidable() + .with(new ScaleChange(), new PaddleShooting(DEFAULT_SHOOT_COOLDOWN)) .build(); // TODO: Thêm điều chỉnh tốc độ } diff --git a/src/main/java/com/github/codestorm/bounceverse/factory/entities/WallFactory.java b/src/main/java/com/github/codestorm/bounceverse/factory/entities/WallFactory.java index 2ee00ba..c606eaf 100644 --- a/src/main/java/com/github/codestorm/bounceverse/factory/entities/WallFactory.java +++ b/src/main/java/com/github/codestorm/bounceverse/factory/entities/WallFactory.java @@ -5,52 +5,122 @@ import com.almasb.fxgl.entity.EntityFactory; import com.almasb.fxgl.entity.SpawnData; import com.almasb.fxgl.entity.Spawns; -import com.almasb.fxgl.entity.components.CollidableComponent; +import com.almasb.fxgl.physics.PhysicsComponent; +import com.almasb.fxgl.physics.box2d.dynamics.BodyType; +import com.almasb.fxgl.physics.box2d.dynamics.FixtureDef; +import com.github.codestorm.bounceverse.data.types.AnchorPoint; import com.github.codestorm.bounceverse.data.types.EntityType; +import javafx.geometry.Point2D; +import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; +/** + * + * + *

{@link WallFactory}

+ * + *

This class spawns {@link EntityType#WALL} entity for the game world. + * + *

By default, 4 walls top, left, bottom, right will be spawn at the beginning. + * + * @author minngoc1213 + */ public class WallFactory implements EntityFactory { - private static final double WALL_THICKNESS = 20; + public static final double DEFAULT_THICKNESS = 5; - @Spawns("wallLeft") - public Entity newWallLeft(SpawnData data) { - return FXGL.entityBuilder(data) - .type(EntityType.WALL) - .at(0, 0) - .viewWithBBox(new Rectangle(WALL_THICKNESS, FXGL.getAppHeight())) - .with(new CollidableComponent(true)) - .build(); - } + /** + * Create new Entity Wall with ing-game physic. + * + * @param pos position + * @param width width + * @param height height + * @return Wall entity at pos + */ + public static Entity createWall(Point2D pos, double width, double height) { + Rectangle rect = new Rectangle(width, height, Color.GRAY); - @Spawns("wallRight") - public Entity newWallRight(SpawnData data) { - double x = FXGL.getAppWidth() - WALL_THICKNESS; - return FXGL.entityBuilder(data) + PhysicsComponent physics = new PhysicsComponent(); + + FixtureDef fixture = new FixtureDef(); + fixture.setFriction(0f); + fixture.setRestitution(1f); + + physics.setFixtureDef(fixture); + physics.setBodyType(BodyType.STATIC); + + return FXGL.entityBuilder() .type(EntityType.WALL) - .at(x, 0) - .viewWithBBox(new Rectangle(WALL_THICKNESS, FXGL.getAppHeight())) - .with(new CollidableComponent(true)) + .at(pos) + .viewWithBBox(rect) + .collidable() + .with(physics) + .anchorFromCenter() .build(); } + /** + * Create Top {@link EntityType#WALL}. ` + * + * @param data Spawn data + * @return Top wall + */ @Spawns("wallTop") public Entity newWallTop(SpawnData data) { - return FXGL.entityBuilder(data) - .type(EntityType.WALL) - .at(0, 0) - .viewWithBBox(new Rectangle(FXGL.getAppWidth(), WALL_THICKNESS)) - .with(new CollidableComponent(true)) - .build(); + final var appShape = new Rectangle(FXGL.getAppWidth(), FXGL.getAppHeight()); + final double thickness = + data.hasKey("thickness") ? data.get("thickness") : DEFAULT_THICKNESS; + + return createWall(AnchorPoint.TOP_LEFT.of(appShape), appShape.getWidth(), thickness); } + /** + * Create Bottom {@link EntityType#WALL}. ` + * + * @param data Spawn data + * @return Botton wall + */ @Spawns("wallBottom") public Entity newWallBottom(SpawnData data) { - double y = FXGL.getAppHeight() - WALL_THICKNESS; - return FXGL.entityBuilder(data) - .type(EntityType.WALL) - .at(0, y) - .viewWithBBox(new Rectangle(FXGL.getAppWidth(), WALL_THICKNESS)) - .with(new CollidableComponent(true)) - .build(); + final var appShape = new Rectangle(FXGL.getAppWidth(), FXGL.getAppHeight()); + final double thickness = + data.hasKey("thickness") ? data.get("thickness") : DEFAULT_THICKNESS; + + return createWall( + AnchorPoint.BOTTOM_LEFT.of(appShape).subtract(0, thickness), + appShape.getWidth(), + thickness); + } + + /** + * Create Left {@link EntityType#WALL}. ` + * + * @param data Spawn data + * @return Left wall + */ + @Spawns("wallLeft") + public Entity newWallLeft(SpawnData data) { + final var appShape = new Rectangle(FXGL.getAppWidth(), FXGL.getAppHeight()); + final double thickness = + data.hasKey("thickness") ? data.get("thickness") : DEFAULT_THICKNESS; + + return createWall(AnchorPoint.TOP_LEFT.of(appShape), thickness, appShape.getHeight()); + } + + /** + * Create Right {@link EntityType#WALL}. ` + * + * @param data Spawn data + * @return Left wall + */ + @Spawns("wallRight") + public Entity newWallRight(SpawnData data) { + final var appShape = new Rectangle(FXGL.getAppWidth(), FXGL.getAppHeight()); + final double thickness = + data.hasKey("thickness") ? data.get("thickness") : DEFAULT_THICKNESS; + + return createWall( + AnchorPoint.TOP_RIGHT.of(appShape).subtract(thickness, 0), + thickness, + appShape.getHeight()); } } From e057c299d5bb5b80c045c5671ec88ac7d0acf574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 22 Oct 2025 16:49:56 +0700 Subject: [PATCH 48/53] ci: update version of actions/upload-artifact (cherry picked from commit 56dd2a75a2d96b57fb63b52b4d794f1d765c387e) --- .github/workflows/buildRelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildRelease.yml b/.github/workflows/buildRelease.yml index a452107..5bd6c58 100644 --- a/.github/workflows/buildRelease.yml +++ b/.github/workflows/buildRelease.yml @@ -29,6 +29,6 @@ jobs: ./gradlew clean buildRelease - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: out/*.jar From d8e7579c4da14727cbd80607893db755e295f803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 22 Oct 2025 17:07:33 +0700 Subject: [PATCH 49/53] ci(buildRelease): change update artifact to update release (cherry picked from commit d1d58389900cdc8c8d1d25b572c27d1833aad9ba) --- .github/workflows/buildRelease.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildRelease.yml b/.github/workflows/buildRelease.yml index 5bd6c58..037d0b6 100644 --- a/.github/workflows/buildRelease.yml +++ b/.github/workflows/buildRelease.yml @@ -28,7 +28,9 @@ jobs: chmod +x gradlew ./gradlew clean buildRelease - - name: Upload artifacts - uses: actions/upload-artifact@v4 + - name: Upload to Release assets + uses: softprops/action-gh-release@v2 with: - path: out/*.jar + files: out/*.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 97a94ce5099cee64eade87f34489a79d13b7b7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Wed, 22 Oct 2025 17:55:39 +0700 Subject: [PATCH 50/53] [skip ci] chore: remove `/system/` ignore folder (cherry picked from commit c977f49f860f552226bfe43537042a3637b984c7) --- system/Readme.txt | 1 - system/fxgl.bundle | Bin 204 -> 0 bytes 2 files changed, 1 deletion(-) delete mode 100644 system/Readme.txt delete mode 100644 system/fxgl.bundle diff --git a/system/Readme.txt b/system/Readme.txt deleted file mode 100644 index 6578c70..0000000 --- a/system/Readme.txt +++ /dev/null @@ -1 +0,0 @@ -This directory contains FXGL system data files. \ No newline at end of file diff --git a/system/fxgl.bundle b/system/fxgl.bundle deleted file mode 100644 index a8ad53e505c87b8d3adfd6fd44deaed075b338ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 204 zcmXYrJr06E6oj7$@u%`9@eVf20Vp&Us0mg!mOf#HHOns9eJJrvUcz_+Tkqfht-;|rcOFpqW4Q08b)>|CXi#oBOYxe+ME9Z6`#R;5ZLhgKa2oCw?m2??gr1+VCr zB&5GVo9(a&>QZ6O2_|hRQKkN#j8JJ%74_t}VOYbkKjZa2&)4ku?t&A-P-;v Date: Sun, 26 Oct 2025 00:03:22 +0700 Subject: [PATCH 51/53] chore!: update JDK setup to use Eclipse Temurin 24 - Changed JDK setup in build and release workflows to use Gradle's setup-java action instead of Oracle's. - Updated project configuration to reflect the new JDK vendor in various files. (cherry picked from commit ae14c27b0fd3c9d427ddad0d537acd091687f8e9) --- .github/workflows/build.yml | 8 ++------ .github/workflows/buildRelease.yml | 8 ++------ .github/workflows/spotless.yml | 16 ++++------------ .idea/misc.xml | 2 +- build.gradle | 1 + docs/dev/guide.md | 2 +- settings.gradle | 4 ++++ 7 files changed, 15 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41b3574..7869854 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,12 +16,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Setup JDK - uses: actions/setup-java@v5 - with: - distribution: oracle - java-version: 24 - cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 - name: Build run: | diff --git a/.github/workflows/buildRelease.yml b/.github/workflows/buildRelease.yml index 037d0b6..6040a56 100644 --- a/.github/workflows/buildRelease.yml +++ b/.github/workflows/buildRelease.yml @@ -16,12 +16,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Setup JDK - uses: actions/setup-java@v5 - with: - distribution: oracle - java-version: 24 - cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 - name: Build release run: | diff --git a/.github/workflows/spotless.yml b/.github/workflows/spotless.yml index 41ade9c..734551c 100644 --- a/.github/workflows/spotless.yml +++ b/.github/workflows/spotless.yml @@ -20,12 +20,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Setup JDK - uses: actions/setup-java@v5 - with: - distribution: oracle - java-version: 24 - cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 - name: Run Spotless check run: | @@ -40,12 +36,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Setup JDK - uses: actions/setup-java@v5 - with: - distribution: oracle - java-version: 24 - cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v5 - name: Run Spotless apply run: | diff --git a/.idea/misc.xml b/.idea/misc.xml index 3b7dc99..4901ee9 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/build.gradle b/build.gradle index ab6afa5..5de01a5 100644 --- a/build.gradle +++ b/build.gradle @@ -89,5 +89,6 @@ tasks.withType(JavaExec).configureEach { java { toolchain { languageVersion = JavaLanguageVersion.of(24) + vendor.set(JvmVendorSpec.ADOPTIUM) } } diff --git a/docs/dev/guide.md b/docs/dev/guide.md index 2f049a0..a08b227 100644 --- a/docs/dev/guide.md +++ b/docs/dev/guide.md @@ -2,7 +2,7 @@ ## 📋 Yêu cầu -* **[Oracle OpenJDK 24](https://openjdk.org/projects/jdk/24/)** (Language level: 24 Preview) +* **[Eclipse Temurin 24](https://adoptium.net/temurin/releases?version=24)** * **[Gradle](https://gradle.org/)** ## 🚀 Setup diff --git a/settings.gradle b/settings.gradle index d1d3ea0..27395d5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,5 @@ +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" +} + rootProject.name = 'Bounceverse' From 240827aa51a7258e1785043b2e586b05fde028f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Sun, 26 Oct 2025 16:50:16 +0700 Subject: [PATCH 52/53] docs: add Javadoc writing guide and update guide.md Introduce a new document for writing Javadoc, detailing format and structure. Update guide.md to include a reference to the new Javadoc guide. (cherry picked from commit 18854f8e83d7cc5264220bc499f9853d868043ab) --- docs/dev/guide.md | 3 +++ docs/dev/javadoc.md | 60 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 docs/dev/javadoc.md diff --git a/docs/dev/guide.md b/docs/dev/guide.md index a08b227..5eb6434 100644 --- a/docs/dev/guide.md +++ b/docs/dev/guide.md @@ -48,3 +48,6 @@ Chi tiết: [Spotless Gradle Plugin](https://github.com/diffplug/spotless/tree/m * **Commits:** [Conventional Commits](https://www.conventionalcommits.org/) (và viết message bằng **Tiếng Anh**) * **Files Structure:** [Gradle project Structure](https://docs.gradle.org/current/userguide/organizing_gradle_projects.html) + +Ngoài ra: +* [Hướng dẫn viết javadoc](javadoc.md) diff --git a/docs/dev/javadoc.md b/docs/dev/javadoc.md new file mode 100644 index 0000000..a100edf --- /dev/null +++ b/docs/dev/javadoc.md @@ -0,0 +1,60 @@ +# 📄 Viết Javadoc + +### 💾 Format + +Javadoc được viết tuân theo các quy tắc javadoc cơ bản và viết trên format HTML. + +### 🏗️ Cấu trúc + +Trên IDE, khi bạn di chuyển lên trên đầu lớp/method và viết `/**` rồi Enter, IDE sẽ tự sinh ra cho bạn khung để bạn viết +javadoc. Cấu trúc của dự án chúng ta sẽ là: + +- Đối với Lớp: + +```java +/** + * + * + *

?{@link Tên Lớp}

+ * + * Mô tả lớp... Có thể sử dụng {@link Class nào đó#TP trong class} để liên kết
+ * Chú ý: Sử dụng thẻ br để xuống dòng
+ * Plot Twist: tui cũng ko bt viết gì ở đây nữa + * + * @see ... + */ + +``` + +trong đó `?` ở Tên lớp sẽ là: + +| Loại lớp | Kí hiệu | +|---------------|---------| +| 📚 Class | | +| 📱Interface | % | +| 🔢 Enum | # | +| ❗ Exception | ! | +| 📍 Annotation | @ | +| 📝 Record | $ | + +**VD:** `ThisIsClass`, `%Interface`, `!StackoverflowException`, `#EntityType` + +- Đối với method: + +```java +/** + * Hàm này thực hiện chức năng gì... . + * + * @params Input1 Đầu vào 1 + * @params Input2 Đầu vào 2 + * @return Kết quả của hàm + * @throws Exception nếu có lỗi xảy ra... + */ + +``` + +### ❗Chú ý + +- Formating docs sau khi viết code xong. (Phím tắt thường là `Alt` + `Shift` + `F`) + +### Bạn có thể xem source code trong dự án để xem ví dụ. \ No newline at end of file From d44bfa848affc2fe64cc05ab05544662cdf516b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mai=20Th=C3=A0nh?= <62001770+thnhmai06@users.noreply.github.com> Date: Sun, 26 Oct 2025 16:58:44 +0700 Subject: [PATCH 53/53] [skip ci] docs: update Javadoc class symbols table for clarity Revised the symbols table in the Javadoc documentation to improve readability and organization of class type representations. (cherry picked from commit f3844b8ef99f58efe21e5337bd78c7011fdc426d) --- docs/dev/javadoc.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/dev/javadoc.md b/docs/dev/javadoc.md index a100edf..cdaaeac 100644 --- a/docs/dev/javadoc.md +++ b/docs/dev/javadoc.md @@ -28,14 +28,9 @@ javadoc. Cấu trúc của dự án chúng ta sẽ là: trong đó `?` ở Tên lớp sẽ là: -| Loại lớp | Kí hiệu | -|---------------|---------| -| 📚 Class | | -| 📱Interface | % | -| 🔢 Enum | # | -| ❗ Exception | ! | -| 📍 Annotation | @ | -| 📝 Record | $ | +| Loại lớp | 📚 Class | 📱Interface | 🔢 Enum | ❗ Exception | 📍 Annotation | 📝 Record | +|----------|----------|-------------|---------|-------------|---------------|-----------| +| Kí hiệu | | % | # | ! | @ | $ | **VD:** `ThisIsClass`, `%Interface`, `!StackoverflowException`, `#EntityType`