From af85e6e50f6f175658d7b82fb93d337e3faf96d0 Mon Sep 17 00:00:00 2001 From: Renan LE CARO Date: Sat, 5 Apr 2025 10:38:18 +0200 Subject: [PATCH] Trying the web archiving thing --- Readme.md | 24 +++- app/build.gradle.kts | 4 +- app/src/main/assets/index.html | 2 +- build.sh | 8 +- deploy.sh | 7 + dist/index.html | 29 +++-- .../android/en-US/images/featureGraphic.png | Bin 189762 -> 189728 bytes src/PWA/sw-b71.js | 2 +- src/data/levels.json | 121 +++++++++++++++++- src/data/version.json | 2 +- 10 files changed, 172 insertions(+), 27 deletions(-) diff --git a/Readme.md b/Readme.md index ad7477f..e8b82fd 100644 --- a/Readme.md +++ b/Readme.md @@ -16,18 +16,33 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades ! # Changelog ## To do -- translate presentation texts to french -- use fastlane for play store -- tauri + +- remove the slow mode +- ignore scores in creative mode +- add unlock conditions for levels in the form "reach high score X with perk A,B,C but without perk B,C,D" +- archive each version as an html file and apk + ## Done +- tried and cancelled native desktop app build with tauri because : + - there's no cross compilation, so no exe build on linux + - you need to sign executable differently for each platform + - the .deb and .rmp files were 3.8M for a 0.1M app + - the appimage was crazy big (100M) + - I'd need a mac to make a mac version that probably wouldn't run without doing the app store dance with apple - publish 29062687 on play store - redo video - review fastlane text ## 29062687 +- tried and cancelled webgl rendering + - it's a lot of code + - i'm not great at it + - it requires a significant rewrite + - for most things, no perf difference + - the main goal of having more colorful backgrounds can be achieved by running the lights layer at lower res - "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) @@ -161,6 +176,7 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades ! ## UX / gameplay +- translate fastlane presentation texts to french - mobile option: relative movement of the touch would be amplified and added to the puck - mobile option: don't pause on mobile when lifting finger - [obigre] Offer to level ups perks separately from picking new ones @@ -329,4 +345,4 @@ This requires recording a bit more info about each run. - missile goes when you catch coin - missile goes when you break a brick - [colin] Batteries - lvl1: recharge les pouvoirs du puck quand la balle touche le haut de l'écran (1 fois par lancer, se recharge en touchant le puck). lvl2: également après voir détruit 6 blocs. lvl3: également quand elle touche les bords de l'écran : i'll probably just let the second puck replace this - + diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3d19f26..5347eee 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -29,8 +29,8 @@ android { applicationId = "me.lecaro.breakout" minSdk = 21 targetSdk = 34 - versionCode = 29062849 - versionName = "29062849" + versionCode = 29062946 + versionName = "29062946" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html index 73861f4..4018c37 100644 --- a/app/src/main/assets/index.html +++ b/app/src/main/assets/index.html @@ -1 +1 @@ -Breakout 71 \ No newline at end of file +Breakout 71 \ No newline at end of file diff --git a/build.sh b/build.sh index 850251c..323ac0c 100755 --- a/build.sh +++ b/build.sh @@ -22,8 +22,8 @@ set -x # clear output folders first, so that they are empty for failed builds rm -rf ./build/* rm -rf ./app/src/main/assets/* -rm -rf ./app/build/outputs/apk/release/ -rm -rf ./app/build/outputs/bundle/release/ +rm -rf ./app/build/outputs/apk/release/* +rm -rf ./app/build/outputs/bundle/release/* @@ -37,8 +37,6 @@ echo "\"$versionCode\"" > src/data/version.json # Update service worker sed -i -e "s/VERSION = .*/ VERSION = '$versionCode'/" ./src/PWA/sw-b71.js - - # remove all exif metadata from pictures, because i think fdroid doesn't like that. odd find -name '*.jp*g' -o -name '*.png' | xargs exiftool -all= -overwrite_original @@ -60,3 +58,5 @@ cp build/index.html ./app/src/main/assets/ # generate signed bundle for play store ./gradlew bundleRelease + + diff --git a/deploy.sh b/deploy.sh index d77abab..fd6625b 100755 --- a/deploy.sh +++ b/deploy.sh @@ -32,3 +32,10 @@ butler push "./build/index.html" renanlecaro/breakout71:latest --userversion $ve butler push "./build/index.html" renanlecaro/breakout71:offline --userversion $versionCode butler push app/build/outputs/apk/release/app-release.apk renanlecaro/breakout71:apk --userversion $versionCode +# archive the output files +FOLDER="/opt/mup-nginx-proxy/config/html/static_sites/archive.lecaro.me/public-files/b71/$versionCode" +ssh staging "mkdir -p $FOLDER" +rsync -vz "./build/index.html" staging:$DOMAIN/b71-$versionCode.html +rsync -vz "./app/build/outputs/apk/release/app-release.apk" staging:$DOMAIN/b71-$versionCode.apk + + diff --git a/dist/index.html b/dist/index.html index 6ae3611..c54cea9 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1124,17 +1124,20 @@ async function openSettingsMenu() { } } }); - for (const key of Object.keys((0, _options.options)))if ((0, _options.options)[key]) actions.push({ - icon: (0, _options.isOptionOn)(key) ? (0, _loadGameData.icons)["icon:checkmark_checked"] : (0, _loadGameData.icons)["icon:checkmark_unchecked"], - text: (0, _options.options)[key].name, - help: (0, _options.options)[key].help, - value: ()=>{ - (0, _options.toggleOption)(key); - fitSize(); - applyFullScreenChoice(); - openSettingsMenu(); - } - }); + for (const key of Object.keys((0, _options.options))){ + if (key == "record" && "__TAURI__" in window) continue; + if ((0, _options.options)[key]) actions.push({ + icon: (0, _options.isOptionOn)(key) ? (0, _loadGameData.icons)["icon:checkmark_checked"] : (0, _loadGameData.icons)["icon:checkmark_unchecked"], + text: (0, _options.options)[key].name, + help: (0, _options.options)[key].help, + value: ()=>{ + (0, _options.toggleOption)(key); + fitSize(); + applyFullScreenChoice(); + openSettingsMenu(); + } + }); + } actions.push({ icon: (0, _loadGameData.icons)["icon:download"], text: (0, _i18N.t)("main_menu.download_save_file"), @@ -1494,7 +1497,7 @@ const upgrades = (0, _upgrades.rawUpgrades).map((u)=>({ })); },{"./data/palette.json":"ktRBU","./data/levels.json":"8JSUc","./data/version.json":"iyP6E","./upgrades":"1u3Dx","./getLevelBackground":"7OIPf","./levelIcon":"6rQoT","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"iyP6E":[function(require,module,exports,__globalThis) { -module.exports = JSON.parse("\"29062849\""); +module.exports = JSON.parse("\"29062946\""); },{}],"1u3Dx":[function(require,module,exports,__globalThis) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); @@ -2841,7 +2844,7 @@ function highScoreForMode(mode) { return ""; } -},{"./loadGameData":"l1B4x","./i18n/i18n":"eNPRm","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3","./pure_functions":"6pQh7"}],"2n0gK":[function(require,module,exports,__globalThis) { +},{"./loadGameData":"l1B4x","./i18n/i18n":"eNPRm","./pure_functions":"6pQh7","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"2n0gK":[function(require,module,exports,__globalThis) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); parcelHelpers.defineInteropFlag(exports); if ("serviceWorker" in navigator && window.location.href.endsWith("/index.html?isPWA=true")) { diff --git a/fastlane/metadata/android/en-US/images/featureGraphic.png b/fastlane/metadata/android/en-US/images/featureGraphic.png index 862175d8361a519ff5e06c0830eb3facc9aa29a6..b5a652beaaf256d27b78088c05fe147d51d56785 100644 GIT binary patch delta 18 acmX?fihIE+?g>hbF0C$%TV0s`Jplks_y{Wi delta 52 zcmZ2*iu=$h?g>hY3=E9LLGDhBH&5!+GcYi47I;J!Gca%qgD@k*tT_^mimi%_TNRo9 GKLG%Y%?_CW diff --git a/src/PWA/sw-b71.js b/src/PWA/sw-b71.js index e2fb062..61a6335 100644 --- a/src/PWA/sw-b71.js +++ b/src/PWA/sw-b71.js @@ -1,5 +1,5 @@ // The version of the cache. -const VERSION = "29062849"; +const VERSION = "29062946"; // The name of the cache const CACHE_NAME = `breakout-71-${VERSION}`; diff --git a/src/data/levels.json b/src/data/levels.json index f014a44..ced7cd4 100644 --- a/src/data/levels.json +++ b/src/data/levels.json @@ -1173,5 +1173,124 @@ "bricks": "________________tttt______tttggttt____tggggggt____t__gg__t____tllggllt___ltbyggbbtl_lbtttggtytblgyttybbtttyggggttbbtyggg_gggggggggg____gggggg___", "svg": null, "color": "" + }, + { + "name": "You are here", + "size": 13, + "bricks": "_____rrr_________rrrrr_______rrr_rrr______rr___rr______rr___rr_______rr_rr________rrrrr_________rrr__________rrr_________WWrWW_______WWWrWWW______WWWWWWW_______WWWWW____", + "svg": null, + "color": "" + }, + { + "name": "Gear", + "size": 14, + "bricks": "_________________________________l_l_l_______l_lllll_l______lllllll_____lllll_lllll____lll___lll____lll_____lll____lll___lll____lllll_lllll_____lllllll______l_lllll_l_______l_l_l__________________", + "svg": null, + "color": "" + }, + { + "name": "Play", + "size": 15, + "bricks": "_________________rrrrrrrrrrr___rrrrWWrrrrrrr__rrrrWWWrrrrrr__rrrrWWWWrrrrr__rrrrWWWWWrrrr__rrrrWWWWWWrrr__rrrrWWWWWrrrr__rrrrWWWWrrrrr__rrrrWWWrrrrrr__rrrrWWrrrrrrr___rrrrrrrrrrr_______________________________________________", + "svg": null, + "color": "" + }, + { + "name": "City", + "size": 18, + "bricks": "_____________________OO_______________OOOO_____________OOOOOO____________bbbbbb____________byybyb____________byybyb____________bbbbbb__OO________bybyyb_OOOO__kkk__bybyybOOOOOO_kkk__bbbbbbtttttt_kkk__byybybtyyyyt_kkk__byybybtyyyyt_kkk__bbbbbbtttttt__O___bybyybtytyyt__O___bybyybtttttt__O__llllllllllllllllllllllllllllllllllll", + "svg": null, + "color": "" + }, + { + "name": "Wiggle", + "size": 17, + "bricks": "__________________cccccc_ccc_cccc__c____c_c_c_c__c__ccc_cc_c_ccc_cc____c_c__c_____c___ccc_cccc_ccc_cc__c________c_c__c__ccc_ccc_cc_cccc____c_c_c_c________ccc_c_c_ccccccc__c___c_________c__ccc_ccccccccccc____c______________ccc_ccc_ccc_ccc__c___c_c_c_c_c_c__ccccc_ccc_ccc_c__________________", + "svg": null, + "color": "" + }, + { + "name": "Graph", + "size": 18, + "bricks": "_______________________yy________________yyt__yytttt______tt_tttyy___t____yyt____t_____t____yy____tt_____t____t_____t______yy___t_____t______yy__tt_____yytttttt___tt___ttyy_____t___t____t__t_____t___yytttt__t_____t___yy______tt____t____t_______yy___t____ttt_____yyttyy______tyy___t___yy_______yytttt_________________________", + "svg": null, + "color": "" + }, + { + "name": "Lightbulb", + "size": 14, + "bricks": "_______________y__yyyyy___y____yyyyyyy______yyyyyyyyy_____yyyyyyyyy___y_yyyyyyyyy__y__yyyyyyyyy_____yyyyyyyyy_____yyyBBByyy___y__yyByByy___y____yByBy_________lllll______y___lll___y_______lll______", + "svg": null, + "color": "" + }, + { + "name": "Note", + "size": 16, + "bricks": "_____________WWW__________WWWWWW_______WWWWWW__W____WWWWWW_____W____WWW________W____W__________W____W__________W____W__________W____W__________W____W________WWW____W_______WWWW____W_______WWW___WWW____________WWWW____________WWW____________________________", + "svg": null, + "color": "" + }, + { + "name": "Rocket", + "size": 13, + "bricks": "______b___________bbb_________bbBbb________btttb________ttBtt________ttttt________ttBtt________ttttt________ttBtt_______bbtttbb_____bbbyyybbb____bbbyyybbb____bb_ByB_bb__", + "svg": null, + "color": "" + }, + { + "name": "Abstract", + "size": 16, + "bricks": "________________aaaaa_cccc_aaaaaaaaaa_cccc_aaaaa________________aaaa_cccc_aaaaaaaaaa_cccc_aaaaaa________________aaa_cccc_aaaaaaaaaa_cccc_aaaaaaa________________aa_cccc_aaaaaaaaaa_cccc_aaaaaaaa________________a_cccc_aaaaaaaaaa_cccc_aaaaaaaaa________________", + "svg": null, + "color": "" + }, + { + "name": "Fingerprint", + "size": 15, + "bricks": "___SSSSSSSS______S_______SS____S__SSSSS__SS__S__S____SS__S____S__SS__SS_S___S__S_SS__S__S_S__S___SS_SS__SS_S_____S___S__S_S__SS__S__SS_S_S_SS_S__S__S_S_S_S___S_S__S_S_S_S___S_S__S___S_S___S_S__S__S__S___S_S__S__S__S__S___S_S_", + "svg": null, + "color": "" + }, + { + "name": "Leaf", + "size": 14, + "bricks": "____________________________________________________________GGkGG________GGkGGkGG_____GGkGGkGGkkG_kkkkkkkkkkkGGG__GGkGGkGGkkG____GGkGGkGG_______GGkGG_______________________________________________", + "svg": null, + "color": "" + }, + { + "name": "Abstract 2", + "size": 14, + "bricks": "______________yyyy______yyyy______________bbb_bbbbbb_bbbbb___bbbb___bbb__y__bb__y__b______________bbb_bbbbbb_bbbbb___bbbb___bbb__y__bb__y__b______________bbb_bbbbbb_bbbbb___bbbb___bbb__y__bb__y__b", + "svg": null, + "color": "" + }, + { + "name": "Abstract 3", + "size": 13, + "bricks": "______________p_aaa_ppp_a__p___a_p___a__ppp_a_p_aaa_______________aaa_p_a_ppp__a___p_a___p__a_ppp_aaa_p_______________p_aaa_ppp_a__p___a_p___a__ppp_a_p_aaa______________", + "svg": null, + "color": "" + }, + { + "name": "Abstract 4", + "size": 13, + "bricks": "______________y_y_y_y_y_y__y_y_y_y_y_y__y_y_y_y_y_y_______________bbb_bbb_bbb_______________bbb_bbb_bbb_______________y_y_y_y_y_y__y_y_y_y_y_y__y_y_y_y_y_y______________", + "svg": null, + "color": "" + }, + { + "name": "Abstract 5", + "size": 13, + "bricks": "______________ccc_ccc_ccc__c_a_c_c_a_c__caa_aaa_aac_______________cca_aaa_acc__c_a_a_a_a_c__cca_aaa_acc_______________caa_aaa_aac__c_a_c_c_a_c__ccc_ccc_ccc______________", + "svg": null, + "color": "" + }, + { + "name": "Abstract 6", + "size": 13, + "bricks": "_vvvvv_vvvvv__v___v_v___v__v_bbbbbbb_v__v_b_v_v_b_v__v_b_v_v_b_v__v_b_v_v_b_v__v_b_v_v_b_v__v_b_v_v_b_v__v_b_v_v_b_v__v_b_vvv_b_v__v_b_____b_v__vvvvvvvvvvv_bbbb_____bbbb", + "svg": null, + "color": "" } -] +] \ No newline at end of file diff --git a/src/data/version.json b/src/data/version.json index f674569..4f05244 100644 --- a/src/data/version.json +++ b/src/data/version.json @@ -1 +1 @@ -"29062849" +"29062946"