From e8071637a30208c6bca03eb2a5d52f499f6dc43f Mon Sep 17 00:00:00 2001
From: Renan LE CARO
Date: Wed, 26 Feb 2025 23:36:08 +0100
Subject: [PATCH] Automatic deploy 29010156
---
Readme.md | 4 +++-
app/build.gradle.kts | 4 ++--
app/src/main/assets/game.js | 14 +++++++-------
app/src/main/assets/index.html | 8 ++++----
4 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/Readme.md b/Readme.md
index cd1d4e3..f543851 100644
--- a/Readme.md
+++ b/Readme.md
@@ -7,6 +7,7 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
[Google Play](https://play.google.com/store/apps/details?id=me.lecaro.breakout) -
[itch.io](https://renanlecaro.itch.io/breakout71) -
[GitLab](https://gitlab.com/lecarore/breakout71) -
+[HackerNews](https://news.ycombinator.com/item?id=43183131) -
[Donate](https://github.com/sponsors/renanlecaro)
@@ -163,6 +164,7 @@ There are many possible perks left to implement :
The "engine" could be better
+- on mobile, add an element that feels like it can be "grabbed" and make it shine while writing "Push here to play"
- add pointer lock when game is running (lock to play area )https://mdn.github.io/dom-examples/pointer-lock/
- hide cursor options
- offline mode with service worker
@@ -175,7 +177,7 @@ The "engine" could be better
- escape to close menu
- see how to do fullscreen on ios, or at least explain to do aA/hide toolbars
- experiment with showing the combo somewhere else, maybe top center, maybe instead of score.
-- make coins look,sound and roll like coins. Back to colored when coins stain bricks is active
+
- limit GC by reusing coins and particles
- convert captures to mp4 unsing ffmpeg wasm because reddit refuses webm files
- few puck bounces = more choices / upgrades
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 8203391..62e76a3 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -11,8 +11,8 @@ android {
applicationId = "me.lecaro.breakout"
minSdk = 21
targetSdk = 34
- versionCode = 29010123
- versionName = "29010123"
+ versionCode = 29010156
+ versionName = "29010156"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
diff --git a/app/src/main/assets/game.js b/app/src/main/assets/game.js
index 90d1471..00b6de4 100644
--- a/app/src/main/assets/game.js
+++ b/app/src/main/assets/game.js
@@ -197,7 +197,7 @@ function getRowColIndex(row, col) {
return row * gridSize + col;
}
-setInterval(()=>console.log(flashes.length),1000)
+
function spawnExplosion(count, x, y, color, duration = 150, size = coinSize) {
if (!!isSettingOn("basic")) return;
if(flashes.length>MAX_PARTICLES) {
@@ -820,7 +820,6 @@ let nextRunOverrides = {level: null, perks: null}
let hadOverrides = false
function restart() {
- console.log("restart")
hadOverrides = !!(nextRunOverrides.level || nextRunOverrides.perks)
// When restarting, we want to avoid restarting with the same level we're on, so we exclude from the next
// run's level list
@@ -1230,7 +1229,7 @@ function ballTick(ball, delta) {
}
if (perks.respawn) {
- console.log(ball.hitItem,perks.respawn)
+
ball.hitItem.slice(0, -1).slice(0, perks.respawn)
.forEach(({index, color}) => bricks[index] = bricks[index] || color)
}
@@ -1997,7 +1996,7 @@ function drawBall(ctx, color, width, x, y) {
function drawCoin(ctx, color, size, x,y, bg,rawAngle) {
if(isNaN(rawAngle)) debugger
- const angle= Math.round(((rawAngle%(Math.PI*2))+Math.PI*2 )% Math.PI*2 * 16) / 16
+ const angle= (Math.round(rawAngle/Math.PI*2 * 16 ) % 16 + 16 ) % 16
const key = "coin with halo" + "_" + color + "_" + size + '_' + bg + '_'+angle;
if (!cachedGraphics[key]) {
@@ -2023,12 +2022,12 @@ if(isNaN(rawAngle)) debugger
canctx.translate(size / 2, size / 2);
- canctx.rotate(angle);
+ canctx.rotate(angle/ 16);
canctx.translate(-size / 2, -size / 2);
canctx.globalCompositeOperation='multiply'
- drawText(canctx, '$', color, size-2,size / 2, size / 2)
- drawText(canctx, '$', color, size-2,size / 2, size / 2)
+ drawText(canctx, '$', color, size-2,size / 2, size / 2+1)
+ drawText(canctx, '$', color, size-2,size / 2, size / 2+1)
cachedGraphics[key] = can;
}
ctx.drawImage(cachedGraphics[key], Math.round(x - size / 2), Math.round(y - size / 2));
@@ -2696,6 +2695,7 @@ Click an item above to start a test run with it.
itch.io
Gitlab
Web version
+ HackerNews
v.${window.appVersion}
`
diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html
index 8782937..46a165f 100644
--- a/app/src/main/assets/index.html
+++ b/app/src/main/assets/index.html
@@ -8,17 +8,17 @@
/>
Breakout 71
-
+
-
+
-
-
+
+