mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-15 18:54:47 -04:00
Fix : bg color of dollar level, puck width and coins centering
This commit is contained in:
parent
81224f928d
commit
63973f2072
3 changed files with 26 additions and 19 deletions
|
@ -125,10 +125,8 @@ If the app stutters, turn on "fast mode" in the settings to render a simplified
|
||||||
There's also an easy mode for kids (slower ball) and a color-blind mode (no color related game mechanics).
|
There's also an easy mode for kids (slower ball) and a color-blind mode (no color related game mechanics).
|
||||||
|
|
||||||
# Roadmap
|
# Roadmap
|
||||||
|
|
||||||
The "engine" could be better
|
The "engine" could be better
|
||||||
- apk version soft locks at start.
|
- apk version soft locks at start.
|
||||||
- replace "menu" by "L2/7" once you pass level 1
|
|
||||||
- shinier coins by applying glow to them ?
|
- shinier coins by applying glow to them ?
|
||||||
- ask for permanent storage
|
- ask for permanent storage
|
||||||
- It's a bit confusing at first to grasp that one upgrade is applied randomly at the start of the game
|
- It's a bit confusing at first to grasp that one upgrade is applied randomly at the start of the game
|
||||||
|
|
|
@ -1999,10 +1999,19 @@ function render() {
|
||||||
|
|
||||||
ctx.globalCompositeOperation = "source-over";
|
ctx.globalCompositeOperation = "source-over";
|
||||||
const comboText = "x " + combo
|
const comboText = "x " + combo
|
||||||
const comboTextWidth = comboText.length * puckHeight / 2.6
|
const comboTextWidth = comboText.length * puckHeight / 1.80
|
||||||
drawCoin(ctx, 'gold', coinSize, puck - coinSize * 1.5 - comboTextWidth / 2, gameZoneHeight - puckHeight / 2, !level.black_puck ? '#FFF' : '#000', 0)
|
const totalWidth = comboTextWidth + coinSize * 2
|
||||||
|
const left = puck - totalWidth / 2
|
||||||
|
if (totalWidth < puckWidth) {
|
||||||
|
|
||||||
|
drawCoin(ctx, 'gold', coinSize, left + coinSize / 2, gameZoneHeight - puckHeight / 2, !level.black_puck ? '#FFF' : '#000', 0)
|
||||||
drawText(ctx, comboText, !level.black_puck ? '#000' : '#FFF', puckHeight,
|
drawText(ctx, comboText, !level.black_puck ? '#000' : '#FFF', puckHeight,
|
||||||
puck - comboTextWidth / 2, gameZoneHeight - puckHeight / 2, true);
|
left + coinSize * 1.5, gameZoneHeight - puckHeight / 2, true);
|
||||||
|
} else {
|
||||||
|
drawText(ctx, comboText, !level.black_puck ? '#000' : '#FFF', puckHeight,
|
||||||
|
puck, gameZoneHeight - puckHeight / 2, false);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Borders
|
// Borders
|
||||||
const redSides = perks.sides_are_lava && combo > baseCombo()
|
const redSides = perks.sides_are_lava && combo > baseCombo()
|
||||||
|
@ -2400,7 +2409,7 @@ function createRevivalSound(baseFreq = 440) {
|
||||||
|
|
||||||
// Set up the gain envelope to simulate a smooth attack and decay
|
// Set up the gain envelope to simulate a smooth attack and decay
|
||||||
gainNode.gain.setValueAtTime(0, context.currentTime); // Start at zero
|
gainNode.gain.setValueAtTime(0, context.currentTime); // Start at zero
|
||||||
gainNode.gain.linearRampToValueAtTime(0.8, context.currentTime + 0.5); // Ramp up to full volume
|
gainNode.gain.linearRampToValueAtTime(0.5, context.currentTime + 0.5); // Ramp up to full volume
|
||||||
gainNode.gain.exponentialRampToValueAtTime(0.001, context.currentTime + 2); // Slow decay
|
gainNode.gain.exponentialRampToValueAtTime(0.001, context.currentTime + 2); // Slow decay
|
||||||
|
|
||||||
// Start all oscillators
|
// Start all oscillators
|
||||||
|
|
|
@ -3530,7 +3530,7 @@ let allLevels=[
|
||||||
"color": ""
|
"color": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Dollar",
|
"name": "Greed",
|
||||||
"size": 17,
|
"size": 17,
|
||||||
"bricks": [
|
"bricks": [
|
||||||
null,
|
null,
|
||||||
|
@ -3841,7 +3841,7 @@ let allLevels=[
|
||||||
""
|
""
|
||||||
],
|
],
|
||||||
"svg": "",
|
"svg": "",
|
||||||
"color": "#f6d32d"
|
"color": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Waves",
|
"name": "Waves",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue