diff --git a/Readme.md b/Readme.md
index a008f31..87ee81a 100644
--- a/Readme.md
+++ b/Readme.md
@@ -18,11 +18,13 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
## Todo
## Next release
+
+## 29061490
-- Graphics : option to make coins more readable (on by default)
- Graphics : option to add more light (on by default)
-- Graphics : background effects are not computed on a much smaller resolution, and then stretched out to the full res
-- Graphics : all levels background have been checked (4 buggy ones removed) and will be asigned randomly
+- Graphics : option to make coins more readable (on by default)
+- Graphics : background light effects optimization
+- Graphics : all levels background have been checked (4 buggy ones removed) and will be assigned randomly
- Fixed : display gained combo was showing +0 sometimes
## 29060272
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 625b750..3ecc3af 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -29,8 +29,8 @@ android {
applicationId = "me.lecaro.breakout"
minSdk = 21
targetSdk = 34
- versionCode = 29061490
- versionName = "29061490"
+ versionCode = 29061801
+ versionName = "29061801"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html
index f9217d0..22c5f74 100644
--- a/app/src/main/assets/index.html
+++ b/app/src/main/assets/index.html
@@ -1 +1 @@
-
Breakout 71
\ No newline at end of file
+Breakout 71
\ No newline at end of file
diff --git a/dist/index.html b/dist/index.html
index 410889b..4c88acd 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -1482,7 +1482,7 @@ const upgrades = (0, _upgrades.rawUpgrades).map((u)=>({
}));
},{"./data/palette.json":"ktRBU","./data/levels.json":"8JSUc","./data/version.json":"iyP6E","./upgrades":"1u3Dx","./getLevelBackground":"7OIPf","./levelIcon":"6rQoT","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"iyP6E":[function(require,module,exports,__globalThis) {
-module.exports = JSON.parse("\"29061490\"");
+module.exports = JSON.parse("\"29061801\"");
},{}],"1u3Dx":[function(require,module,exports,__globalThis) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
@@ -3484,7 +3484,7 @@ frames = 1) {
else if (gameState.levelTime > r.time) {
setBrick(gameState, r.index, r.color);
destroy(gameState.respawns, ri);
- } else if (!(0, _options.isOptionOn)("basic")) {
+ } else {
const { index, color } = r;
const vertical = Math.random() > 0.5;
const dx = Math.random() > 0.5 ? 1 : -1;
@@ -3839,40 +3839,40 @@ function render(gameState) {
// Clear
if (!(0, _options.isOptionOn)("basic") && level.svg && level.color === "#000000") {
haloCanvasCtx.globalCompositeOperation = "source-over";
- haloCanvasCtx.globalAlpha = 0.8;
+ haloCanvasCtx.globalAlpha = 0.9;
haloCanvasCtx.fillStyle = level.color;
haloCanvasCtx.fillRect(0, 0, width / haloScale, height / haloScale);
haloCanvasCtx.globalCompositeOperation = "screen";
haloCanvasCtx.globalAlpha = 0.6;
(0, _gameStateMutators.forEachLiveOne)(gameState.coins, (coin)=>{
haloCanvasCtx.globalAlpha = 0.9;
- drawFuzzyBall(haloCanvasCtx, coin.color, gameState.coinSize * 1.5 / haloScale, coin.x / haloScale, coin.y / haloScale);
+ drawFuzzyBall(haloCanvasCtx, coin.color, gameState.coinSize * 2 / haloScale, coin.x / haloScale, coin.y / haloScale);
if ((0, _options.isOptionOn)("extra_bright")) {
- haloCanvasCtx.globalAlpha = 0.4;
- drawFuzzyBall(haloCanvasCtx, coin.color, gameState.coinSize * 6 / haloScale, coin.x / haloScale, coin.y / haloScale);
+ haloCanvasCtx.globalAlpha = 0.5;
+ drawFuzzyBall(haloCanvasCtx, coin.color, gameState.coinSize * 10 / haloScale, coin.x / haloScale, coin.y / haloScale);
}
});
gameState.balls.forEach((ball)=>{
- drawFuzzyBall(haloCanvasCtx, gameState.ballsColor, gameState.ballSize / haloScale, ball.x / haloScale, ball.y / haloScale);
- if ((0, _options.isOptionOn)("extra_bright")) drawFuzzyBall(haloCanvasCtx, gameState.ballsColor, gameState.ballSize * 4 / haloScale, ball.x / haloScale, ball.y / haloScale);
+ drawFuzzyBall(haloCanvasCtx, gameState.ballsColor, gameState.ballSize * 3 / haloScale, ball.x / haloScale, ball.y / haloScale);
+ if ((0, _options.isOptionOn)("extra_bright")) drawFuzzyBall(haloCanvasCtx, gameState.ballsColor, gameState.ballSize * 6 / haloScale, ball.x / haloScale, ball.y / haloScale);
});
- haloCanvasCtx.globalAlpha = 0.6;
+ haloCanvasCtx.globalAlpha = (0, _options.isOptionOn)("extra_bright") ? 0.2 : 0.05;
gameState.bricks.forEach((color, index)=>{
if (!color) return;
const x = (0, _gameUtils.brickCenterX)(gameState, index), y = (0, _gameUtils.brickCenterY)(gameState, index);
- drawFuzzyBall(haloCanvasCtx, color == "black" ? "#666" : color, gameState.brickWidth * ((0, _options.isOptionOn)("extra_bright") ? 2 : 1) / haloScale, x / haloScale, y / haloScale);
+ drawFuzzyBall(haloCanvasCtx, color == "black" ? "#666" : color, gameState.brickWidth * 2 / haloScale, x / haloScale, y / haloScale);
});
(0, _gameStateMutators.forEachLiveOne)(gameState.particles, (flash)=>{
const { x, y, time, color, size, duration } = flash;
const elapsed = gameState.levelTime - time;
haloCanvasCtx.globalAlpha = Math.min(1, 2 - elapsed / duration * 2);
- drawFuzzyBall(haloCanvasCtx, color, size / haloScale, x / haloScale, y / haloScale);
- if ((0, _options.isOptionOn)("extra_bright")) drawFuzzyBall(haloCanvasCtx, color, size * 4 / haloScale, x / haloScale, y / haloScale);
+ drawFuzzyBall(haloCanvasCtx, color, size * 3 / haloScale, x / haloScale, y / haloScale);
+ if ((0, _options.isOptionOn)("extra_bright")) drawFuzzyBall(haloCanvasCtx, color, size * 6 / haloScale, x / haloScale, y / haloScale);
});
ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "source-over";
ctx.drawImage(haloCanvas, 0, 0, width, height);
- ctx.globalAlpha = 0.9;
+ ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "multiply";
if (level.svg && background.width && background.complete) {
if (backgroundCanvas.title !== level.name) {
@@ -3930,12 +3930,6 @@ function render(gameState) {
const amplitude = (gameState.perks.bigger_explosions + 1) * 50 / lastExplosionDelay;
ctx.translate(Math.sin(Date.now()) * amplitude, Math.sin(Date.now() + 36) * amplitude);
}
- // if (gameState.perks.bigger_explosions && !isOptionOn("basic") && shaked) {
- // gameCanvas.style.filter =
- // "brightness(" + (1 + 100 / (1 + lastExplosionDelay)) + ")";
- // } else {
- // gameCanvas.style.filter = "";
- // }
// Coins
ctx.globalAlpha = 1;
(0, _gameStateMutators.forEachLiveOne)(gameState.coins, (coin)=>{
diff --git a/src/PWA/sw-b71.js b/src/PWA/sw-b71.js
index df132ed..26dd15c 100644
--- a/src/PWA/sw-b71.js
+++ b/src/PWA/sw-b71.js
@@ -1,5 +1,5 @@
// The version of the cache.
-const VERSION = "29061490";
+const VERSION = "29061801";
// The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`;
diff --git a/src/data/version.json b/src/data/version.json
index cc84ed7..102cd79 100644
--- a/src/data/version.json
+++ b/src/data/version.json
@@ -1 +1 @@
-"29061490"
+"29061801"
diff --git a/src/gameStateMutators.ts b/src/gameStateMutators.ts
index 6358c8d..befd75e 100644
--- a/src/gameStateMutators.ts
+++ b/src/gameStateMutators.ts
@@ -1370,7 +1370,7 @@ export function gameStateTick(
} else if (gameState.levelTime > r.time) {
setBrick(gameState, r.index, r.color);
destroy(gameState.respawns, ri);
- } else if (!isOptionOn("basic")) {
+ } else {
const { index, color } = r;
const vertical = Math.random() > 0.5;
const dx = Math.random() > 0.5 ? 1 : -1;
diff --git a/src/render.ts b/src/render.ts
index 05c9339..78aa4b0 100644
--- a/src/render.ts
+++ b/src/render.ts
@@ -102,7 +102,7 @@ export function render(gameState: GameState) {
// Clear
if (!isOptionOn("basic") && level.svg && level.color === "#000000") {
haloCanvasCtx.globalCompositeOperation = "source-over";
- haloCanvasCtx.globalAlpha = 0.8;
+ haloCanvasCtx.globalAlpha = 0.9;
haloCanvasCtx.fillStyle = level.color;
haloCanvasCtx.fillRect(0, 0, width / haloScale, height / haloScale);
@@ -114,17 +114,17 @@ export function render(gameState: GameState) {
drawFuzzyBall(
haloCanvasCtx,
coin.color,
- (gameState.coinSize * 1.5) / haloScale,
+ (gameState.coinSize * 2) / haloScale,
coin.x / haloScale,
coin.y / haloScale,
);
if (isOptionOn("extra_bright")) {
- haloCanvasCtx.globalAlpha = 0.4;
+ haloCanvasCtx.globalAlpha = 0.5;
drawFuzzyBall(
haloCanvasCtx,
coin.color,
- (gameState.coinSize * 6) / haloScale,
+ (gameState.coinSize * 10) / haloScale,
coin.x / haloScale,
coin.y / haloScale,
);
@@ -134,7 +134,7 @@ export function render(gameState: GameState) {
drawFuzzyBall(
haloCanvasCtx,
gameState.ballsColor,
- gameState.ballSize / haloScale,
+ (gameState.ballSize * 3) / haloScale,
ball.x / haloScale,
ball.y / haloScale,
);
@@ -142,12 +142,12 @@ export function render(gameState: GameState) {
drawFuzzyBall(
haloCanvasCtx,
gameState.ballsColor,
- (gameState.ballSize * 4) / haloScale,
+ (gameState.ballSize * 6) / haloScale,
ball.x / haloScale,
ball.y / haloScale,
);
});
- haloCanvasCtx.globalAlpha = 0.6;
+ haloCanvasCtx.globalAlpha = isOptionOn("extra_bright") ? 0.2 : 0.05;
gameState.bricks.forEach((color, index) => {
if (!color) return;
const x = brickCenterX(gameState, index),
@@ -155,8 +155,7 @@ export function render(gameState: GameState) {
drawFuzzyBall(
haloCanvasCtx,
color == "black" ? "#666" : color,
- (gameState.brickWidth * (isOptionOn("extra_bright") ? 2 : 1)) /
- haloScale,
+ (gameState.brickWidth * 2) / haloScale,
x / haloScale,
y / haloScale,
);
@@ -169,7 +168,7 @@ export function render(gameState: GameState) {
drawFuzzyBall(
haloCanvasCtx,
color,
- size / haloScale,
+ (size * 3) / haloScale,
x / haloScale,
y / haloScale,
);
@@ -177,7 +176,7 @@ export function render(gameState: GameState) {
drawFuzzyBall(
haloCanvasCtx,
color,
- (size * 4) / haloScale,
+ (size * 6) / haloScale,
x / haloScale,
y / haloScale,
);
@@ -187,7 +186,7 @@ export function render(gameState: GameState) {
ctx.globalCompositeOperation = "source-over";
ctx.drawImage(haloCanvas, 0, 0, width, height);
- ctx.globalAlpha = 0.9;
+ ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "multiply";
if (level.svg && background.width && background.complete) {
if (backgroundCanvas.title !== level.name) {
@@ -262,12 +261,7 @@ export function render(gameState: GameState) {
Math.sin(Date.now() + 36) * amplitude,
);
}
- // if (gameState.perks.bigger_explosions && !isOptionOn("basic") && shaked) {
- // gameCanvas.style.filter =
- // "brightness(" + (1 + 100 / (1 + lastExplosionDelay)) + ")";
- // } else {
- // gameCanvas.style.filter = "";
- // }
+
// Coins
ctx.globalAlpha = 1;
forEachLiveOne(gameState.coins, (coin) => {