Automatic deploy 28996852

This commit is contained in:
Renan LE CARO 2025-02-17 17:52:20 +01:00
parent 7b1305b581
commit b458780558
5 changed files with 60 additions and 40 deletions

View file

@ -1,37 +1,58 @@
# Breakout 71
A simple, single player, challenging arcade breakout game.
The goal is to break all the bricks of 7 levels, which catching as many coins as you can.
You have only one life, if you lose your ball you'll go back to the start
At the end of each level, you get to select an upgrade.
Break colourful bricks, catch bouncing coins and select powerful upgrades !
![screenshot](fastlane/metadata/android/en-US/images/featureGraphic.png)
[Play now](https://breakout.lecaro.me/) -
[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)
[GitLab](https://gitlab.com/lecarore/breakout71) -
[Donate](https://github.com/sponsors/renanlecaro)
## Gameplay
## TODO
- automate itch update https://itch.io/docs/butler/pushing.html
- apply a minimum speed to the ball (when 2 slower balls picked it is crawling)
- Fdroid
- easily start a test game with specific upgrades or levels (with query string or through menu)
The goal is to catch as many coins as possible during 7 levels. Coins appear when you break bricks. They fly around, bounce and roll, and you need to catch them with your puck. Your "combo" is the number of coins spawned when a brick breaks, it is displayed on your puck. Your score is displayed in the top right corner of the screen, it is the number of coins you have managed to catch since the begining of your run.
At the end of each level, you get to pick an upgrade from a random selection. Many upgrades impact your "combo". Upgrades apply to the whole run and can synergize. For example, "hot start" increases your combo greatly at the start of each level, but makes it tick down rapidly. If you combine it with "+1 ball", "piercing" and "bricks become bombs", you'll clear levels so fast that the combo will still be high when the fireworks are over and your puck will be showered by coins.
What decides how the ball flies away is only the position of the puck hit. The puck speed and incoming angle have no impact. You must delete all bricks to progress to the next level, and never drop the ball.
After clearing a level, you'll be able to pick upgrades among a small selection presented to you. They'll apply until the end of the run. A normal run lasts 7 levels, after which your score is recorded, and you can start again. Each run is different, the levels and upgrades you see will change every time, and new ones get added to the pool when you progress in the game.
The app should work offline and perform well even on low-end devices. It's very lean and does not take much storage space (Roughly 0.1MB). If the app stutters, turn on "fast mode" in the settings to render a simplified view that should be faster.
There's also an easy mode for kids (slower ball) and a color-blind mode (no color related game mechanics).
## Doing
- publish on Fdroid
## Todo
- 2 x "slower balls" is too slow on the first levels
- show total score on end screen (score added to total)
- show stats on end screen compared to other runs
- handle back bouton in menu
- more levels : famous simple games, letters, fruits, animals
## Other ideas
- perk : wrap left / right
- perk : twice as many coins after a wall bounce, twice as little otherwise
- perk : fusion reactor (gather coins in one spot to triple their value)
- perk : missing makes you loose all score of level, but otherwise multiplier goes up after each breaking
- perk : n/10 of the broken bricks respawn when the ball comes back
- perk : n% of the broken bricks respawn when the ball touches the puck
- perk : bricks take twice as many hits but drop 50% more coins
- perk : wind (puck positions adds force to coins and balls)
- perk : balls repulse coins
- missing triggers and explosive lighting strike around ball path
## maybe
- perk : n% of coins missed respawn at the top
- perk : lightning : missing triggers and explosive lighting strike around ball path
- perk : coins repulse coins (could get really laggy)
- perk : balls repulse coins
- perk : balls attract coins
- perk : twice as many coins after a wall bounce, twice as little otherwise ?
- perk : fusion reactor (gather coins in one spot to triple their value)
- perk : missing makes you loose all score of level, but otherwise multiplier goes up after each breaking
- Make a small mp4 of game which can be shown on gameover and shared. https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder
- perk : soft reset, cut combo in half instead of zero
- perk : missile goes when you catch coin
@ -61,7 +82,8 @@ At the end of each level, you get to select an upgrade.
- perk: extra kick after bouncing on puck
- perk: transparent coins
- perk: coins of different colors repulse
- 2x coins when ball goes downward ?
- perk: bricks follow game of life pattern with one opdate every second ?
- 2x coins when ball goes downward / upward, half that amount otherwise ?
- engine: Offline mode web for iphone
- engine: webgl rendering (not with sdf though, that's super slow)
@ -71,19 +93,14 @@ At the end of each level, you get to select an upgrade.
I pulled many background patterns from https://pattern.monster/
They are displayed in [patterns.html](patterns.html) for easy inclusion.
Some of the sound generating code was written by ChatGPT, and heavily
adapted to my usage over time. Some of the pixel art is taken from google
image search. I hope to replace it by my own over time.
adapted to my usage over time.
[Heart](https://www.youtube.com/watch?v=gdWiTfzXb1g)
[Sonic](https://www.deviantart.com/graystripe2000/art/Pixel-art-16x16-Sonic-936384096)
[Finn](https://at.pinterest.com/pin/finn-the-human-pixel-art--140806230775275/)
Some of the pixel art is taken from google image search results, I hope to replace it by my own over time :
[Heart](https://www.youtube.com/watch?v=gdWiTfzXb1g)
[Mushroom](https://pixelartmaker.com/art/cce4295a92035ea)
## APK version
The web app is around 50kb, compressed down to 10kb with gzip
I wanted an APK to start in fullscreen and be able to list it on fdroid and the play store.
I stated with an empty view and went to work trimming it down, with the help of that tutorial
I wanted an APK to start in fullscreen and be able to list it on fdroid and the play store. I started with an empty view and went to work trimming it down, with the help of that tutorial
https://github.com/fractalwrench/ApkGolf/blob/master/blog/BLOG_POST.md

View file

@ -11,8 +11,8 @@ android {
applicationId = "me.lecaro.breakout"
minSdk = 21
targetSdk = 34
versionCode = 28996655
versionName = "28996655"
versionCode = 28996852
versionName = "28996852"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true

View file

@ -789,7 +789,7 @@ function shouldPierceByColor(ballOrCoin, vhit, hhit, chit) {
function brickHitCheck(ballOrCoin, radius, isBall) {
// Make ball/coin bonce, and return bricks that were hit
const {x, y, previousx, previousy, hitSinceBounce} = ballOrCoin;
const {x, y, previousx, previousy} = ballOrCoin;
const vhit = hitsSomething(previousx, y, radius);
const hhit = hitsSomething(x, previousy, radius);
@ -1348,8 +1348,10 @@ function explodeBrick(index, ball, isExplosion) {
color, ...coord,
previousx: coord.x,
previousy: coord.y,
vx: ball.vx * (0.5 + Math.random()),
vy: ball.vy * (0.5 + Math.random()),
// Use previous speed because the ball has already bounced
vx: ball.previousvx * (0.5 + Math.random()),
vy: ball.previousvy * (0.5 + Math.random()),
sx: 0,
sy: 0,
weight: 0.8 + Math.random() * 0.2

View file

@ -8,14 +8,14 @@
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Breakout 71</title>
<link rel="stylesheet" href="style.css?v=28996655" />
<link rel="stylesheet" href="style.css?v=28996852" />
<link rel="icon" href="./icon.svg" />
</head>
<body>
<button id="menu"><span> menu</span></button>
<button id="score"></button>
<canvas id="game"></canvas>
<script src="levels.js?v=28996655"></script>
<script src="game.js?v=28996655"></script>
<script src="levels.js?v=28996852"></script>
<script src="game.js?v=28996852"></script>
</body>
</html>

View file

@ -32,5 +32,6 @@ rsync -avz --delete --delete-excluded --exclude="*.sh" --exclude="node_modules"
# generate zip for itch
rm -f breakout.zip
zip -j breakout.zip app/src/main/assets/*
#rm -f breakout.zip
#zip -j breakout.zip app/src/main/assets/*
butler push app/src/main/assets/ renanlecaro/breakout71:latest --userversion $versionCode