Rendering things mostly

- "Miss warning" option is now on by default (ball's particles are red if catching it would be a "miss")
- "Show +X in gold"  option is now on by default (show a +X when combo increases)
- "High contrast" option added, off by default (applies lights layer again as "soft light" at the end of the render)
- "Colorful coins" option now applied at render time instead of coin spawn time, to make preview easier
- when settings are opened on pc, they show up on the side and the overlay is transparent to let you preview the changes
This commit is contained in:
Renan LE CARO 2025-04-04 12:07:24 +02:00
parent 7d518f14e5
commit f76c96019c
25 changed files with 255 additions and 132 deletions

View file

@ -430,9 +430,8 @@ export function explodeBrick(
cy,
ball.previousVX * (0.5 + Math.random()),
ball.previousVY * (0.5 + Math.random()),
gameState.perks.metamorphosis || isOptionOn("colorful_coins")
? color
: "gold",
color,
points,
);
}
@ -584,7 +583,8 @@ export function addToScore(gameState: GameState, coin: Coin) {
coin.previousY,
(gameState.canvasWidth - coin.x) / 100,
-coin.y / 100,
coin.color,
gameState.perks.metamorphosis || isOptionOn("colorful_coins") ? coin.color : 'gold',
true,
gameState.coinSize / 2,
100 + Math.random() * 50,
@ -1116,8 +1116,7 @@ export function gameStateTick(
coin.x,
coin.y,
0,
gameState.baseSpeed,
coin.color,
gameState.baseSpeed, gameState.perks.metamorphosis || isOptionOn("colorful_coins") ? coin.color : 'gold',
true,
5,
250,
@ -1173,7 +1172,6 @@ export function gameStateTick(
// Not using setbrick because we don't want to reset HP
gameState.bricks[hitBrick] = coin.color;
coin.metamorphosisPoints--;
schedulGameSound(gameState, "colorChange", coin.x, 0.3);
}
}