From fdccf12657b04d07b1227e3aa841addae018557b Mon Sep 17 00:00:00 2001 From: Renan LE CARO Date: Wed, 5 Mar 2025 22:16:09 +0100 Subject: [PATCH] Build and deploy of version 29020156 --- app/build.gradle.kts | 4 +- app/src/main/assets/index.html | 117 + app/src/main/assets/privacy.html | 39 + deploy.sh | 5 + dist/index.html | 3556 +----------------------------- dist/privacy.html | 39 + src/version.json | 2 +- 7 files changed, 270 insertions(+), 3492 deletions(-) create mode 100644 app/src/main/assets/index.html create mode 100644 app/src/main/assets/privacy.html create mode 100644 dist/privacy.html diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 28281c7..121042e 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 = 29019801 - versionName = "29019801" + versionCode = 29020156 + versionName = "29020156" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html new file mode 100644 index 0000000..2fda1a8 --- /dev/null +++ b/app/src/main/assets/index.html @@ -0,0 +1,117 @@ +Breakout 71 \ No newline at end of file diff --git a/app/src/main/assets/privacy.html b/app/src/main/assets/privacy.html new file mode 100644 index 0000000..f5c3d6b --- /dev/null +++ b/app/src/main/assets/privacy.html @@ -0,0 +1,39 @@ + + + + + + + Breakout 71 privacy policy + + + + + +

Privacy policy

+

+ Breakout 71 is published + by Renan LE CARO, a French citizen and programmer. You can contact me at + this adress : breakout71@lecaro.me +

+

+ If you access breakout.lecaro.me though a web browser, your IP address + will be logged on my server to prevent abuses. + My server is hosted by Hetzner + Online GmbH in germany. +

+

+ If you install the app through google play or f-droid, no information will + be collected at all by me. +

+ + diff --git a/deploy.sh b/deploy.sh index cbe5ea2..b2ef2aa 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,4 +1,9 @@ #!/bin/bash +if [[ $(node --version) != v21* ]]; then + echo "run first: nvm use v21" + exit 1 +fi + set -e set -x diff --git a/dist/index.html b/dist/index.html index 29edca7..2fda1a8 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,3539 +1,117 @@ - - - - - - - Breakout 71 - - - - - - - - - - - + `});e&&e()}function _6(_,e){return Math.sqrt(Math.pow(_.x-e.x,2)+Math.pow(_.y-e.y,2))}function _7(){return`hsl(${2*Math.round(_J/4)%360},100%,70%)`}function _8(_,e,t,r){let a=_6(_,e),l=T/2;if(a>l)return;let s=(_.x-e.x)/a,o=(_.y-e.y)/a,c=-t*(l-a)/(1.2*l)/3*Math.min(500,_J)/500;r&&(e.vx+=s*c,e.vy+=o*c),_.vx-=s*c,_.vy-=o*c,_a.push({type:"particle",duration:100,time:_J,size:y/2,color:_7(),ethereal:!0,x:_.x,y:_.y,vx:-(10*s)+_.vx+(Math.random()-.5)*2,vy:-(10*o)+_.vy+(Math.random()-.5)*2}),r&&_a.push({type:"particle",duration:100,time:_J,size:y/2,color:_7(),ethereal:!0,x:e.x,y:e.y,vx:10*s+e.vx+(Math.random()-.5)*2,vy:10*o+e.vy+(Math.random()-.5)*2})}let _9=document.createElement("canvas");const e_=_9.getContext("2d",{antialias:!1,alpha:!0});function ee(_,e){_9.width=40,_9.height=40,_.color?(e_.fillStyle=_.color,e_.fillRect(0,0,40,40)):e_.clearRect(0,0,40,40);let t=40/_.size;for(let e=0;e<_.size;e++)for(let r=0;r<_.size;r++){let a=_.bricks[r*_.size+e];a&&(e_.fillStyle=a,e_.fillRect(Math.floor(t*e),Math.floor(t*r),Math.ceil(t),Math.ceil(t)))}return`Icon for ${_.name}`}function et(){_0("record")&&r?.state==="recording"&&r?.pause()}function er(){_0("record")&&r&&(r?.stop(),r=null)}function ea(){try{if(null!==document.fullscreenElement)document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen();else{let _=document.documentElement;_.requestFullscreen?_.requestFullscreen():_.webkitRequestFullscreen&&_.webkitRequestFullscreen()}}catch(_){console.warn(_)}}_b.forEach(_=>_.icon=ee(d[_.id],_.name));const el={ArrowLeft:0,ArrowRight:0,Shift:0};function es(_,e){el[_]=e,_W=(el.ArrowRight-el.ArrowLeft)*(1+2*el.Shift)*T/50}document.addEventListener("keydown",_=>{"f"!==_.key.toLowerCase()||_.ctrlKey||_.metaKey?_.key in el&&es(_.key,1):ea()," "===_.key&&!_X&&(G?C():A(),_.preventDefault())}),document.addEventListener("keyup",_=>{if(_.key in el)es(_.key,0);else if("ArrowDown"===_.key&&document.querySelector("button:focus")?.nextElementSibling.tagName==="BUTTON")document.querySelector("button:focus")?.nextElementSibling?.focus();else if("ArrowUp"===_.key&&document.querySelector("button:focus")?.previousElementSibling.tagName==="BUTTON")document.querySelector("button:focus")?.previousElementSibling?.focus();else if("Escape"===_.key&&_Q)_Q();else if("Escape"===_.key&&G)C();else if("m"!==_.key.toLowerCase()||_X){if("s"!==_.key.toLowerCase()||_X)return;_3()}else _5();_.preventDefault()}),I(),_f(),function _(){D();let e=performance.now();if(W=T/12*(3-k.smaller_puck+k.bigger_puck),_W&&_k(R+_W),G){_J+=e-_w,_L.runTime+=e-_w,_L.max_combo=Math.max(_L.max_combo,z);let _=Math.min(4,(e-_w)/(1e3/60));_*=+!!G,_l=_l.filter(_=>!_.destroyed),Q=Q.filter(_=>!_.destroyed);let r=_r.filter(_=>_&&"black"!==_).length;if(_J>_G+1e3&&k.hot_start&&(_G=_J,S(k.hot_start,R,H-40)),r<=k.skip_last&&_r.forEach((_,e)=>{_&&_O(e,Q[0],!0)}),r||_l.length){if(G||_J){let e=!1,r=Math.round(y/2);if(_l.forEach(t=>{if(t.destroyed)return;k.coin_magnet&&(t.vx+=_*(R-t.x)/(100+Math.pow(t.y-H,2)+Math.pow(t.x-R,2))*k.coin_magnet*100);let a=1-(.03*k.viscosity+.005)*_;t.vy*=a,t.vx*=a,t.vx>7*w&&(t.vx=7*w),t.vx<-7*w&&(t.vx=-7*w),t.vy>7*w&&(t.vy=7*w),t.vy<-7*w&&(t.vy=-7*w),t.a+=t.sa,t.vy+=_*t.weight*.8;let l=Math.abs(t.sx)+Math.abs(t.sx),s=_B(t,r,_);if(t.y>H-r-20&&t.yK&&(K=Y,localStorage.setItem("breakout-3-hs",Y)),_0("basic")||_a.push({type:"particle",duration:100+50*Math.random(),time:_J,size:y/2,color:t.color,x:t.previousx,y:t.previousy,vx:(m.width-t.x)/100,vy:-t.y/100,ethereal:!0}),Date.now()-X>16&&(X=Date.now(),_j.coinCatch(t.x)),_L.score+=t.points;else t.y>m.height+r&&(t.destroyed=!0,k.compound_interest&&S(t.points*k.compound_interest,t.x,m.height-r));let o=_S(t,r,!1);k.metamorphosis&&void 0!==o&&_r[o]&&t.color!==_r[o]&&"black"!==_r[o]&&!t.coloredABrick&&(_r[o]=t.color,t.coloredABrick=!0),(void 0!==o||s)&&(t.vx*=.8,t.vy*=.8,t.sa*=.9,l>20&&!e&&(e=!0,_j.coinBounce(t.x,.2)),3>Math.abs(t.vy)&&(t.vy=0))}),Q.forEach(e=>(function(_,e){_.previousvx=_.vx,_.previousvy=_.vy;let t=1+k.telekinesis+k.ball_repulse_ball+k.puck_repulse_ball+k.ball_attract_ball;if(_R(_)&&(t+=3,_.vx+=(R-_.x)/1e3*e*k.telekinesis),_.vx*_.vx+_.vy*_.vy0?1:-1)*.02/t),k.ball_repulse_ball)for(b2 of Q)b2.x>=_.x||_8(_,b2,k.ball_repulse_ball,!0);if(k.ball_attract_ball)for(b2 of Q)b2.x>=_.x||function(_,e,t){let r=_6(_,e),a=.5*T;if(r1&&!_0("basic"))for(let e=0;e<_.hitItem?.length-1&&e.5,l=Math.random()>.5?1:-1,s=Math.random()>.5?1:-1;_a.push({type:"particle",duration:250,ethereal:!0,time:_J,size:y/2,color:r,x:q(t)+l*$/2,y:N(t)+s*$/2,vx:a?0:-l*w,vy:a?-s*w:0})}let r=_B(_,10,e);r&&(k.sides_are_lava&&r%2&&M(_.x,_.y),k.top_is_lava&&r>=2&&M(_.x,_.y+20),_j.wallBeep(_.x),_.bouncesList?.push({x:_.previousx,y:_.previousy}));let a=H-20-10;if(_.y>a&&Math.abs(_.x-R)<10+W/2&&_.vy>0){let e=Math.sqrt(_.vx*_.vx+_.vy*_.vy),t=Math.atan2(-W/2,_.x-R);_.vx=e*Math.cos(t),_.vy=e*Math.sin(t),_j.wallBeep(_.x),k.streak_shots&&M(_.x,_.y),k.respawn&&_.hitItem.slice(0,-1).slice(0,k.respawn).forEach(({index:_,color:e})=>{_r[_]||"black"===e||(_r[_]=e)}),_.hitItem=[],_.hitSinceBounce||(_L.misses++,_o++,M(_.x,_.y),_a.push({type:"text",text:"miss",duration:500,time:_J,size:30,color:"red",x:R,y:H-40})),_L.puck_bounces++,_.hitSinceBounce=0,_.sapperUses=0,_.piercedSinceBounce=0,_.bouncesList=[{x:_.previousx,y:_.previousy}]}_.y>H+10&&G&&(_.destroyed=!0,_L.balls_lost++,Q.find(_=>!_.destroyed)||(k.extra_life?(k.extra_life--,_e(),_j.revive(),C(!1),_l=[],_a.push({type:"ball",duration:500,time:_J,size:2*$,color:"white",x:_.x,y:_.y})):_C("Game Over","You dropped the ball after catching "+Y+" coins. ")));let l=_S(_,10,!0);if(void 0!==l){let e=_r[l];_O(l,_,!1),_.sapperUses1&&(_a.push({type:"particle",duration:100*_.sparks,time:_J,size:y/2,color:__,x:_.x,y:_.y,vx:(Math.random()-.5)*w,vy:(Math.random()-.5)*w}),_.sparks=0))})(e,_)),k.wind){let _=(R-(O+T/2))/T*2*k.wind;for(var t=0;t.5&&_a.push({type:"particle",duration:150,ethereal:!0,time:_J,size:y/2,color:_7(),x:P+Math.random()*E,y:Math.random()*H,vx:8*_,vy:0})}_a.forEach(e=>{"particle"===e.type&&(e.x+=e.vx*_,e.y+=e.vy*_,!e.ethereal&&(e.vy+=.5,_x(_z(e.x,e.y))&&(e.destroyed=!0)))})}}else v+1<_P()?_h(v+1):_C("Run finished with "+Y+" points","You cleared all levels for this run.");if(z>x()){let _=!_0("basic")&&(z-x())*Math.random()>5&&G&&{type:"particle",duration:100*(Math.random()+1),time:_J,size:y/2,color:"red",ethereal:!0};if(k.top_is_lava&&_&&_a.push({..._,x:P+Math.random()*E,y:0,vx:(Math.random()-.5)*10,vy:5}),k.sides_are_lava){let e=Math.random()>.5;_&&_a.push({..._,x:P+(e?0:E),y:Math.random()*H,vx:e?5:-5,vy:(Math.random()-.5)*10})}if(k.compound_interest){let e=R;do e=P+E*Math.random();while(Math.abs(e-R){let{x:e,y:t,time:r,color:a,size:l,type:s,duration:o}=_;b.globalAlpha=Math.min(1,2-(_J-r)/o*2),"particle"===s&&_V(b,a,l,e,t)});else if(b.globalCompositeOperation="source-over",b.globalAlpha=.4,b.fillStyle="#000",b.fillRect(0,0,i,n),b.globalCompositeOperation="screen",b.globalAlpha=.6,_l.forEach(_=>{_.destroyed||_F(b,_.color,2*y,_.x,_.y)}),Q.forEach(_=>{_F(b,__,40,_.x,_.y)}),b.globalAlpha=.5,_r.forEach((_,e)=>{if(!_)return;let t=q(e),r=N(e);_F(b,"black"==_?"#666":_,$,t,r)}),b.globalAlpha=1,_a.forEach(_=>{let{x:e,y:t,time:r,color:a,size:l,type:s,duration:o}=_;b.globalAlpha=Math.min(1,2-(_J-r)/o*2),"ball"===s&&_F(b,a,l,e,t),"particle"===s&&_F(b,a,3*l,e,t)}),b.globalAlpha=.2,b.globalCompositeOperation="multiply",b.fillStyle="black",b.fillRect(0,0,i,n),b.globalAlpha=.8,b.globalCompositeOperation="multiply",c.svg&&Z.width&&Z.complete){if(F.title!==c.name){F.title=c.name,F.width=m.width,F.height=m.height;let _=F.getContext("2d");_.fillStyle=c.color||"#000",_.fillRect(0,0,m.width,m.height),_.fillStyle=b.createPattern(Z,"repeat"),_.fillRect(0,0,i,n)}b.drawImage(F,0,0)}else b.fillStyle="#000",b.fillRect(0,0,i,n);b.globalAlpha=1,b.globalCompositeOperation="source-over";let g=Date.now()-J+5,u=g<200;if(u){let _=(k.bigger_explosions+1)*50/g;b.translate(Math.sin(Date.now())*_,Math.sin(Date.now()+36)*_)}b.globalCompositeOperation="source-over",function(_){b.globalAlpha=1;let e=_m(),t=z>x()&&k.picky_eater,r=T+"_"+_r.join("_")+f.complete+"_"+t+"_"+__;if(r!==_E){_E=r,_T.width=T,_T.height=T+1;let _=_T.getContext("2d");_.clearRect(0,0,T,T),_.resetTransform(),_.translate(-O,0);let a=e.black_puck?"#000":"#FFF";_r.forEach((e,r)=>{let l=q(r),s=N(r);if(!e)return;let o=__===e&&a||"black"!==e&&t&&"red"||e;(function(_,e,t,r,a){let l=Math.ceil(r-$/2),s=Math.ceil(a-$/2),o=Math.ceil(r+$/2)-1-l,c=Math.ceil(a+$/2)-1-s,i="brick"+e+"_"+t+"_"+o+"_"+c;if(!_H[i]){var n,h,m,b,y,g;let _=document.createElement("canvas");_.width=o,_.height=c;let r=_.getContext("2d");r.fillStyle=e,r.strokeStyle=t,r.lineJoin="round",r.lineWidth=2,n=r,h=1,m=1,b=o-2,y=c-2,g=2,n.beginPath(),n.moveTo(3,1),n.lineTo(h+b-g,m),n.quadraticCurveTo(h+b,m,h+b,m+g),n.lineTo(h+b,m+y-g),n.quadraticCurveTo(h+b,m+y,h+b-g,m+y),n.lineTo(h+g,m+y),n.quadraticCurveTo(h,m+y,h,m+y-g),n.lineTo(h,m+g),n.quadraticCurveTo(h,m,h+g,m),n.closePath(),r.fill(),r.stroke(),_H[i]=_}_.drawImage(_H[i],l,s,o,c)})(_,e,o,l,s),"black"===e&&(_.globalCompositeOperation="source-over",function(_,e,t,r,a){let l="svg"+e+"_"+t+"_"+e.complete;if(!_H[l]){let _=document.createElement("canvas");_.width=t,_.height=t;let r=_.getContext("2d"),a=t/Math.max(e.width,e.height),s=e.width*a,o=e.height*a;r.drawImage(e,(t-s)/2,(t-o)/2,s,o),_H[l]=_}_.drawImage(_H[l],Math.round(r-t/2),Math.round(a-t/2))}(_,f,$,l,s))})}_.drawImage(_T,O,0)}(b),b.globalCompositeOperation="screen",(_a=_a.filter(_=>_J-_.time<_.duration&&!_.destroyed)).forEach(_=>{let{x:e,y:t,time:r,color:a,size:l,type:s,text:o,duration:c,points:i}=_,n=_J-r;b.globalAlpha=Math.max(0,Math.min(1,2-n/c*2)),"text"===s?(b.globalCompositeOperation="source-over",_I(b,o,a,l,e,t-n/10)):"particle"===s&&(b.globalCompositeOperation="screen",_V(b,a,l,e,t),_F(b,a,l,e,t))}),b.globalAlpha=1,b.globalCompositeOperation="source-over",_l.forEach(_=>{_.destroyed||_Z(b,_.color,y,_.x,_.y,c.color||"black",_.a)}),_l.length>10&&!_0("basic")&&(b.globalAlpha=Math.min(.8,(_l.length-10)/50),Q.forEach(_=>{_V(b,c.color||"#000",120,_.x,_.y)})),b.globalAlpha=1,b.globalCompositeOperation="source-over";let d=c.black_puck?"#000":"#FFF";if(Q.forEach(_=>{_V(b,__,20,_.x,_.y,d),_R(_)&&(b.strokeStyle=d,b.beginPath(),b.bezierCurveTo(R,H,R,_.y,_.x,_.y),b.stroke())}),b.globalAlpha=1,b.globalCompositeOperation="source-over",k.streak_shots&&z>x()&&_$(b,"red",W,20,-2),_$(b,d,W,20),z>1){b.globalCompositeOperation="source-over";let _="x "+z,e=20*_.length/1.8+2*y,t=R-e/2;ex();b.fillStyle=p?"red":d,b.globalCompositeOperation="source-over",P?(b.fillRect(O-1,0,1,n),b.fillRect(i-O+1,0,1,n)):p&&(b.fillRect(0,0,1,n),b.fillRect(i-1,0,1,n)),k.top_is_lava&&z>x()&&(_=b,e=P,t=0,r=E,o=1,_.fillStyle="red",_.fillRect(e,0,r,1));let w=k.compound_interest&&z>x();b.fillStyle=w?"red":d,_0("mobile-mode")?(b.fillRect(P,H,E,1),G||_I(b,"Press and hold here to play",d,20,m.width/2,H+(m.height-H)/2)):w&&b.fillRect(P,H-1,E,1),u&&b.resetTransform(),!_0("record")||!G||a&&(s&&(s.drawImage(m,P,0,E,H,0,0,l.width,l.height),s.fillStyle=_m()?.black_puck?"#000":"#FFF",s.textBaseline="top",s.font="12px monospace",s.textAlign="right",s.fillText(Y.toString(),l.width-12,12),s.textAlign="left",s.fillText("Level "+(v+1)+"/"+_P(),12,12)),a.requestFrame?a.requestFrame():a.getVideoTracks()[0].requestFrame())})(),requestAnimationFrame(_),_w=e}(); \ No newline at end of file diff --git a/dist/privacy.html b/dist/privacy.html new file mode 100644 index 0000000..f5c3d6b --- /dev/null +++ b/dist/privacy.html @@ -0,0 +1,39 @@ + + + + + + + Breakout 71 privacy policy + + + + + +

Privacy policy

+

+ Breakout 71 is published + by Renan LE CARO, a French citizen and programmer. You can contact me at + this adress : breakout71@lecaro.me +

+

+ If you access breakout.lecaro.me though a web browser, your IP address + will be logged on my server to prevent abuses. + My server is hosted by Hetzner + Online GmbH in germany. +

+

+ If you install the app through google play or f-droid, no information will + be collected at all by me. +

+ + diff --git a/src/version.json b/src/version.json index 1a42c6b..7d6566e 100644 --- a/src/version.json +++ b/src/version.json @@ -1 +1 @@ -"29019801" \ No newline at end of file +"29020156"