Build 29088513

This commit is contained in:
Renan LE CARO 2025-04-22 10:33:25 +02:00
parent bf3dac8e8f
commit af65737011
10 changed files with 58 additions and 59 deletions

View file

@ -17,7 +17,9 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
## Done ## Done
- included german corrections by Pock
- added particle effect for wrap - added particle effect for wrap
- removed grace period from passive income, updated icon
## 29087440 ## 29087440

View file

@ -29,8 +29,8 @@ android {
applicationId = "me.lecaro.breakout" applicationId = "me.lecaro.breakout"
minSdk = 21 minSdk = 21
targetSdk = 34 targetSdk = 34
versionCode = 29087440 versionCode = 29088513
versionName = "29087440" versionName = "29088513"
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

12
dist/index.html vendored

File diff suppressed because one or more lines are too long

View file

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

View file

@ -817,8 +817,8 @@
}, },
{ {
"name": "icon:passive_income", "name": "icon:passive_income",
"size": 8, "size": 7,
"bricks": "__________tttt____tttt_______________W___________________rWWWr__", "bricks": "_ttttt__ttt_t______W____y____________y______ggg__",
"color": "" "color": ""
}, },
{ {

View file

@ -1 +1 @@
"29087440" "29088513"

View file

@ -1565,40 +1565,41 @@ export function gameStateTick(
} }
} }
if( if (
gameState.perks.wrap_left && gameState.perks.wrap_left &&
gameState.perks.left_is_lava<2 && gameState.perks.left_is_lava < 2 &&
Math.random()*frames > 0.1){ Math.random() * frames > 0.1
makeParticle( ) {
gameState, makeParticle(
gameState.offsetXRoundedDown, gameState,
Math.random() * gameState.gameZoneHeight, gameState.offsetXRoundedDown,
5, Math.random() * gameState.gameZoneHeight,
(Math.random() - 0.5) * 10, 5,
"#6262EA", (Math.random() - 0.5) * 10,
true, "#6262EA",
gameState.coinSize / 2, true,
100 * (Math.random() + 1), gameState.coinSize / 2,
); 100 * (Math.random() + 1),
);
} }
if( if (
gameState.perks.wrap_right && gameState.perks.wrap_right &&
gameState.perks.right_is_lava<2 && gameState.perks.right_is_lava < 2 &&
Math.random()*frames > 0.1){ Math.random() * frames > 0.1
makeParticle( ) {
gameState, makeParticle(
gameState.offsetXRoundedDown+gameState.gameZoneWidth, gameState,
Math.random() * gameState.gameZoneHeight, gameState.offsetXRoundedDown + gameState.gameZoneWidth,
-5, Math.random() * gameState.gameZoneHeight,
(Math.random() - 0.5) * 10, -5,
"#6262EA", (Math.random() - 0.5) * 10,
true, "#6262EA",
gameState.coinSize / 2, true,
100 * (Math.random() + 1), gameState.coinSize / 2,
); 100 * (Math.random() + 1),
);
} }
// Respawn what's needed, show particles // Respawn what's needed, show particles
forEachLiveOne(gameState.respawns, (r, ri) => { forEachLiveOne(gameState.respawns, (r, ri) => {
if (gameState.bricks[r.index]) { if (gameState.bricks[r.index]) {
@ -1748,8 +1749,7 @@ export function ballTick(gameState: GameState, ball: Ball, frames: number) {
ball.previousX < gameState.offsetX + gameState.gameZoneWidth / 2 ball.previousX < gameState.offsetX + gameState.gameZoneWidth / 2
) { ) {
schedulGameSound(gameState, "plouf", ball.x, 1); schedulGameSound(gameState, "plouf", ball.x, 1);
ball.x = ball.x = gameState.offsetX + gameState.gameZoneWidth - gameState.ballSize;
gameState.offsetX + gameState.gameZoneWidth - gameState.ballSize ;
if (ball.vx > 0) { if (ball.vx > 0) {
ball.vx *= -1; ball.vx *= -1;
} }
@ -1767,7 +1767,7 @@ export function ballTick(gameState: GameState, ball: Ball, frames: number) {
ball.previousX > gameState.offsetX + gameState.gameZoneWidth / 2 ball.previousX > gameState.offsetX + gameState.gameZoneWidth / 2
) { ) {
schedulGameSound(gameState, "plouf", ball.x, 1); schedulGameSound(gameState, "plouf", ball.x, 1);
ball.x = gameState.offsetX + gameState.ballSize ; ball.x = gameState.offsetX + gameState.ballSize;
if (ball.vx < 0) { if (ball.vx < 0) {
ball.vx *= -1; ball.vx *= -1;
@ -1819,7 +1819,7 @@ export function ballTick(gameState: GameState, ball: Ball, frames: number) {
const ballIsUnderPuck = const ballIsUnderPuck =
Math.abs(ball.x - gameState.puckPosition) < Math.abs(ball.x - gameState.puckPosition) <
gameState.ballSize / 2 + gameState.puckWidth / 2 && gameState.ballSize / 2 + gameState.puckWidth / 2 &&
!isMovingWhilePassiveIncome(gameState, 150); !isMovingWhilePassiveIncome(gameState);
if ( if (
ball.y > ylimit && ball.y > ylimit &&
ball.vy > 0 && ball.vy > 0 &&

View file

@ -276,15 +276,12 @@ export function shouldPierceByColor(
return true; return true;
} }
export function isMovingWhilePassiveIncome( export function isMovingWhilePassiveIncome(gameState: GameState) {
gameState: GameState,
gracePeriod = 0,
) {
return !!( return !!(
gameState.lastPuckMove && gameState.lastPuckMove &&
gameState.perks.passive_income && gameState.perks.passive_income &&
gameState.lastPuckMove > gameState.lastPuckMove >
gameState.levelTime - 250 * gameState.perks.passive_income + gracePeriod gameState.levelTime - 250 * gameState.perks.passive_income
); );
} }

View file

@ -151,14 +151,14 @@ migrate("clean_ls", () => {
} }
}); });
migrate("set_user_id", () => { migrate("set_user_id", () => {
// Useful to identify a player when uploading his save file multiple times to a web service // Useful to identify a player when uploading his save file multiple times to a web service
if(!localStorage.getItem('breakout_71_user_id')){ if (!localStorage.getItem("breakout_71_user_id")) {
localStorage.setItem('breakout_71_user_id', JSON.stringify(self?.crypto?.randomUUID()||'user_'+Math.random())) localStorage.setItem(
"breakout_71_user_id",
JSON.stringify(self?.crypto?.randomUUID() || "user_" + Math.random()),
);
} }
}); });
afterMigration(); afterMigration();