mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-26 15:06:16 -04:00
wip
This commit is contained in:
parent
aa8d816d68
commit
0035a9abb5
7 changed files with 2124 additions and 2124 deletions
|
@ -356,8 +356,9 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
|
||||||
|
|
||||||
# Ideas and features
|
# Ideas and features
|
||||||
|
|
||||||
## Easy perks ideas
|
## Easy perk ideas
|
||||||
|
|
||||||
|
- 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" ?
|
||||||
- two for one : add a 2 for one upgrade combo to the choice lists
|
- two for one : add a 2 for one upgrade combo to the choice lists
|
||||||
|
@ -389,6 +390,7 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
|
||||||
- fan : paddle motion creates upward draft that lifts coins and balls
|
- fan : paddle motion creates upward draft that lifts coins and balls
|
||||||
|
|
||||||
## Medium difficulty perks ideas
|
## Medium difficulty perks ideas
|
||||||
|
- coins combine when they hit (into one coin with the sum of the values, but need a way to represent that)
|
||||||
- balls collision split them into 4 smaller balls, lvl times (requires rework)
|
- balls collision split them into 4 smaller balls, lvl times (requires rework)
|
||||||
- offer next level choice after upgrade pick
|
- offer next level choice after upgrade pick
|
||||||
- [colin] mirror puck - a mirrored puck at the top of the screen follows as you move the bottom puck. it helps with keeping combos up and preventing the ball from touching the ceiling. it could appear as a hollow puck so as to not draw too much attention from the main bottom puck.
|
- [colin] mirror puck - a mirrored puck at the top of the screen follows as you move the bottom puck. it helps with keeping combos up and preventing the ball from touching the ceiling. it could appear as a hollow puck so as to not draw too much attention from the main bottom puck.
|
||||||
|
|
29
dist/index.html
vendored
29
dist/index.html
vendored
File diff suppressed because one or more lines are too long
|
@ -204,7 +204,7 @@
|
||||||
"credit": ""
|
"credit": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "icon:hypnosis",
|
"name": "icon:golden_goose",
|
||||||
"size": 8,
|
"size": 8,
|
||||||
"bricks": "_bbby____bbb_y___bbby_y__y_y_y_y__y_y_y____y_y_y____y_y______y_y",
|
"bricks": "_bbby____bbb_y___bbby_y__y_y_y_y__y_y_y____y_y_y____y_y______y_y",
|
||||||
"credit": ""
|
"credit": ""
|
||||||
|
|
11
src/game.ts
11
src/game.ts
|
@ -113,6 +113,7 @@ export async function play() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function pause(playerAskedForPause: boolean) {
|
export function pause(playerAskedForPause: boolean) {
|
||||||
|
|
||||||
if (!gameState.running) return;
|
if (!gameState.running) return;
|
||||||
if (gameState.pauseTimeout) return;
|
if (gameState.pauseTimeout) return;
|
||||||
if (gameState.startParams.computer_controlled) {
|
if (gameState.startParams.computer_controlled) {
|
||||||
|
@ -457,7 +458,10 @@ export function tick() {
|
||||||
Math.max(0, ...gameState.balls.map(({ vx, vy }) => vx * vx + vy * vy)),
|
Math.max(0, ...gameState.balls.map(({ vx, vy }) => vx * vx + vy * vy)),
|
||||||
) * frames;
|
) * frames;
|
||||||
const steps = Math.ceil(maxBallSpeed / 8);
|
const steps = Math.ceil(maxBallSpeed / 8);
|
||||||
for (let i = 0; i < steps; i++) gameStateTick(gameState, frames / steps);
|
for (let i = 0; i < steps; i++) {
|
||||||
|
gameStateTick(gameState, frames / steps);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gameState.running || gameState.needsRender) {
|
if (gameState.running || gameState.needsRender) {
|
||||||
|
@ -535,11 +539,6 @@ setInterval(() => {
|
||||||
monitorLevelsUnlocks(gameState);
|
monitorLevelsUnlocks(gameState);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
window.addEventListener("visibilitychange", () => {
|
|
||||||
if (document.hidden) {
|
|
||||||
pause(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
scoreDisplay.addEventListener("click", (e) => {
|
scoreDisplay.addEventListener("click", (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
@ -28,10 +28,12 @@ export function addToTotalPlayTime(ms: number) {
|
||||||
|
|
||||||
export function gameOver(title: string, intro: string) {
|
export function gameOver(title: string, intro: string) {
|
||||||
if (!gameState.running) return;
|
if (!gameState.running) return;
|
||||||
|
|
||||||
|
// Ignore duplicated calls, can happen when ticking is split in multiple updates because the ball goes fast
|
||||||
if (gameState.isGameOver) return;
|
if (gameState.isGameOver) return;
|
||||||
|
|
||||||
gameState.isGameOver = true;
|
gameState.isGameOver = true;
|
||||||
pause(true);
|
pause(false);
|
||||||
askForPersistentStorage();
|
askForPersistentStorage();
|
||||||
stopRecording();
|
stopRecording();
|
||||||
addToTotalPlayTime(gameState.runStatistics.runTime);
|
addToTotalPlayTime(gameState.runStatistics.runTime);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -230,7 +230,7 @@
|
||||||
"unlocks.category.advanced": "## Advanced upgrades\n\nThose are typically not very useful by themselves, but will can become very powerful when combined with the right combo upgrade. ",
|
"unlocks.category.advanced": "## Advanced upgrades\n\nThose are typically not very useful by themselves, but will can become very powerful when combined with the right combo upgrade. ",
|
||||||
"unlocks.category.beginner": "## Beginner friendly upgrades\n\nThose upgrades are very helpful for beginners, they help you play longer and miss the ball less.\n",
|
"unlocks.category.beginner": "## Beginner friendly upgrades\n\nThose upgrades are very helpful for beginners, they help you play longer and miss the ball less.\n",
|
||||||
"unlocks.category.combo": "## Combo upgrades\n\nThose upgrades help increase your combo progressively, but also add a combo reset condition. Taking one is a good idea, taking more increases the risk and reward.",
|
"unlocks.category.combo": "## Combo upgrades\n\nThose upgrades help increase your combo progressively, but also add a combo reset condition. Taking one is a good idea, taking more increases the risk and reward.",
|
||||||
"unlocks.category.combo_boost": "## Combo boosters\n\nThose upgrades increase the combo or combo multiplier without adding a reset condition. ",
|
"unlocks.category.combo_boost": "## Combo booster upgrades\n\nThose upgrades increase the combo or combo multiplier without adding a reset condition. ",
|
||||||
"unlocks.category.simple": "## Helper upgrades\n\nThose upgrades are useful in almost any build.\n",
|
"unlocks.category.simple": "## Helper upgrades\n\nThose upgrades are useful in almost any build.\n",
|
||||||
"unlocks.greyed_out_help": "The grayed out upgrades can be unlocked by increasing your total score. The total score increases every time you score in game.",
|
"unlocks.greyed_out_help": "The grayed out upgrades can be unlocked by increasing your total score. The total score increases every time you score in game.",
|
||||||
"unlocks.intro": "Your total score is {{ts}}. Click an upgrade below to start a game with it.",
|
"unlocks.intro": "Your total score is {{ts}}. Click an upgrade below to start a game with it.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue