Build 29092809

This commit is contained in:
Renan LE CARO 2025-04-25 10:10:09 +02:00
parent e2d8a0ab5c
commit 30e684e838
12 changed files with 124 additions and 96 deletions

View file

@ -27,16 +27,19 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
## Done ## Done
- fixed: context menu and tooltip stuck on windows
## 29091656
- categorized the icons
- color coded the icons
- changed the wording of perks help to be shorter
- added tooltips on perks with full help, and a help button on mobile
- all or nothing : don't show negative number of coins cought, don't reduce score if no combo was lost - all or nothing : don't show negative number of coins cought, don't reduce score if no combo was lost
- rename hypnosis to golden_goose, apply when hitting any brick, any side at level 2 - rename hypnosis to golden_goose, apply when hitting any brick, any side at level 2
- removed comboIncreaseTexts option - removed comboIncreaseTexts option
- minefield : +10% coins per bomb on screen - minefield : +10% coins per bomb on screen
- extra life are transparent when you have 2+ balls - extra life are transparent when you have 2+ balls
- categorized the icons
- color coded the icons
- changed the wording of perks help to be shorter
- added tooltips on perks with full help, and a help button on mobile
- wording of "combo per brick *broken*"
- removed : instant_upgrade - removed : instant_upgrade
- nerfed : helium : now need to be level 3 to have the same effect of keeping coins up - nerfed : helium : now need to be level 3 to have the same effect of keeping coins up
- new level : Blinky by Big Goober - new level : Blinky by Big Goober
@ -369,6 +372,8 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
## Easy perk ideas ## Easy perk ideas
- b71 tooltip stays stuck
- allow dropping balls that are about to miss.
- square coins : coins loose all horizontal momentum when hitting something. - square coins : coins loose all horizontal momentum when hitting something.
- ball turns following puck motion - ball turns following puck motion
- "+1 coin for each ball within a small radius of the broken brick" ? - "+1 coin for each ball within a small radius of the broken brick" ?

View file

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

168
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 = "29091656"; const VERSION = "29092809";
// The name of the cache // The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`; const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -1,5 +1,6 @@
import { t } from "./i18n/i18n"; import { t } from "./i18n/i18n";
import { isOptionOn } from "./options"; import { isOptionOn } from "./options";
import { hideAnyTooltip } from "./tooltip";
export let alertsOpen = 0, export let alertsOpen = 0,
closeModal: null | (() => void) = null; closeModal: null | (() => void) = null;
@ -45,6 +46,7 @@ export async function asyncAlert<t>({
allowClose?: boolean; allowClose?: boolean;
className?: string; className?: string;
}): Promise<t | void> { }): Promise<t | void> {
hideAnyTooltip();
updateAlertsOpen(+1); updateAlertsOpen(+1);
return new Promise((resolve) => { return new Promise((resolve) => {
popupWrap.className = className; popupWrap.className = className;

View file

@ -1 +1 @@
"29091656" "29092809"

View file

@ -89,7 +89,7 @@ import {
} from "./pure_functions"; } from "./pure_functions";
import { helpMenuEntry } from "./help"; import { helpMenuEntry } from "./help";
import { creativeMode } from "./creative"; import { creativeMode } from "./creative";
import { setupTooltips } from "./tooltip"; import { hideAnyTooltip, setupTooltips } from "./tooltip";
import { startingPerkMenuButton } from "./startingPerks"; import { startingPerkMenuButton } from "./startingPerks";
import "./migrations"; import "./migrations";
import { getHistory } from "./gameOver"; import { getHistory } from "./gameOver";
@ -109,6 +109,7 @@ export async function play() {
startRecordingGame(gameState); startRecordingGame(gameState);
getAudioContext()?.resume(); getAudioContext()?.resume();
resumeRecording(); resumeRecording();
hideAnyTooltip();
// document.body.classList[gameState.running ? 'add' : 'remove']('running') // document.body.classList[gameState.running ? 'add' : 'remove']('running')
} }
@ -121,7 +122,6 @@ export function pause(playerAskedForPause: boolean) {
} }
return; return;
} }
const stop = () => { const stop = () => {
gameState.running = false; gameState.running = false;
@ -150,6 +150,7 @@ export function pause(playerAskedForPause: boolean) {
if (document.exitPointerLock) { if (document.exitPointerLock) {
document.exitPointerLock(); document.exitPointerLock();
} }
hideAnyTooltip();
} }
export const fitSize = (gameState: GameState) => { export const fitSize = (gameState: GameState) => {

View file

@ -147,12 +147,16 @@ export function pickedUpgradesHTMl(gameState: GameState) {
return ` <p>${t("score_panel.upgrades_picked")}</p>` + upgradesList.join(""); return ` <p>${t("score_panel.upgrades_picked")}</p>` + upgradesList.join("");
} }
export function levelsListHTMl(gameState: GameState, level: number) { export function levelsListHTMl(
gameState: GameState,
currentLevelIndex: number,
) {
if (!gameState.perks.clairvoyant) return ""; if (!gameState.perks.clairvoyant) return "";
if (gameState.creative) return ""; if (gameState.creative) return "";
let list = ""; let list = "";
for (let i = 0; i < max_levels(gameState); i++) { for (let i = 0; i < max_levels(gameState); i++) {
list += `<span style="opacity: ${i >= level ? 1 : 0.2}" title="${gameState.runLevels[i].name}">${icons[gameState.runLevels[i].name]}</span>`; let level = gameState.runLevels[i % gameState.runLevels.length];
list += `<span style="opacity: ${i >= currentLevelIndex ? 1 : 0.2}" title="${level.name}">${icons[level.name]}</span>`;
} }
return `<p>${t("score_panel.upcoming_levels")}</p><p>${list}</p>`; return `<p>${t("score_panel.upcoming_levels")}</p><p>${list}</p>`;
} }

View file

@ -345,7 +345,7 @@
"upgrades.multiball.tooltip": "Start every levels with {{count}} balls.", "upgrades.multiball.tooltip": "Start every levels with {{count}} balls.",
"upgrades.multiball.verbose_description": "As soon as you drop the ball in Breakout 71, you lose. \n\nWith this perk, you get two balls, and so you can afford to lose one. \n\nThe lost balls come back on the next level. \n\nHaving more than one balls makes some further perks available, and of course clears the level faster.", "upgrades.multiball.verbose_description": "As soon as you drop the ball in Breakout 71, you lose. \n\nWith this perk, you get two balls, and so you can afford to lose one. \n\nThe lost balls come back on the next level. \n\nHaving more than one balls makes some further perks available, and of course clears the level faster.",
"upgrades.nbricks.name": "Strict sample size", "upgrades.nbricks.name": "Strict sample size",
"upgrades.nbricks.tooltip": "More coins if you break bricks one by one.", "upgrades.nbricks.tooltip": "More coins if you hit bricks one by one.",
"upgrades.nbricks.verbose_description": "Hit exactly {{lvl}} bricks per paddle bounce for +{{lvl}} combo, otherwise it resets. You don't necessarily need to destroy those bricks, but you need to hit them. Bricks destroyed by explosions don't count", "upgrades.nbricks.verbose_description": "Hit exactly {{lvl}} bricks per paddle bounce for +{{lvl}} combo, otherwise it resets. You don't necessarily need to destroy those bricks, but you need to hit them. Bricks destroyed by explosions don't count",
"upgrades.one_more_choice.name": "Extra choice", "upgrades.one_more_choice.name": "Extra choice",
"upgrades.one_more_choice.tooltip": "More upgrade choices", "upgrades.one_more_choice.tooltip": "More upgrade choices",

View file

@ -2,7 +2,7 @@ import { RunHistoryItem } from "./types";
import _appVersion from "./data/version.json"; import _appVersion from "./data/version.json";
import { generateSaveFileContent } from "./generateSaveFileContent"; import { generateSaveFileContent } from "./generateSaveFileContent";
import { getLevelUnlockCondition, reasonLevelIsLocked } from "./game_utils"; import { reasonLevelIsLocked } from "./game_utils";
import { allLevels } from "./loadGameData"; import { allLevels } from "./loadGameData";
import { toast } from "./toast"; import { toast } from "./toast";

View file

@ -7,6 +7,9 @@ export function setupTooltips() {
setupDesktopTooltips(tooltip); setupDesktopTooltips(tooltip);
} }
} }
export function hideAnyTooltip() {
tooltip.style.display = "none";
}
const tooltip = document.getElementById("tooltip") as HTMLDivElement; const tooltip = document.getElementById("tooltip") as HTMLDivElement;
@ -35,7 +38,7 @@ function setupMobileTooltips(tooltip: HTMLDivElement) {
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
tooltip.style.display = "none"; hideAnyTooltip();
} }
document.body.addEventListener("touchend", closeTooltip, true); document.body.addEventListener("touchend", closeTooltip, true);
@ -51,6 +54,7 @@ function setupMobileTooltips(tooltip: HTMLDivElement) {
e.preventDefault(); e.preventDefault();
} }
document.body.addEventListener("click", ignoreClick, true); document.body.addEventListener("click", ignoreClick, true);
document.body.addEventListener("contextmenu", ignoreClick, true);
} }
function setupDesktopTooltips(tooltip: HTMLDivElement) { function setupDesktopTooltips(tooltip: HTMLDivElement) {
@ -59,7 +63,7 @@ function setupDesktopTooltips(tooltip: HTMLDivElement) {
} }
function closeToolTip() { function closeToolTip() {
tooltip.style.display = "none"; hideAnyTooltip();
hovering = null; hovering = null;
} }