Build 29062687

This commit is contained in:
Renan LE CARO 2025-04-04 12:07:51 +02:00
parent f76c96019c
commit 85ece0b975
21 changed files with 74 additions and 68 deletions

View file

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

File diff suppressed because one or more lines are too long

26
dist/index.html vendored
View file

@ -1278,7 +1278,7 @@ async function openSettingsMenu() {
...actions
],
allowClose: true,
className: 'settings'
className: "settings"
});
if (cb) {
cb();
@ -1354,7 +1354,7 @@ async function openUnlocksList() {
...levelActions
],
allowClose: true,
className: 'actionsAsGrid'
className: "actionsAsGrid"
});
if (tryOn) {
if (await confirmRestart(gameState)) restart({
@ -1494,7 +1494,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("\"29062545\"");
module.exports = JSON.parse("\"29062687\"");
},{}],"1u3Dx":[function(require,module,exports,__globalThis) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
@ -3149,7 +3149,7 @@ function addToScore(gameState, coin) {
gameState.highScore = gameState.score;
localStorage.setItem("breakout-3-hs-" + gameState.mode, gameState.score.toString());
}
if (!(0, _options.isOptionOn)("basic")) makeParticle(gameState, coin.previousX, coin.previousY, (gameState.canvasWidth - coin.x) / 100, -coin.y / 100, gameState.perks.metamorphosis || (0, _options.isOptionOn)("colorful_coins") ? coin.color : 'gold', true, gameState.coinSize / 2, 100 + Math.random() * 50);
if (!(0, _options.isOptionOn)("basic")) makeParticle(gameState, coin.previousX, coin.previousY, (gameState.canvasWidth - coin.x) / 100, -coin.y / 100, gameState.perks.metamorphosis || (0, _options.isOptionOn)("colorful_coins") ? coin.color : "gold", true, gameState.coinSize / 2, 100 + Math.random() * 50);
schedulGameSound(gameState, "coinCatch", coin.x, 1);
gameState.runStatistics.score += coin.points;
if (gameState.perks.asceticism) decreaseCombo(gameState, gameState.perks.asceticism * 3 * coin.points, coin.x, coin.y);
@ -3423,7 +3423,7 @@ frames = 1) {
if (!gameState.perks.etherealcoins) {
const flip = gameState.perks.helium > 0 && Math.abs(coin.x - gameState.puckPosition) * 2 > gameState.puckWidth + coin.size;
coin.vy += frames * coin.weight * 0.8 * (flip ? -gameState.perks.helium : 1);
if (flip && !(0, _options.isOptionOn)("basic") && Math.random() < 0.1) makeParticle(gameState, coin.x, coin.y, 0, gameState.baseSpeed, gameState.perks.metamorphosis || (0, _options.isOptionOn)("colorful_coins") ? coin.color : 'gold', true, 5, 250);
if (flip && !(0, _options.isOptionOn)("basic") && Math.random() < 0.1) makeParticle(gameState, coin.x, coin.y, 0, gameState.baseSpeed, gameState.perks.metamorphosis || (0, _options.isOptionOn)("colorful_coins") ? coin.color : "gold", true, 5, 250);
}
const speed = (Math.abs(coin.vx) + Math.abs(coin.vy)) * 10;
const hitBorder = bordersHitCheck(gameState, coin, coin.size / 2, frames);
@ -3876,7 +3876,7 @@ function render(gameState) {
haloCanvasCtx.fillRect(0, 0, width / haloScale, height / haloScale);
haloCanvasCtx.globalCompositeOperation = "screen";
(0, _gameStateMutators.forEachLiveOne)(gameState.coins, (coin)=>{
const color = gameState.perks.metamorphosis || (0, _options.isOptionOn)("colorful_coins") ? coin.color : 'gold';
const color = gameState.perks.metamorphosis || (0, _options.isOptionOn)("colorful_coins") ? coin.color : "gold";
haloCanvasCtx.globalAlpha = 0.5;
drawFuzzyBall(haloCanvasCtx, color, gameState.coinSize * 2 / haloScale, coin.x / haloScale, coin.y / haloScale);
if ((0, _options.isOptionOn)("extra_bright")) {
@ -3972,7 +3972,7 @@ function render(gameState) {
// Coins
ctx.globalAlpha = 1;
(0, _gameStateMutators.forEachLiveOne)(gameState.coins, (coin)=>{
const color = gameState.perks.metamorphosis || (0, _options.isOptionOn)("colorful_coins") ? coin.color : 'gold';
const color = gameState.perks.metamorphosis || (0, _options.isOptionOn)("colorful_coins") ? coin.color : "gold";
// ctx.globalCompositeOperation = "source-over";
ctx.globalCompositeOperation = color === "gold" || level.color !== "#000000" || (0, _options.isOptionOn)("opaque_coins") ? "source-over" : "screen";
drawCoin(ctx, color, coin.size, coin.x, coin.y, hasCombo && gameState.perks.asceticism && "red" || color === "gold" && "gold" || (0, _options.isOptionOn)("opaque_coins") ? gameState.puckColor : color, coin.a);
@ -4075,15 +4075,15 @@ function render(gameState) {
if (!(0, _options.isOptionOn)("basic") && (0, _options.isOptionOn)("contrast") && level.svg && level.color === "#000000") {
// haloCanvasCtx.globalCompositeOperation = 'multiply';
// haloCanvasCtx.fillRect(0,0,haloCanvas.width,haloCanvas.height)
haloCanvasCtx.fillStyle = 'white';
haloCanvasCtx.fillStyle = "white";
haloCanvasCtx.globalAlpha = 0.25;
haloCanvasCtx.globalCompositeOperation = 'screen';
haloCanvasCtx.globalCompositeOperation = "screen";
haloCanvasCtx.fillRect(0, 0, haloCanvas.width, haloCanvas.height);
ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "soft-light";
ctx.drawImage(haloCanvas, 0, 0, width, height);
}
ctx.globalCompositeOperation = 'source-over';
ctx.globalCompositeOperation = "source-over";
ctx.globalAlpha = 1;
if ((0, _options.isOptionOn)("mobile-mode") && !gameState.running) drawText(ctx, (0, _i18N.t)("play.mobile_press_to_play"), gameState.puckColor, gameState.puckHeight, gameState.canvasWidth / 2, gameState.gameZoneHeight + (gameState.canvasHeight - gameState.gameZoneHeight) / 2);
if (shaked) ctx.resetTransform();
@ -4685,7 +4685,7 @@ function requiredAsyncAlert(p) {
allowClose: false
});
}
async function asyncAlert({ title, content = [], allowClose = true, className = '' }) {
async function asyncAlert({ title, content = [], allowClose = true, className = "" }) {
updateAlertsOpen(1);
return new Promise((resolve)=>{
popupWrap.className = className;
@ -4940,7 +4940,7 @@ async function openCreativeModePerksPicker(gameState, currentLevel) {
title: (0, _i18N.t)("lab.title", {
lvl: currentLevel + 1
}),
className: 'actionsAsGrid',
className: "actionsAsGrid",
content: [
(0, _i18N.t)("lab.instructions"),
{
@ -5111,7 +5111,7 @@ async function openStartingPerksEditor() {
});
const perk = await (0, _asyncAlert.asyncAlert)({
title: (0, _i18N.t)("main_menu.starting_perks"),
className: 'actionsAsGrid',
className: "actionsAsGrid",
content: [
(0, _i18N.t)("main_menu.starting_perks_checked"),
...buttons.filter((b)=>b.checked),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 980 KiB

After

Width:  |  Height:  |  Size: 979 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 KiB

After

Width:  |  Height:  |  Size: 843 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 KiB

After

Width:  |  Height:  |  Size: 351 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 KiB

After

Width:  |  Height:  |  Size: 641 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 KiB

After

Width:  |  Height:  |  Size: 334 KiB

Before After
Before After

View file

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

View file

@ -37,7 +37,7 @@ export async function asyncAlert<t>({
title,
content = [],
allowClose = true,
className = '',
className = "",
}: {
title?: string;
content: (string | AsyncAlertAction<t>)[];

View file

@ -53,7 +53,7 @@ export async function openCreativeModePerksPicker(
while (
(choice = await requiredAsyncAlert<Upgrade | Level | "reset">({
title: t("lab.title", { lvl: currentLevel + 1 }),
className:'actionsAsGrid',
className: "actionsAsGrid",
content: [
t("lab.instructions"),
{

View file

@ -1 +1 @@
"29062545"
"29062687"

View file

@ -1,5 +1,6 @@
* {
font-family: Courier New,
font-family:
Courier New,
Courier,
Lucida Sans Typewriter,
Lucida Typewriter,
@ -248,7 +249,6 @@ body:not(.has-alert-open) #popup {
}
@media (min-width: 1400px) {
&.settings {
&:before {
opacity: 0;
@ -256,12 +256,10 @@ body:not(.has-alert-open) #popup {
& > div {
margin-right: 0;
max-width: 400px
max-width: 400px;
}
}
}
}
/*Unlocks progress bar*/

View file

@ -798,7 +798,7 @@ async function openSettingsMenu() {
title: t("main_menu.settings_title"),
content: [t("main_menu.settings_help"), ...actions],
allowClose: true,
className:'settings',
className: "settings",
});
if (cb) {
cb();
@ -875,7 +875,8 @@ async function openUnlocksList() {
t("unlocks.level"),
...levelActions,
],
allowClose: true,className:'actionsAsGrid',
allowClose: true,
className: "actionsAsGrid",
});
if (tryOn) {
if (await confirmRestart(gameState)) {

View file

@ -583,7 +583,9 @@ export function addToScore(gameState: GameState, coin: Coin) {
coin.previousY,
(gameState.canvasWidth - coin.x) / 100,
-coin.y / 100,
gameState.perks.metamorphosis || isOptionOn("colorful_coins") ? coin.color : 'gold',
gameState.perks.metamorphosis || isOptionOn("colorful_coins")
? coin.color
: "gold",
true,
gameState.coinSize / 2,
@ -1116,7 +1118,10 @@ export function gameStateTick(
coin.x,
coin.y,
0,
gameState.baseSpeed, gameState.perks.metamorphosis || isOptionOn("colorful_coins") ? coin.color : 'gold',
gameState.baseSpeed,
gameState.perks.metamorphosis || isOptionOn("colorful_coins")
? coin.color
: "gold",
true,
5,
250,

View file

@ -99,10 +99,6 @@ export function render(gameState: GameState) {
scoreDisplay.className =
gameState.lastScoreIncrease > gameState.levelTime - 500 ? "active" : "";
// Clear
if (!isOptionOn("basic") && level.svg && level.color === "#000000") {
haloCanvasCtx.globalCompositeOperation = "source-over";
@ -113,8 +109,10 @@ export function render(gameState: GameState) {
haloCanvasCtx.globalCompositeOperation = "screen";
forEachLiveOne(gameState.coins, (coin) => {
const color= gameState.perks.metamorphosis || isOptionOn("colorful_coins") ?
coin.color : 'gold';
const color =
gameState.perks.metamorphosis || isOptionOn("colorful_coins")
? coin.color
: "gold";
haloCanvasCtx.globalAlpha = 0.5;
drawFuzzyBall(
haloCanvasCtx,
@ -145,7 +143,6 @@ export function render(gameState: GameState) {
ball.y / haloScale,
);
if (isOptionOn("extra_bright")) {
haloCanvasCtx.globalAlpha = 0.2;
drawFuzzyBall(
haloCanvasCtx,
@ -182,7 +179,7 @@ export function render(gameState: GameState) {
y / haloScale,
);
if (isOptionOn("extra_bright")) {
haloCanvasCtx.globalAlpha *= 0.5
haloCanvasCtx.globalAlpha *= 0.5;
drawFuzzyBall(
haloCanvasCtx,
color,
@ -276,8 +273,10 @@ export function render(gameState: GameState) {
// Coins
ctx.globalAlpha = 1;
forEachLiveOne(gameState.coins, (coin) => {
const color= gameState.perks.metamorphosis || isOptionOn("colorful_coins") ?
coin.color : 'gold'
const color =
gameState.perks.metamorphosis || isOptionOn("colorful_coins")
? coin.color
: "gold";
// ctx.globalCompositeOperation = "source-over";
ctx.globalCompositeOperation =
color === "gold" ||
@ -550,21 +549,24 @@ export function render(gameState: GameState) {
1,
);
if (!isOptionOn("basic") && isOptionOn("contrast") && level.svg && level.color === "#000000") {
if (
!isOptionOn("basic") &&
isOptionOn("contrast") &&
level.svg &&
level.color === "#000000"
) {
// haloCanvasCtx.globalCompositeOperation = 'multiply';
// haloCanvasCtx.fillRect(0,0,haloCanvas.width,haloCanvas.height)
haloCanvasCtx.fillStyle = 'white'
haloCanvasCtx.fillStyle = "white";
haloCanvasCtx.globalAlpha = 0.25;
haloCanvasCtx.globalCompositeOperation = 'screen';
haloCanvasCtx.fillRect(0,0,haloCanvas.width,haloCanvas.height)
haloCanvasCtx.globalCompositeOperation = "screen";
haloCanvasCtx.fillRect(0, 0, haloCanvas.width, haloCanvas.height);
ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "soft-light";
ctx.drawImage(haloCanvas, 0, 0, width, height);
}
ctx.globalCompositeOperation = 'source-over';
ctx.globalCompositeOperation = "source-over";
ctx.globalAlpha = 1;
if (isOptionOn("mobile-mode") && !gameState.running) {
drawText(
@ -578,7 +580,6 @@ export function render(gameState: GameState) {
);
}
if (shaked) {
ctx.resetTransform();
}

View file

@ -38,7 +38,8 @@ export async function openStartingPerksEditor() {
});
const perk: Upgrade | null | void = await asyncAlert({
title: t("main_menu.starting_perks"),className:'actionsAsGrid',
title: t("main_menu.starting_perks"),
className: "actionsAsGrid",
content: [
t("main_menu.starting_perks_checked"),
...buttons.filter((b) => b.checked),