Build 29061801

This commit is contained in:
Renan LE CARO 2025-04-03 21:22:13 +02:00
parent 00094d5efa
commit 99db15d776
8 changed files with 36 additions and 46 deletions

View file

@ -19,10 +19,12 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
## Next release ## Next release
- Graphics : option to make coins more readable (on by default) ## 29061490
- Graphics : option to add more light (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 : option to make coins more readable (on by default)
- Graphics : all levels background have been checked (4 buggy ones removed) and will be asigned randomly - 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 - Fixed : display gained combo was showing +0 sometimes
## 29060272 ## 29060272

View file

@ -29,8 +29,8 @@ android {
applicationId = "me.lecaro.breakout" applicationId = "me.lecaro.breakout"
minSdk = 21 minSdk = 21
targetSdk = 34 targetSdk = 34
versionCode = 29061490 versionCode = 29061801
versionName = "29061490" versionName = "29061801"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { vectorDrawables {
useSupportLibrary = true useSupportLibrary = true

File diff suppressed because one or more lines are too long

32
dist/index.html vendored
View file

@ -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) { },{"./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) { },{}],"1u3Dx":[function(require,module,exports,__globalThis) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
@ -3484,7 +3484,7 @@ frames = 1) {
else if (gameState.levelTime > r.time) { else if (gameState.levelTime > r.time) {
setBrick(gameState, r.index, r.color); setBrick(gameState, r.index, r.color);
destroy(gameState.respawns, ri); destroy(gameState.respawns, ri);
} else if (!(0, _options.isOptionOn)("basic")) { } else {
const { index, color } = r; const { index, color } = r;
const vertical = Math.random() > 0.5; const vertical = Math.random() > 0.5;
const dx = Math.random() > 0.5 ? 1 : -1; const dx = Math.random() > 0.5 ? 1 : -1;
@ -3839,40 +3839,40 @@ function render(gameState) {
// Clear // Clear
if (!(0, _options.isOptionOn)("basic") && level.svg && level.color === "#000000") { if (!(0, _options.isOptionOn)("basic") && level.svg && level.color === "#000000") {
haloCanvasCtx.globalCompositeOperation = "source-over"; haloCanvasCtx.globalCompositeOperation = "source-over";
haloCanvasCtx.globalAlpha = 0.8; haloCanvasCtx.globalAlpha = 0.9;
haloCanvasCtx.fillStyle = level.color; haloCanvasCtx.fillStyle = level.color;
haloCanvasCtx.fillRect(0, 0, width / haloScale, height / haloScale); haloCanvasCtx.fillRect(0, 0, width / haloScale, height / haloScale);
haloCanvasCtx.globalCompositeOperation = "screen"; haloCanvasCtx.globalCompositeOperation = "screen";
haloCanvasCtx.globalAlpha = 0.6; haloCanvasCtx.globalAlpha = 0.6;
(0, _gameStateMutators.forEachLiveOne)(gameState.coins, (coin)=>{ (0, _gameStateMutators.forEachLiveOne)(gameState.coins, (coin)=>{
haloCanvasCtx.globalAlpha = 0.9; 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")) { if ((0, _options.isOptionOn)("extra_bright")) {
haloCanvasCtx.globalAlpha = 0.4; haloCanvasCtx.globalAlpha = 0.5;
drawFuzzyBall(haloCanvasCtx, coin.color, gameState.coinSize * 6 / haloScale, coin.x / haloScale, coin.y / haloScale); drawFuzzyBall(haloCanvasCtx, coin.color, gameState.coinSize * 10 / haloScale, coin.x / haloScale, coin.y / haloScale);
} }
}); });
gameState.balls.forEach((ball)=>{ gameState.balls.forEach((ball)=>{
drawFuzzyBall(haloCanvasCtx, gameState.ballsColor, gameState.ballSize / 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 * 4 / 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)=>{ gameState.bricks.forEach((color, index)=>{
if (!color) return; if (!color) return;
const x = (0, _gameUtils.brickCenterX)(gameState, index), y = (0, _gameUtils.brickCenterY)(gameState, index); 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)=>{ (0, _gameStateMutators.forEachLiveOne)(gameState.particles, (flash)=>{
const { x, y, time, color, size, duration } = flash; const { x, y, time, color, size, duration } = flash;
const elapsed = gameState.levelTime - time; const elapsed = gameState.levelTime - time;
haloCanvasCtx.globalAlpha = Math.min(1, 2 - elapsed / duration * 2); haloCanvasCtx.globalAlpha = Math.min(1, 2 - elapsed / duration * 2);
drawFuzzyBall(haloCanvasCtx, color, size / 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 * 4 / 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.globalAlpha = 1;
ctx.globalCompositeOperation = "source-over"; ctx.globalCompositeOperation = "source-over";
ctx.drawImage(haloCanvas, 0, 0, width, height); ctx.drawImage(haloCanvas, 0, 0, width, height);
ctx.globalAlpha = 0.9; ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "multiply"; ctx.globalCompositeOperation = "multiply";
if (level.svg && background.width && background.complete) { if (level.svg && background.width && background.complete) {
if (backgroundCanvas.title !== level.name) { if (backgroundCanvas.title !== level.name) {
@ -3930,12 +3930,6 @@ function render(gameState) {
const amplitude = (gameState.perks.bigger_explosions + 1) * 50 / lastExplosionDelay; const amplitude = (gameState.perks.bigger_explosions + 1) * 50 / lastExplosionDelay;
ctx.translate(Math.sin(Date.now()) * amplitude, Math.sin(Date.now() + 36) * amplitude); 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 // Coins
ctx.globalAlpha = 1; ctx.globalAlpha = 1;
(0, _gameStateMutators.forEachLiveOne)(gameState.coins, (coin)=>{ (0, _gameStateMutators.forEachLiveOne)(gameState.coins, (coin)=>{

View file

@ -1,5 +1,5 @@
// The version of the cache. // The version of the cache.
const VERSION = "29061490"; const VERSION = "29061801";
// The name of the cache // The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`; const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -1 +1 @@
"29061490" "29061801"

View file

@ -1370,7 +1370,7 @@ export function gameStateTick(
} else if (gameState.levelTime > r.time) { } else if (gameState.levelTime > r.time) {
setBrick(gameState, r.index, r.color); setBrick(gameState, r.index, r.color);
destroy(gameState.respawns, ri); destroy(gameState.respawns, ri);
} else if (!isOptionOn("basic")) { } else {
const { index, color } = r; const { index, color } = r;
const vertical = Math.random() > 0.5; const vertical = Math.random() > 0.5;
const dx = Math.random() > 0.5 ? 1 : -1; const dx = Math.random() > 0.5 ? 1 : -1;

View file

@ -102,7 +102,7 @@ export function render(gameState: GameState) {
// Clear // Clear
if (!isOptionOn("basic") && level.svg && level.color === "#000000") { if (!isOptionOn("basic") && level.svg && level.color === "#000000") {
haloCanvasCtx.globalCompositeOperation = "source-over"; haloCanvasCtx.globalCompositeOperation = "source-over";
haloCanvasCtx.globalAlpha = 0.8; haloCanvasCtx.globalAlpha = 0.9;
haloCanvasCtx.fillStyle = level.color; haloCanvasCtx.fillStyle = level.color;
haloCanvasCtx.fillRect(0, 0, width / haloScale, height / haloScale); haloCanvasCtx.fillRect(0, 0, width / haloScale, height / haloScale);
@ -114,17 +114,17 @@ export function render(gameState: GameState) {
drawFuzzyBall( drawFuzzyBall(
haloCanvasCtx, haloCanvasCtx,
coin.color, coin.color,
(gameState.coinSize * 1.5) / haloScale, (gameState.coinSize * 2) / haloScale,
coin.x / haloScale, coin.x / haloScale,
coin.y / haloScale, coin.y / haloScale,
); );
if (isOptionOn("extra_bright")) { if (isOptionOn("extra_bright")) {
haloCanvasCtx.globalAlpha = 0.4; haloCanvasCtx.globalAlpha = 0.5;
drawFuzzyBall( drawFuzzyBall(
haloCanvasCtx, haloCanvasCtx,
coin.color, coin.color,
(gameState.coinSize * 6) / haloScale, (gameState.coinSize * 10) / haloScale,
coin.x / haloScale, coin.x / haloScale,
coin.y / haloScale, coin.y / haloScale,
); );
@ -134,7 +134,7 @@ export function render(gameState: GameState) {
drawFuzzyBall( drawFuzzyBall(
haloCanvasCtx, haloCanvasCtx,
gameState.ballsColor, gameState.ballsColor,
gameState.ballSize / haloScale, (gameState.ballSize * 3) / haloScale,
ball.x / haloScale, ball.x / haloScale,
ball.y / haloScale, ball.y / haloScale,
); );
@ -142,12 +142,12 @@ export function render(gameState: GameState) {
drawFuzzyBall( drawFuzzyBall(
haloCanvasCtx, haloCanvasCtx,
gameState.ballsColor, gameState.ballsColor,
(gameState.ballSize * 4) / haloScale, (gameState.ballSize * 6) / haloScale,
ball.x / haloScale, ball.x / haloScale,
ball.y / haloScale, ball.y / haloScale,
); );
}); });
haloCanvasCtx.globalAlpha = 0.6; haloCanvasCtx.globalAlpha = isOptionOn("extra_bright") ? 0.2 : 0.05;
gameState.bricks.forEach((color, index) => { gameState.bricks.forEach((color, index) => {
if (!color) return; if (!color) return;
const x = brickCenterX(gameState, index), const x = brickCenterX(gameState, index),
@ -155,8 +155,7 @@ export function render(gameState: GameState) {
drawFuzzyBall( drawFuzzyBall(
haloCanvasCtx, haloCanvasCtx,
color == "black" ? "#666" : color, color == "black" ? "#666" : color,
(gameState.brickWidth * (isOptionOn("extra_bright") ? 2 : 1)) / (gameState.brickWidth * 2) / haloScale,
haloScale,
x / haloScale, x / haloScale,
y / haloScale, y / haloScale,
); );
@ -169,7 +168,7 @@ export function render(gameState: GameState) {
drawFuzzyBall( drawFuzzyBall(
haloCanvasCtx, haloCanvasCtx,
color, color,
size / haloScale, (size * 3) / haloScale,
x / haloScale, x / haloScale,
y / haloScale, y / haloScale,
); );
@ -177,7 +176,7 @@ export function render(gameState: GameState) {
drawFuzzyBall( drawFuzzyBall(
haloCanvasCtx, haloCanvasCtx,
color, color,
(size * 4) / haloScale, (size * 6) / haloScale,
x / haloScale, x / haloScale,
y / haloScale, y / haloScale,
); );
@ -187,7 +186,7 @@ export function render(gameState: GameState) {
ctx.globalCompositeOperation = "source-over"; ctx.globalCompositeOperation = "source-over";
ctx.drawImage(haloCanvas, 0, 0, width, height); ctx.drawImage(haloCanvas, 0, 0, width, height);
ctx.globalAlpha = 0.9; ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "multiply"; ctx.globalCompositeOperation = "multiply";
if (level.svg && background.width && background.complete) { if (level.svg && background.width && background.complete) {
if (backgroundCanvas.title !== level.name) { if (backgroundCanvas.title !== level.name) {
@ -262,12 +261,7 @@ export function render(gameState: GameState) {
Math.sin(Date.now() + 36) * 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 // Coins
ctx.globalAlpha = 1; ctx.globalAlpha = 1;
forEachLiveOne(gameState.coins, (coin) => { forEachLiveOne(gameState.coins, (coin) => {