Build 29067205

This commit is contained in:
Renan LE CARO 2025-04-07 15:25:58 +02:00
parent be49fb9d6e
commit eb846327e5
18 changed files with 75 additions and 37 deletions

View file

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

View file

@ -1287,5 +1287,34 @@
"bricks": "__gggg___ggbggg_gggbgggggggbggggggggbbgggggggggg_gggggg___gggg__",
"svg": null,
"color": ""
},
{
"name": "Hemiola",
"size": 11,
"bricks": "___gggg_____gggrrgg_____ggrrg_______gggg_____gggyygg_____ggyyg_______gggg_____gggCCgg_____ggCCg_______gggg________gg_____",
"svg": null,
"color": ""
},
{
"name": "Obigre",
"size": 13,
"bricks": "_______________________________________OOOORgRgRgOOOOWOORgRgRgOOOOOWORgRgRgOWOOWOORgRgRgOOWOOWORgRgRgOWOOWOORgRgRgOOOOOOORgRgRgOOO_______________________________________",
"svg": null,
"color": "",
"credit": "https://colin-crapahute.bearblog.dev/"
},
{
"name": "Noodlemire",
"size": 15,
"bricks": "_________________________________ggggggggg_____g_________g___g___________g_g_____________gg_____________gg_____yyy_____ggg__yyyyyyy__ggggtyyyyyyyyytggggtttttttttttgggg_ttttttttt_gg_____ttttt___________________________________",
"svg": null,
"color": ""
},
{
"name": "Bearded axe",
"size": 12,
"bricks": "______________WyyyOOy_____WyyyOOy_____Wyy_OO______Wyy_OO______Wyy_OO__________OO__________OO__________OO__________OO__________OO__________OO____",
"svg": null,
"color": ""
}
]
]

View file

@ -1 +1 @@
"29067144"
"29067205"

View file

@ -75,7 +75,8 @@ export function gameOver(title: string, intro: string) {
allowClose: true,
title,
content: [
getCreativeModeWarning(gameState) || `
getCreativeModeWarning(gameState) ||
`
<p>${intro}</p>
<p>${t("gameOver.cumulative_total", { startTs, endTs })}</p>
`,

View file

@ -285,7 +285,7 @@ export function getLevelUnlockCondition(levelIndex: number) {
// Returns "" if level is unlocked, otherwise a string explaining how to unlock it
let required: UpgradeLike[] = [],
forbidden: UpgradeLike[] = [],
minScore = Math.max(-1000 + 100 * levelIndex,0);
minScore = Math.max(-1000 + 100 * levelIndex, 0);
if (levelIndex > 20) {
const excluded: Set<PerkId> = new Set([

View file

@ -80,7 +80,7 @@
"main_menu.footer_html": "<p> \n<span>Made in France by <a href=\"https://lecaro.me\">Renan LE CARO</a>.</span> \n<a href=\"https://paypal.me/renanlecaro\" target=\"_blank\">Donate</a>\n<a href=\"https://discord.gg/bbcQw4x5zA\" target=\"_blank\">Discord</a>\n<a href=\"https://f-droid.org/en/packages/me.lecaro.breakout/\" target=\"_blank\">F-Droid</a>\n<a href=\"https://play.google.com/store/apps/details?id=me.lecaro.breakout\" target=\"_blank\">Google Play</a>\n<a href=\"https://renanlecaro.itch.io/breakout71\" target=\"_blank\">itch.io</a> \n<a href=\"https://gitlab.com/lecarore/breakout71\" target=\"_blank\">Gitlab</a>\n<a href=\"https://breakout.lecaro.me/\" target=\"_blank\">Web version</a>\n<a href=\"https://news.ycombinator.com/item?id=43183131\" target=\"_blank\">HackerNews</a>\n<a href=\"https://breakout.lecaro.me/privacy.html\" target=\"_blank\">Privacy Policy</a>\n<span>v.{{appVersion}}</span>\n</p>\n",
"main_menu.fullscreen": "Fullscreen",
"main_menu.fullscreen_help": "Game will try to go full screen before starting",
"main_menu.help_content": "# Goal\n\nThe goal is to catch as many coins as possible during 7 levels. \nCoins appear when you break bricks.\nThey fly around, bounce and roll, and you need to catch them with your puck to increase your score. \nYour score is displayed in the top right corner of the screen.\nYou must delete all bricks to progress to the next level. \nIf you drop the ball, it's game over, unless you had the \"extra life\" upgrade.\n\n# Upgrades \n\nAfter clearing a level, you'll be able to pick upgrades among a small selection presented to you. \n\nThe upgrade you pick will apply until the end of the run. You will get more upgrade if you play well : catch all coins, clear the level quickly, never miss the bricks, never bounce on the sides or ceiling.\n\nIf you play very well, you'll also get \"rerolls\" that allow you to shuffle the list of upgrades that are offered to you. Once an upgrade is offered, it's less likely to reappear afterward. \n\nYou also get a free random upgrade at the beginning of each run. There's also an easy mode for kids, where the game will always start with the \"slower ball\" upgrade. You can see which upgrades you have and more by clicking your score at the top right of the screen. \n\nUpgrades apply to the whole run and can synergize, or really work against each other. Most of the fun of the game is discovering which ones work best together.\n\nSome upgrades help with aiming, like \"Telekinesis\". Some upgrades can be picked multiple times to increase the effect, you'll see for example \"+1 ball level 2\" which adds a third ball.\n\nWhen you first play, only a few upgrades are available, you unlock the rest by simply playing and scoring points. There's a similar \nmechanic for levels unlock. At the end of a run, the things you just unlocked will be shown, and you can check the full content in menu / unlocks.\n\nMany upgrades impact your combo. \n\n# Combo\n\nYour \"combo\" is the number of coins spawned when a brick breaks. It is displayed on your puck, for example x4 means each\nbrick will spawn 4 coins. It will reset if you miss. \n\nMany upgrades will increase the combo when you break a brick, but also add a condition to reset it. So the more upgrades you pick, the faster it will climb, but the more likely it will be that it returns to it's base value. \n\n# Aiming\n\nWhat decides how the ball flies away is only the position of the puck hit. If the ball hits the puck dead center, it will bounce back up vertically, while in you hit more on one side, it will have more angle. \n\nThe puck speed and incoming angle have no impact on the ball direction after bouncing.\n\nYou might find that a smaller puck makes it a bit easier to aim near corners, but also makes it much harder to catch coins.\n\n\"Wind\" and \"puck controls ball\" can help you aim even after the ball bounced to the wrong direction.\n\n\"Slower ball\" gives you a bit more time to aim, particularly useful in later levels where the ball goes faster. The ball also\naccelerates as you spend time in each level. \n\n# Unlocks\n\nWhen starting breakout 71 for the first time, you can access a few upgrades and levels. The rest needs to be unlocked. Upgrades are unlocked by simply playing. Every time you catch a coin, your total score is raised by one. Then once you reach the threshold of the upgrade, it's unlocked.\n\nUnlocking levels is a bit different, it requires you to play very well, in many different ways. The first levels just need a high score of X, but later level are unlocked by reaching a high score of X with perk Y and without perk Z. All those requirements are pseudo random and not handpicked, so some are likely much harder than others. They should be the same for everyone though. It might happen that an update of the game perks list changes the required perks. \n\n# System requirements \n\nThe game should perform well even on low-end devices. It's very lean and does not take much storage space (Roughly 0.1MB). The web version is supposed to work on iOS safari, Firefox ESR and chrome, on desktop and mobile.\n\nIf the app stutters, turn on \"fast mode\" in the settings to render a simplified view that should be faster. You can adjust many aspects of the game there, go have a look ! \n\n# Playing offline \n\nBreakout 71 can work offline in many ways:\n\n- play store : https://play.google.com/store/apps/details?id=me.lecaro.breakout\n- fdroid : https://f-droid.org/packages/me.lecaro.breakout/\n- html file on pc : https://renanlecaro.itch.io/breakout71\n\n",
"main_menu.help_content": "# Goal\n\nThe goal is to catch as many coins as possible during 7 levels. \nCoins appear when you break bricks.\nThey fly around, bounce and roll, and you need to catch them with your puck to increase your score. \nYour score is displayed in the top right corner of the screen.\nYou must delete all bricks to progress to the next level. \nIf you drop the ball, it's game over, unless you had the \"extra life\" upgrade.\n\n# Upgrades \n\nAfter clearing a level, you'll be able to pick upgrades among a small selection presented to you. \n\nThe upgrade you pick will apply until the end of the run. You will get more upgrade if you play well : catch all coins, clear the level quickly, never miss the bricks, never bounce on the sides or ceiling.\n\nIf you play very well, you'll also get \"rerolls\" that allow you to shuffle the list of upgrades that are offered to you. Once an upgrade is offered, it's less likely to reappear afterward. \n\nYou also get a free random upgrade at the beginning of each run. There's also an easy mode for kids, where the game will always start with the \"slower ball\" upgrade. The icon of your randomly assigned upgrade will be the used as the first level you play in each run. You can decide which upgrades can be starting upgrades in the settings. \n\nUpgrades apply to the whole run and can synergize, or really work against each other. Most of the fun of the game is discovering which ones work best together.\n\nSome upgrades help with aiming, like \"Telekinesis\". Some upgrades can be picked multiple times to increase the effect, you'll see for example \"+1 ball level 2\" which adds a third ball.\n\nWhen you first play, only a few upgrades are available, you unlock the rest by simply playing and scoring points. At the end of a run, the things you just unlocked will be shown, and you can check the full content in menu / unlocks.\n\nMany upgrades impact your combo. \n\n# Combo\n\nYour \"combo\" is the number of coins spawned when a brick breaks. It is displayed on your puck, for example x4 means each\nbrick will spawn 4 coins. It will reset if you miss. \n\nMany upgrades will increase the combo when you break a brick, but also add a condition to reset it. So the more upgrades you pick, the faster it will climb, but the more likely it will be that it returns to it's base value. \n\n# Aiming\n\nWhat decides how the ball flies away is only the position of the puck hit. If the ball hits the puck dead center, it will bounce back up vertically, while in you hit more on one side, it will have more angle. \n\nThe puck speed and incoming angle have no impact on the ball direction after bouncing.\n\nYou might find that a smaller puck makes it a bit easier to aim near corners, but also makes it much harder to catch coins.\n\n\"Wind\" and \"puck controls ball\" can help you aim even after the ball bounced to the wrong direction.\n\n\"Slower ball\" gives you a bit more time to aim, particularly useful in later levels where the ball goes faster. The ball also\naccelerates as you spend time in each level. \n\n# Unlocks\n\nWhen starting breakout 71 for the first time, you can access a few upgrades and levels. The rest needs to be unlocked. Upgrades are unlocked by simply playing. Every time you catch a coin, your total score is raised by one. Then once you reach the threshold of the upgrade, it's unlocked.\n\nUnlocking levels is a bit different, it requires you to play very well, in many different ways. The first levels just need a high score of X, but later level are unlocked by reaching a high score of X with perk Y and without perk Z. All those requirements are pseudo random and not handpicked, so some are likely much harder than others. They should be the same for everyone though. It might happen that an update of the game perks list changes the required perks. \n\n# System requirements \n\nThe game should perform well even on low-end devices. It's very lean and does not take much storage space (Roughly 0.1MB). The web version is supposed to work on iOS safari, Firefox ESR and chrome, on desktop and mobile.\n\nIf the app stutters, turn on \"fast mode\" in the settings to render a simplified view that should be faster. You can adjust many aspects of the game there, go have a look ! \n\n# Playing offline \n\nBreakout 71 can work offline in many ways:\n\n- play store : https://play.google.com/store/apps/details?id=me.lecaro.breakout\n- fdroid : https://f-droid.org/packages/me.lecaro.breakout/\n- html file on pc : https://renanlecaro.itch.io/breakout71\n\n",
"main_menu.help_help": "Learn more about general aspects of the game",
"main_menu.help_title": "Help and credits",
"main_menu.help_upgrades": "<h2>Upgrades</h2>",

File diff suppressed because one or more lines are too long

View file

@ -98,5 +98,4 @@ if (migrationsRun && !window.location.hash) {
}
if (!migrationsRun) {
window.location.hash = "";
}

View file

@ -58,7 +58,6 @@ export function newGameState(params: RunParams): GameState {
perks[randomGift] = 1;
}
const runLevels = getRunLevels(params, randomGift);
console.log(randomGift, params, runLevels);
const gameState: GameState = {
runLevels,

View file

@ -36,7 +36,7 @@ export async function openScorePanel(gameState: GameState) {
}
export function getNearestUnlockHTML(gameState: GameState) {
if(gameState.creative)return ''
if (gameState.creative) return "";
const unlockable = allLevels
.map((l, li) => {
const { minScore, forbidden, required } = getLevelUnlockCondition(li);

View file

@ -111,12 +111,12 @@ export function render(gameState: GameState) {
coin.y / haloScale,
);
});
haloCanvasCtx.globalAlpha = 0.1;
haloCanvasCtx.globalAlpha = 0.3;
gameState.balls.forEach((ball) => {
drawFuzzyBall(
haloCanvasCtx,
gameState.ballsColor,
(gameState.ballSize * 3 * brightness) / haloScale,
(gameState.ballSize * 2 * brightness) / haloScale,
ball.x / haloScale,
ball.y / haloScale,
);
@ -523,7 +523,7 @@ export function render(gameState: GameState) {
haloCanvasCtx.globalCompositeOperation = "screen";
haloCanvasCtx.fillRect(0, 0, haloCanvas.width, haloCanvas.height);
ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "soft-light";
ctx.globalCompositeOperation = "overlay";
ctx.drawImage(haloCanvas, 0, 0, width, height);
}

View file

@ -3,11 +3,11 @@ import { PerkId, Upgrade } from "./types";
import { t } from "./i18n/i18n";
import { icons, upgrades } from "./loadGameData";
import { getSettingValue, getTotalScore, setSettingValue } from "./settings";
import {isOptionOn} from "./options";
import { isOptionOn } from "./options";
export function startingPerkMenuButton() {
return {
disabled:isOptionOn('easy'),
disabled: isOptionOn("easy"),
icon: icons["icon:starting_perks"],
text: t("main_menu.starting_perks"),
help: t("main_menu.starting_perks_help"),

View file

@ -8,9 +8,7 @@ export function setupTooltips() {
}
function updateTooltipPosition(e: MouseEvent) {
tooltip.style.transform =
`translate(${e.clientX}px,${e.clientY + 20}px) ` +
(e.clientX > window.innerWidth / 2 ? " translate(-100%,0)" : "");
tooltip.style.transform = `translate(${e.clientX}px,${e.clientY}px) translate(${e.clientX > window.innerWidth / 2 ? "-100%" : "0"},${e.clientY > (window.innerHeight * 2) / 3 ? "-100%" : "20px"})`;
}
function closeToolTip() {
@ -53,7 +51,11 @@ export function setupTooltips() {
},
true,
);
document.body.addEventListener("mouseleave", (e) => {
closeToolTip();
});
document.body.addEventListener(
"mouseleave",
(e) => {
closeToolTip();
},
true,
);
}