From 1b374b376585c7748f4ffa612d9fdc9699c1411e Mon Sep 17 00:00:00 2001 From: whatwareweb <59752545+whatwareweb@users.noreply.github.com> Date: Wed, 18 Jan 2023 16:31:52 -0600 Subject: [PATCH 01/92] Improve Tetris music (Korobeiniki) --- games/tetris.js | 66 ++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/games/tetris.js b/games/tetris.js index 55a44f88e1..79b4220ba1 100644 --- a/games/tetris.js +++ b/games/tetris.js @@ -59,38 +59,38 @@ const zPiece = [ let board = []; let score = 0; const music = tune` -297.029702970297: e5-297.029702970297 + c4~297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: b4-297.029702970297 + g4~297.029702970297 + c4~297.029702970297, -297.029702970297: c5-297.029702970297 + a4~297.029702970297 + d4~297.029702970297, -297.029702970297: d5-297.029702970297 + b4~297.029702970297 + c4~297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: c5-297.029702970297 + c4~297.029702970297, -297.029702970297: b4-297.029702970297 + d4~297.029702970297, -297.029702970297: a4-297.029702970297 + c4~297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: a4-297.029702970297 + f4~297.029702970297 + c4~297.029702970297, -297.029702970297: c5-297.029702970297 + a4~297.029702970297 + d4~297.029702970297, -297.029702970297: e5-297.029702970297 + c5~297.029702970297 + c4~297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: d5-297.029702970297 + c4~297.029702970297, -297.029702970297: c5-297.029702970297 + d4~297.029702970297, -297.029702970297: b4-297.029702970297 + g4~297.029702970297 + c4~297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: c5-297.029702970297 + c4~297.029702970297 + a4~297.029702970297, -297.029702970297: d5-297.029702970297 + d4~297.029702970297 + b4~297.029702970297, -297.029702970297: c4~297.029702970297 + c5~297.029702970297 + e5-297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: d5-297.029702970297 + c4~297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: a4-297.029702970297 + f4~297.029702970297 + c4~297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: a4-297.029702970297 + f4~297.029702970297 + c4~297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: c4~297.029702970297, -297.029702970297: d4~297.029702970297, -297.029702970297: c4~297.029702970297, -297.029702970297: d4~297.029702970297` +214.28571428571428: e5-214.28571428571428 + e2/214.28571428571428, +214.28571428571428: e3/214.28571428571428, +214.28571428571428: b4-214.28571428571428 + e2/214.28571428571428, +214.28571428571428: c5-214.28571428571428 + e3/214.28571428571428, +214.28571428571428: d5-214.28571428571428 + e2/214.28571428571428, +214.28571428571428: e3/214.28571428571428, +214.28571428571428: c5-214.28571428571428 + e2/214.28571428571428, +214.28571428571428: b4-214.28571428571428 + e3/214.28571428571428, +214.28571428571428: a4-214.28571428571428 + a2/214.28571428571428, +214.28571428571428: a3/214.28571428571428, +214.28571428571428: a4-214.28571428571428 + a2/214.28571428571428, +214.28571428571428: c5-214.28571428571428 + a3/214.28571428571428, +214.28571428571428: e5-214.28571428571428 + a2/214.28571428571428, +214.28571428571428: a3/214.28571428571428, +214.28571428571428: d5-214.28571428571428 + a2/214.28571428571428, +214.28571428571428: c5-214.28571428571428 + a3/214.28571428571428, +214.28571428571428: b4-214.28571428571428 + e2/214.28571428571428, +214.28571428571428: e3/214.28571428571428, +214.28571428571428: b4-214.28571428571428 + e2/214.28571428571428, +214.28571428571428: c5-214.28571428571428 + e3/214.28571428571428, +214.28571428571428: d5-214.28571428571428 + e2/214.28571428571428, +214.28571428571428: e3/214.28571428571428, +214.28571428571428: e5-214.28571428571428 + e2/214.28571428571428, +214.28571428571428: e3/214.28571428571428, +214.28571428571428: c5-214.28571428571428 + a2/214.28571428571428, +214.28571428571428: a3/214.28571428571428, +214.28571428571428: a4-214.28571428571428 + a2/214.28571428571428, +214.28571428571428: a3/214.28571428571428, +214.28571428571428: a4-214.28571428571428 + a2/214.28571428571428, +214.28571428571428: a3/214.28571428571428, +214.28571428571428: a2/214.28571428571428, +214.28571428571428: a3/214.28571428571428` let playback = playTune(music, Infinity) for (let i = 0; i < rows; i ++){ const row = []; @@ -375,5 +375,5 @@ setInterval(() => { onInput("d", () => { moveFallingPiece(0, 1) }) onInput("a", () => { moveFallingPiece(0, -1) }) onInput("s", () => { moveFallingPiece(1, 0) }) -onInput("w", () => { rotateFallingPiece() }) +onInput("l", () => { rotateFallingPiece() }) onInput("k", () => { start() }) From b3c8ec01913c7ec791b6e38ebc0217877ee3af63 Mon Sep 17 00:00:00 2001 From: TrumpetYoda <115949328+TrumpetYoda@users.noreply.github.com> Date: Mon, 6 Feb 2023 00:48:06 -0600 Subject: [PATCH 02/92] Add files via upload --- games/under_fire.js | 751 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 751 insertions(+) create mode 100644 games/under_fire.js diff --git a/games/under_fire.js b/games/under_fire.js new file mode 100644 index 0000000000..e0fe7c7a81 --- /dev/null +++ b/games/under_fire.js @@ -0,0 +1,751 @@ + /* +@title: under_fire +@author: alex_dvc +*/ + +const player = "p"; +const floor = "f"; +const space = "s"; +const damagedFloor = "d"; +const wall = "w"; +const laser = "l"; +const laserImp = "i"; +const box = "b"; +const brokenFloor = "r"; +const explosion = "e"; +const starNight = "t"; +const gun = "g"; +const blueLaser = "n"; +const controlLaser = "c"; +const engine = "a"; + +setLegend( + [ space, bitmap` +0000000000000000 +0000000000000200 +0000000000000000 +0000200000000000 +0000000000000000 +0000000000000000 +0000000020000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0002000000000000 +0000000000002000 +0000000000000000 +0000000000000000` ], + [ explosion, bitmap` +.0...........0.. +00..000.00...... +...03330330.0..0 +...03993993030.. +..039969699330.. +.039966666930... +.0396662266930.. +.03996222269930. +..0396222266930. +..039662266930.. +.0399966669930.. +..03339699930... +..030039939930.. +...0..0330330... +.0.....00.00..0. +................` ], + [ player, bitmap` +................ +.....1.......... +......0000...... +.....000775..... +...1.007775..... +...0.007775.LLL. +...0..0055...3.. +...00036000013.. +.....L030....3.. +....6L000....... +.....L000....... +......000....... +......0.0....... +......0.0....... +.....11.11...... +................` ], + [ brokenFloor, bitmap` +1111111111111111 +1222220222222221 +1202022020222021 +1220002000020221 +1200000000000021 +1200000020000021 +1220000000000221 +1200000000002201 +1222000000000021 +1220000000200221 +1200020000000021 +1200000000000021 +1220200002200021 +1202202022020221 +1222022220222021 +1111111111111111` ], + [ damagedFloor, bitmap` +1111111111111111 +1222222222222221 +1002222222222021 +1220002222220221 +1222220222222221 +1222222220222221 +1222222220222221 +1222222222022221 +1222220222022221 +1222002222222221 +1200222222222221 +1222220222220021 +1222222022002221 +1222222022222221 +1222222202222221 +1111111111111111` ], + [ controlLaser, bitmap` +1111111111111111 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222622221 +1222222222L22221 +1222222222L22221 +1222222222L22221 +1222222222L22221 +1220LLLLLLLL0221 +122L33L79L44L221 +122L33L97L4DL221 +122LLLLLLLLLL221 +122LLLLLLLLLL221 +1220LLLLLLLL0221 +1111111111111111` ], + [ floor, bitmap` +1111111111111111 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1222222222222221 +1111111111111111` ], + [ gun, bitmap` +.......77....... +......7777...... +.....177771..... +.....1.77.1..... +.....L1..1L..... +.....L1..1L..... +.....LL11LL..... +...LLLLLLLLLL... +..LL.LLLLLL.LL.. +..LLL.LLLL.LLL.. +..LL.L6556L.LL.. +..LLL.5225.LLL.. +..LL.L5225L.LL.. +.LLLL.6556.LLLL. +11LL11111111LL11 +11LL11111111LL11` ], + [ wall, bitmap` +1111111111111111 +11LLLLLLLLLLLL11 +1LCLLLLLLLLLLCL1 +1LLCLLLLLLLLCLL1 +1LLLCLLLLLLCLLL1 +1LLLLCLLLLCLLLL1 +1LLLLLCLLCLLLLL1 +1LLLLLLCCLLLLLL1 +1LLLLLLCCLLLLLL1 +1LLLLLCLLCLLLLL1 +1LLLLCLLLLCLLLL1 +1LLLCLLLLLLCLLL1 +1LLCLLLLLLLLCLL1 +1LCLLLLLLLLLLCL1 +11LLLLLLLLLLLL11 +1111111111111111` ], + [ laser, bitmap` +...9966226699... +..69966226699.6. +...9966226699... +...99662266999.. +.9.9966226699... +...9966226699... +...9966226699... +...9966226699.9. +..99966226699... +...9966226699... +...9966226699... +.6.99662266996.. +...9966226699... +...9966226699... +..99966226699.9. +...9966226699...` ], + [ laserImp, bitmap` +...9966226699.9. +.6.9966226699.9. +...9966226699... +9..9966226699..6 +9..9966226699..9 +...9966226699..9 +.6.9966226699... +.969966226699.6. +.99996622669969. +..9996622669999. +...99662666999.. +5..9966226699..5 +759.99662699..57 +575..996699.9575 +75759.9999..5757 +.75757577575757.` ], + [ blueLaser, bitmap` +...5577227755... +..75577227755.7. +...5577227755... +...55772277555.. +.5.5577227755... +...5577227755... +...5577227755... +...5577227755.5. +..55577227755... +...5577227755... +...5577227755... +.7.55772277557.. +...5577227755... +...5577227755... +..55577227755.5. +...5577227755...` ], + [ box, bitmap` +1111111111111111 +1222222222222221 +1222222222222221 +1222222222222221 +1220000000000221 +1220L333333L0221 +1220330000330221 +1220333333330221 +1220300330030221 +1220333333330221 +1220300330030221 +1220333333330221 +1220300330030221 +1220333333330221 +1220L333333L0221 +1111111111111111` ], + [ starNight, bitmap` +5555555555555555 +5555555552556565 +5556555555555655 +5555255555656565 +5555656552555555 +5500565655555555 +5500652555556555 +5000065555565555 +5000055556555505 +0000005525565500 +0000005555555000 +0000005555555000 +0000005000550000 +0000005000000000 +0000000000000000 +0000000000000000` ], + [ engine, bitmap` +................ +.............LL. +.......3333.LLLL +.....33333333LLL +...33339999333LL +..3339999999933L +.33999966669993L +339996666666699L +339996666666699L +.33999966669993L +..3339999999933L +...33339999333LL +.....33333333LLL +.......3333.LLLL +.............LL. +................` ] +); + + +setSolids([player, wall]); + +setBackground(space); + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +let level = 0; +const levels = [ + map` +................ +..............d. +................ +................ +..............b. +................ +................ +.............c.. +................ +................ +................ +................ +................ +................ +................ +.......t........`, + map` +................ +................ +................ +................ +...wwwww........ +....aww......... +....wfwwwww..... +...wwfffwffww... +..wffwwfffwffw.. +.awfffffffwbffw. +..wffwwffffffw.. +...wwfffwffww... +....wfwwwww..... +....aww......... +...wwwww........ +................` +]; + +// tunes +const melody = tune` +179.64071856287424, +179.64071856287424: g4~179.64071856287424, +179.64071856287424: c4^179.64071856287424 + g4/179.64071856287424, +179.64071856287424: g5~179.64071856287424, +179.64071856287424: d4^179.64071856287424 + g5/179.64071856287424, +179.64071856287424: g4~179.64071856287424, +179.64071856287424: c4^179.64071856287424 + g4/179.64071856287424, +179.64071856287424: e5~179.64071856287424, +179.64071856287424: e4^179.64071856287424 + e5/179.64071856287424, +179.64071856287424: g4~179.64071856287424, +179.64071856287424: d4^179.64071856287424 + g4/179.64071856287424, +179.64071856287424: c5/179.64071856287424, +179.64071856287424: b4/179.64071856287424 + c4^179.64071856287424, +179.64071856287424: a4/179.64071856287424 + c4^179.64071856287424, +179.64071856287424: g4/179.64071856287424 + d4^179.64071856287424, +179.64071856287424: g4/179.64071856287424 + e4^179.64071856287424, +179.64071856287424, +179.64071856287424: g5~179.64071856287424 + d4^179.64071856287424, +179.64071856287424: f4^179.64071856287424 + g5/179.64071856287424, +179.64071856287424: e5~179.64071856287424 + f4^179.64071856287424, +179.64071856287424: e4^179.64071856287424 + e5/179.64071856287424, +179.64071856287424: d5~179.64071856287424 + e4^179.64071856287424, +179.64071856287424: d4^179.64071856287424 + d5/179.64071856287424, +179.64071856287424: c5~179.64071856287424 + d4^179.64071856287424, +179.64071856287424: c4^179.64071856287424 + c5/179.64071856287424, +179.64071856287424: a4~179.64071856287424 + c4^179.64071856287424, +179.64071856287424: c4^179.64071856287424 + a4/179.64071856287424, +179.64071856287424: g4~179.64071856287424 + c4^179.64071856287424, +179.64071856287424: d4^179.64071856287424 + g4/179.64071856287424, +179.64071856287424: g4~179.64071856287424 + d4^179.64071856287424, +179.64071856287424: d4-179.64071856287424 + g4-179.64071856287424, +179.64071856287424: d4-179.64071856287424 + g4-179.64071856287424`; +const gameOver = tune` +535.7142857142857: b4/535.7142857142857 + c5/535.7142857142857 + f4-535.7142857142857, +535.7142857142857: b4/535.7142857142857 + a4/535.7142857142857 + e4-535.7142857142857, +535.7142857142857: a4/535.7142857142857 + g4/535.7142857142857 + d4-535.7142857142857, +535.7142857142857: g4/535.7142857142857 + f4/535.7142857142857 + c4-535.7142857142857, +14999.999999999998`; +const replenish = tune` +97.0873786407767: c5^97.0873786407767, +97.0873786407767: e5^97.0873786407767, +97.0873786407767: g5^97.0873786407767, +2815.5339805825242`; +const repair = tune` +90.6344410876133: e4^90.6344410876133, +90.6344410876133, +90.6344410876133: e4^90.6344410876133, +2628.3987915407856`; +const win = tune` +201.34228187919464: g4^201.34228187919464 + c5/201.34228187919464 + d4~201.34228187919464, +402.6845637583893, +201.34228187919464: g4^201.34228187919464 + c5/201.34228187919464 + d4~201.34228187919464, +201.34228187919464: g4^201.34228187919464 + c5/201.34228187919464 + d4~201.34228187919464, +201.34228187919464, +201.34228187919464: b4^201.34228187919464 + e5/201.34228187919464 + f4~201.34228187919464, +201.34228187919464, +201.34228187919464: b4^201.34228187919464 + e5/201.34228187919464 + f4~201.34228187919464, +201.34228187919464, +201.34228187919464: g4~201.34228187919464 + c5^201.34228187919464 + g5/201.34228187919464, +4228.187919463087`; +const melody2 = tune` +176.47058823529412: c5~176.47058823529412, +176.47058823529412: a4~176.47058823529412, +176.47058823529412: f4~176.47058823529412, +176.47058823529412: d4~176.47058823529412, +176.47058823529412: f4~176.47058823529412, +176.47058823529412: a4~176.47058823529412, +176.47058823529412: c5~176.47058823529412, +176.47058823529412: b4~176.47058823529412, +176.47058823529412: g4~176.47058823529412, +176.47058823529412: e4~176.47058823529412, +176.47058823529412: c4~176.47058823529412, +176.47058823529412: e4~176.47058823529412, +176.47058823529412: b4~176.47058823529412, +176.47058823529412: a4~176.47058823529412, +176.47058823529412: f4~176.47058823529412, +176.47058823529412: d4~176.47058823529412, +176.47058823529412: b4~176.47058823529412, +176.47058823529412: a4~176.47058823529412, +176.47058823529412: f4~176.47058823529412, +176.47058823529412: d4~176.47058823529412, +176.47058823529412: f4~176.47058823529412, +176.47058823529412: a4~176.47058823529412, +176.47058823529412: d5~176.47058823529412, +176.47058823529412: b4~176.47058823529412, +176.47058823529412: g4~176.47058823529412, +176.47058823529412: e4~176.47058823529412, +176.47058823529412: g4~176.47058823529412, +176.47058823529412: b4~176.47058823529412, +176.47058823529412: a4~176.47058823529412, +176.47058823529412: f4~176.47058823529412, +176.47058823529412: d4~176.47058823529412, +176.47058823529412: c4~176.47058823529412`; +const laserShot = tune` +153.84615384615384: e4/153.84615384615384 + d4/153.84615384615384, +4769.230769230769`; + + +// main menu screen +addText(`k to repair ->`, { + x: 2, + y: 1, + color: color`6` +}) +addText(`i to refill ->`, { + x: 2, + y: 4, + color: color`9` +}) +addText(`l to fire ->`, { + x: 2, + y: 7, + color: color`6` +}) +addText(`Play to the End!`, { + x: 2, + y: 10, + color: color`9` +}) +addText(`j to start game!`, { + x: 2, + y: 13, + color: color`6` +}) +const playback = playTune(melody2, Infinity); + + +setMap(levels[level]); + + +// changeable variables +let phase1 = false; +let phase2 = false; +let gameStart = false; +let mats = 5; +let health = 100; +let enemyHealth = 100; +let gameStop = false; +let dmgCount = 0; +let score = 0; +let fireLaser = true; +let postMisfire = false; + + + +// CONTROLS +onInput("s", () => { + if (gameStop == false) { + getFirst(player).y += 1 + } +}); + +onInput("w", () => { + if (gameStop == false) { + getFirst(player).y -= 1 + } +}); + +onInput("a", () => { + if (gameStop == false) { + getFirst(player).x -= 1 + } +}); + +onInput("d", () => { + if (gameStop == false) { + getFirst(player).x += 1 + } +}); + +onInput("i", () => { + if (gameStop == false) { + if (getFirst(player).x == getFirst(box).x && getFirst(player).y == getFirst(box).y) { + mats = 5; + playTune(replenish); + } + } +}); + +// do not worry about bug :) +onInput("k", () => { + if (gameStop == false) { + if ((tilesWith(player, damagedFloor) || tilesWith(player, brokenFloor)) && mats>0) { + let dmg = getAll(damagedFloor); + dmg.push(getFirst(brokenFloor)); + for (let i=0; i { + if (gameStop == false && fireLaser) { + if (getFirst(player).x == getFirst(controlLaser).x && getFirst(player).y == getFirst(controlLaser).y) { + playtune(laserShot); + firingMaBlue(); + } + } +}); + +onInput("j", () => { + if (level == 0 ){ + gameStart = true; + level++; + setMap(levels[level]); + addSprite(9, 9, player); + phase1 = true; + } +}); +// CONTROLS + +// FUNCTIONS + +async function firingMaBlue() { + fireLaser = false; + let ranB = Math.floor(Math.random() * 4); + if (ranB == 1) { + for (let i=0; i<6; i++) + addSprite(12, i, blueLaser); + enemyHealth -= 10; + let allLasersB = getAll(blueLaser); + await sleep(500); + for (let i = 0; i { + if (gameStop) + return; + if(phase1) { + firingMaLaser(); + if(getAll(damagedFloor).length >= 5) { + addDmg(brokenFloor); + health -= 20; + } + } +}, 2200) + +setInterval(() => { + if (gameStop) + return; + if(phase2) { + firingMaLaser(); + if(getAll(damagedFloor).length >= 5) { + addDmg(brokenFloor); + health -= 20; + } + } +}, 1100) + + + +// post stats +setInterval(() => { + if (gameStop) + return; + if (gameStart) { + clearText(); + addText(`Material: ${mats}`, { + x: 3, + y: 1, + color: color`7` + }) + addText(`HP: ${health}`, { + x: 3, + y: 3, + color: color`4` + }) + if (score >= 50) { + addText(`Enemy HP: ${enemyHealth}`, { + x: 3, + y: 14, + color: color`3` + }) + } + if (postMisfire) { + addText(`Misfire!`, { + x: 10, + y: 3, + color: color`6` + }) + } + } +}, 30) + + +// game condition check +setInterval(() => { + if(gameStop) + return; + if (health == 0) { + playback.end() + endGameBoom(); + gameStop = true; + } + if (score == 30) { + phase1 = false; + phase2 = true; + addText(`Attacks Incoming!`, { + x: 3, + y: 7, + color: color`6` + }) + } + if (score == 50) { + phase1 = true; + phase2 = false; + level++; + addText(`Laser Added!`, { + x: 4, + y: 7, + color: color`5` + }) + clearTile(5, 12); + addSprite(5, 12, controlLaser); + clearTile(12, 6); + addSprite(12, 6, gun); + } + if (enemyHealth == 0) { + gameStop = true; + clearText(); + addText(`You Win!`, { + x: 3, + y: 1, + color: color`7` + }) + addText(`Score: ${score}`, { + x: 3, + y: 3, + color: color`7` + }) + playback.end() + playTune(win); + } +}, 30); \ No newline at end of file From f8567d4bd4a0651046037ab03aa492eacf7629f3 Mon Sep 17 00:00:00 2001 From: TrumpetYoda <115949328+TrumpetYoda@users.noreply.github.com> Date: Mon, 6 Feb 2023 00:53:07 -0600 Subject: [PATCH 03/92] Add files via upload --- games/img/under_fire.png | Bin 0 -> 15161 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 games/img/under_fire.png diff --git a/games/img/under_fire.png b/games/img/under_fire.png new file mode 100644 index 0000000000000000000000000000000000000000..febe7070f831382edc6872fb37af23af284f1646 GIT binary patch literal 15161 zcmb_jcU+Ta*N(NVpIWrmK?M!978ND3WXgE!tR{dq6eTG^3_}P3ZDcQ7TaewN1_B6m z5cVdC2!Z-CVq`@22!u)y1Pn2(0AYN065Boz`;PDT{bBnUGw$cU&$-TZu5&#RXRJ;t zty5VCgTa(eeRb?>7;H5P{IUL@55X%VYaO)DYnn~iSnQMvh%%I-t&zpuCN^W!JBPdhZ<|LBYNk9jF)gQV?pMHnYRZPy86YhNKL`#Ik;i= z&CrQthjI7Up`O0wX$~8gA75XXi|QNao~sTmBrB&amMk@TnRVMQwoEXdOfLr(OT^2P z`o86bs_NxcO7p55-kPeA=|=J6s(H0)r^_!5EXqTQB^#?|hnB_6s@YfkQI68GsDYEl zG+g>URB3tDKW;CLJE-irel$(U=T1${Ee&>`U+Vk}2Kxsq#BJ6AY|@D>U{hfcRLn%a zmuGmlr?0oaPD9Vu$t}9=r>F)~safHsKcR>}XDR8@zN8wUoQwbYJ`DEr8SPat*cY;o zuH{Cq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66KkUKT{YEZA^gM3^?U4#jFSg1!3l|rwacsFI%U^XaQr9Oi7UYd*88H zvIlw;wYUb*&D`EbehGita{13qm5Gk;IPkOHprFBi(|{72x3|aW5<{{~UUw*4-zT~R QoCECCajRqbM=t#Ezf+vCA^-pY literal 0 HcmV?d00001 From 2c6f5b796223cce14c0912b5a2796dd8fffc90f6 Mon Sep 17 00:00:00 2001 From: Lima014 <121505162+Lima014@users.noreply.github.com> Date: Mon, 6 Feb 2023 09:31:29 +0100 Subject: [PATCH 04/92] Add files via upload --- games/black and white game.js | 183 ++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 games/black and white game.js diff --git a/games/black and white game.js b/games/black and white game.js new file mode 100644 index 0000000000..77451c1d53 --- /dev/null +++ b/games/black and white game.js @@ -0,0 +1,183 @@ +/* +@title: black and white game +@author: liam +*/ + +const player = "p"; +const final = "f"; +const obstacle = "o"; + +setLegend( + [ player, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0002200000022000 +0022220000222200 +0022220000222200 +0002200000022000 +0000000000000000 +0000000000000000 +0000000000000000 +0000002222000000 +0000002222000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`], + [ final, bitmap` +0000000000000000 +0222222222222220 +0200000000000020 +0202222222222020 +0202000000002020 +0202022222202020 +0202020000202020 +0202020220202020 +0202020220202020 +0202020000202020 +0202022222202020 +0202000000002020 +0202222222222020 +0200000000000020 +0222222222222220 +0000000000000000`], + [ obstacle, bitmap` +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111 +1111111111111111`] +); + +setSolids([player, obstacle]); + +let level = 0; +const levels = [ + map` +...o........ +.p.o........ +...o....oo.. +.o.ooooooooo +.o..o......o +.o..o.ooo.oo +.o..o..o...o +.o.oo..o.f.o +........o.oo +...oooo..oo. +..oo..ooooo. +..o.........`, + map` +oooo.o.o.oo...o +..o....o...o.o. +.ooo.o.oo..o... +.o..oo..o.oo.f. +oooo.o..ooo.... +o.o.oo.oo..o... +oop..o.o.o..oo. +.ooooo..o.oo.o. +o....o.oo.o.... +...ooo.o..oo... +..o..o..oo..o.. +..oo..oo.ooo.o. +.o.....oo.o....`, + map` +.....o...ooooo.... +o.o.oo.o..o....ooo +...ooo...o.oo..... +o.oo.o..o.oo...o.. +...o..oooo.o.oof.. +oooo.oo..oo.oo.... +........o..oo....o +..o..o.o.o..o.ooo. +.oo.ooo..oo..oo.o. +.o.oooo.oo....oo.o +.o.oo.oo.o..ooo..o +o.oo..o..o....o.oo +oo.o.oo.oo.o..oo.o +..o..ooo.oo..o..oo +..o.ooo.....oo..o. +.p..oo.oo..oo..o.. +...o...o..o...o...`, + map` +o.o.o.o.o...o +o.o.o.o.o.o.f +..o.ooooooooo +..o.o.o...o.o +..ooooooo...o +..o.o...o...o +.ooo..ooooooo +o.o.....o.o.o +ooooooooooooo +o.....o...o.o +oooo..ooooooo +o.o...o.o.o.o +opo.o.o.o.o.o`, + map` +......................... +......................... +......................... +...o..o..o....o.o.o..o... +...o..o..o....o.o.oo.o... +...o..o..o.oo.o.o.o.oo... +...oooo..oooooo.o.o..o... +......................... +......................... +......................... +......................... +.......ooooooooooo....... +.......o.........o....... +.......o.........o....... +.......o.........o....... +.......o....p....o....... +.......o.........o....... +.......o.........o....... +.......o.........o....... +.......ooooooooooo....... +......................... +......................... +......................... +.........................` +]; + +setMap(levels[level]); + +setPushables({ + [ player ]: [obstacle], +}); + +onInput("w", () => { + getFirst(player).y -= 1 +}); + +onInput("a", () => { + getFirst(player).x -= 1 +}); + +onInput("s", () => { + getFirst(player).y += 1 +}); + +onInput("d", () => { + getFirst(player).x += 1 +}); + + +afterInput(() => { + const tilesplayerandfinal=tilesWith(final, player); + if (tilesplayerandfinal.length > 0) {addText("you winl!"); + level += 1 + setMap(levels[level]) +} +}); \ No newline at end of file From 69317d4877e49ea092d057b418ea6cbd103dd5eb Mon Sep 17 00:00:00 2001 From: Lima014 <121505162+Lima014@users.noreply.github.com> Date: Mon, 6 Feb 2023 18:01:36 +0100 Subject: [PATCH 05/92] Update of Pusher game --- games/black and white game.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/games/black and white game.js b/games/black and white game.js index 77451c1d53..2744bfe236 100644 --- a/games/black and white game.js +++ b/games/black and white game.js @@ -1,5 +1,5 @@ /* -@title: black and white game +@title: Pusher game @author: liam */ @@ -176,8 +176,8 @@ onInput("d", () => { afterInput(() => { const tilesplayerandfinal=tilesWith(final, player); - if (tilesplayerandfinal.length > 0) {addText("you winl!"); + if (tilesplayerandfinal.length > 0) {addText("you win!!"); level += 1 setMap(levels[level]) } -}); \ No newline at end of file +}); From 948698aa01eee4a650550d2a4d0d5c1974264292 Mon Sep 17 00:00:00 2001 From: Lima014 <121505162+Lima014@users.noreply.github.com> Date: Mon, 6 Feb 2023 18:27:28 +0100 Subject: [PATCH 06/92] Update and rename black and white game.js to pusher game.js --- ...black and white game.js => pusher game.js} | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) rename games/{black and white game.js => pusher game.js} (54%) diff --git a/games/black and white game.js b/games/pusher game.js similarity index 54% rename from games/black and white game.js rename to games/pusher game.js index 2744bfe236..45cfbd5b89 100644 --- a/games/black and white game.js +++ b/games/pusher game.js @@ -78,6 +78,149 @@ const levels = [ ...oooo..oo. ..oo..ooooo. ..o.........`, + map` +.....oo..o.o +.oo..oo.o.fo +o...oo..oo.. +o..oo.o...oo +oooooo..o.o. +oooooo.o.ooo +ooopooo..... +oooooooo.ooo +oo...o.ooo.. +oo....o....o +.o.oo.o..o..`, + map` +oooo.o.o...... +.o...ooo...... +ofo.o..o...... +oo.oo.oo...... +.o.oo..o...p.. +.o.o..oo...... +.o.ooooo...... +oo.o.o.o...... +.ooo.o.o...... +.ooooooo...... +..ooo.oo...... +o.oo..oo...... +oooooooo......`, + map` +o......oo....o. +oooo.oo..oooo.. +.ooooo..oooo... +.o..oo..o..oo.. +.o...o...o.ooo. +ooof..o.o.o..o. +oo...oo...o..o. +...ooo..oo...o. +...o.oooo.o.oo. +.ooooo..oo.oo.. +o.o.o...oooo... +.oo.o..oooo.oo. +o..ooooo...oooo +oo.ooo...p.oooo`, + map` +oo..o..o.oo.o.o.. +o.......o...oof.o +ooooooo.o.o.o.... +o...o..o.o.o.oooo +...p...o....oo..o +o....oooo.oooo..o +..o..oo.ooooo.... +oo...oo.ooooo.o.o +.o...ooooo.o.o.o. +..oo.o.o.oo...ooo +ooooo.ooooo.o.... +o...oooo.oo...... +.oo..o........... +.o.oo....oo...... +.....oooo.oo.o..o +.o.o..ooooo....o. +.......ooo......o`, + map` +.............oo.... +...ooo..o.o...o...o +..o.o..ooo.o..o..fo +.............o.oooo +.o..oo....o.o..oooo +.ooo..oo.o.oo.oo..o +.o.oo.ooo.o..oo..oo +..o..o..o.o.o...oo. +..o.o.oooo.oo..ooo. +.oo.....o.oo...o.o. +.ooo..oo.ooo.oo...o +oooo.oo..oo.o.ooo.o +ooo..o..oo...oo.oo. +.o..o...o....oooooo +.o.oo..o....oo.o..o +.oo...oo...oo..o.o. +o....oo...oo..oo... +o...oo...oo..oooo.. +...oo..oooo.ooooo.. +..oo..oo...oooo...o +oo....ooooo...ooo.. +o....ooo.o.o..ooo.. +op.ooo..oo....oooo. +o.oo....oooooo..ooo`, + map` +.o....oo..oooo.. +.oo....oo.o.oo.. +o.oo.o..o.oooooo +oo.ooooooo.ooooo +o.oo..oooooooo.o +.oo.oo.oo...ooo. +ooo..o.ooooo.ooo +o..po.o.o.o.ooo. +o.o.o.o.ooo.o.f. +.......oo.o..... +..o...o.o...o..o +oo.oo..oo..ooooo +o..ooo.ooo..ooo. +.oooo.o.o..o.... +....o..ooo..oooo`, + map` +.f..........o.oo. +oooooo...oooo.... +..ooo.oo..ooo.... +oo..o..ooo.o..... +o.oooooooooooo.oo +o.ooooo.o....o.o. +oop..oo.o.o.o..o. +oooo....o.......o +....o..ooo..ooooo +ooo.....o.o.o.o.o +............oo.o. +o.o..o..oo.o.oo.. +..oo.ooo...o..ooo +.oo...oo.ooo..o.. +.o..o......o.oo.o +...o.oo.o.ooooooo +..oo..o.o.oo.o.o. +.oooo.o.o......o. +oooo.o.ooo.....o. +oo....oooo.oo...o +.o...o.oo......o.`, + map` +...oo..............oooo +..ooooooo.o.o.o........ +o.o...oooo......ooo.f.. +o.o.ooo..ooooo...oo.... +ooooo.oo.ooo.ooo...o..o +.ooo....ooooo.ooo.o..o. +.ooo....oo.oo.o...o.... +.ooo.oo.ooooooo.....o.. +.ooooo.oo...oooo..oooo. +.oooo..oo...ooo...oooo. +.o.o...o.oooo.o..oo..o. +.o.o...ooooo.....ooo... +.o.....o.oo..o.ooo..oo. +.o.p..o..o..o......oooo +.ooooo.oo..oooo.....oo. +.ooooo.o.o.o.o.o.....o. +.oo.ooo.....oo.o...ooo. +.ooo..oooo...oo.....o.. +..ooooo.ooo..oo.o.oo... +o.o..oo.oo.oo.o.o.oo.o.`, map` oooo.o.o.oo...o ..o....o...o.o. From 918c2b147d5d6b66d3374d28ab6073aeeb718740 Mon Sep 17 00:00:00 2001 From: Lima014 <121505162+Lima014@users.noreply.github.com> Date: Mon, 6 Feb 2023 19:12:14 +0100 Subject: [PATCH 07/92] Update pusher game.js --- games/pusher game.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/games/pusher game.js b/games/pusher game.js index 45cfbd5b89..06065d5579 100644 --- a/games/pusher game.js +++ b/games/pusher game.js @@ -316,6 +316,9 @@ onInput("d", () => { getFirst(player).x += 1 }); +onInput("j", () => { + setMap(levels[level]) +}); afterInput(() => { const tilesplayerandfinal=tilesWith(final, player); From ef3c6ef3081b625a903490a4f630e15b62313a36 Mon Sep 17 00:00:00 2001 From: theKnightsOfRohan <114779675+theKnightsOfRohan@users.noreply.github.com> Date: Mon, 6 Feb 2023 17:27:33 -0800 Subject: [PATCH 08/92] My game for the sprig event. Simple maze game, pretty standard. I did add an as of yet unseen(I think) tile type: warp panels. --- games/Super Maze.js | 390 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 390 insertions(+) create mode 100644 games/Super Maze.js diff --git a/games/Super Maze.js b/games/Super Maze.js new file mode 100644 index 0000000000..a36335893e --- /dev/null +++ b/games/Super Maze.js @@ -0,0 +1,390 @@ +/* +@title: Super Maze +@author: the_knights_of_rohan + +Use wasd to move and get to the present. Try to figure out what the special tiles do! +Directional tiles taken from Leonard's Coding Demo 3. +*/ + +const onewayw = "w"; +const onewayd = "d"; +const oneways = "s"; +const onewaya = "a"; +const player = "p"; +const wall = "W"; +const background = "b"; +const goal = "g"; +const lava = "l"; +const greenTeleporter = "T"; +const blueTeleporter = "t"; + +setLegend( + [player, bitmap` +................ +................ +..000000000000.. +..022222222220.. +..022222222220.. +..022002200220.. +..022002200220.. +..022222222220.. +..022222222220.. +..022222222220.. +..022000000220.. +..022222222220.. +..022222222220.. +..000000000000.. +................ +................`], + [onewayw, bitmap` +................ +..111111111111.. +.12222222222221. +.12222222222221. +..111111111111.. +..LLLLLLLLLLLL.. +.LLLLLL00LLLLLL. +.LLLLL0000LLLLL. +.LLLL000000LLLL. +.LLLLLLLLLLLLLL. +.LLLLLL00LLLLLL. +.LLLLL0000LLLLL. +.LLLL000000LLLL. +.LLLLLLLLLLLLLL. +..LLLLLLLLLLLL.. +................`], + [onewayd, bitmap` +................ +..LLLLLLLL..11.. +.LLLLLLLLLL1221. +.LLLLLLLLLL1221. +.LLLLLLLLLL1221. +.LL0LLL0LLL1221. +.LL00LL00LL1221. +.LL000L000L1221. +.LL000L000L1221. +.LL00LL00LL1221. +.LL0LLL0LLL1221. +.LLLLLLLLLL1221. +.LLLLLLLLLL1221. +.LLLLLLLLLL1221. +..LLLLLLLL..11.. +................`], + [oneways, bitmap` +................ +..LLLLLLLLLLLL.. +.LLLLLLLLLLLLLL. +.LLLL000000LLLL. +.LLLLL0000LLLLL. +.LLLLLL00LLLLLL. +.LLLLLLLLLLLLLL. +.LLLL000000LLLL. +.LLLLL0000LLLLL. +.LLLLLL00LLLLLL. +..LLLLLLLLLLLL.. +..111111111111.. +.12222222222221. +.12222222222221. +..111111111111.. +................`], + [onewaya, bitmap` +................ +..11..LLLLLLLL.. +.1221LLLLLLLLLL. +.1221LLLLLLLLLL. +.1221LLLLLLLLLL. +.1221LLL0LLL0LL. +.1221LL00LL00LL. +.1221L000L000LL. +.1221L000L000LL. +.1221LL00LL00LL. +.1221LLL0LLL0LL. +.1221LLLLLLLLLL. +.1221LLLLLLLLLL. +.1221LLLLLLLLLL. +..11..LLLLLLLL.. +................`], + [wall, bitmap` +C2CCC2CCC2CCC2CC +C2CCC2CCC2CCC2CC +C2CCC2CCC2CCC2CC +2222222222222222 +CCC2CCC2CCC2CCC2 +CCC2CCC2CCC2CCC2 +CCC2CCC2CCC2CCC2 +2222222222222222 +C2CCC2CCC2CCC2CC +C2CCC2CCC2CCC2CC +C2CCC2CCC2CCC2CC +2222222222222222 +CCC2CCC2CCC2CCC2 +CCC2CCC2CCC2CCC2 +CCC2CCC2CCC2CCC2 +2222222222222222`], + [background, bitmap` +DDDDDDCDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDCDDDD +DDCCDDDDDDDCDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDDCDDDDDDDD +DDDDDDDDDDDCDDDD +DDCDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDCCDDDDCDDD +DDCDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD`], + [goal, bitmap` +................ +.....66..66..... +....6.6..6.6.... +....6.6666.6.... +.....666666..... +.33333366333333. +.33333366333333. +.33333366333333. +.33333366333333. +.66666666666666. +.66666666666666. +.33333366333333. +.33333366333333. +.33333366333333. +.33333366333333. +................`], + [lava, bitmap` +9999999999999999 +9999999999999999 +9966999969999699 +9999999999999999 +9999999999999999 +9999999699999999 +9999999699999999 +9999699999969999 +9999999999999999 +9999999999999999 +9999999699999999 +9699999999699999 +9999999999999999 +9996699999999699 +9999999999999699 +9999999999999999`], + [greenTeleporter, bitmap` +................ +................ +................ +.....2222222.... +....22DDDDD22... +...22DDDD4DD22.. +...2DDD4DDDDD2.. +...2DDDDDDDDD2.. +...2D4D4DDD4D2.. +...2DDDDDDDDD2.. +...2DDDDDD4DD2.. +...22DD4DDDD22.. +....22DDDDD22... +.....2222222.... +................ +................`], + [blueTeleporter, bitmap` +................ +................ +................ +.....2222222.... +....225555522... +...22555575522.. +...25575555552.. +...25555555552.. +...25755557552.. +...25555555552.. +...25575555552.. +...22555575522.. +....225555522... +.....2222222.... +................ +................`], +); + +setSolids([player, wall]); +setBackground([background]); + +let level = 0; + +const levels = [ + map` +........ +......g. +.p...... +........`, + map` +pW....W... +.W.WW.W.W. +.WW.....WW +.....W.WW. +WWWW.W.... +.W.W....WW +.W....WWW. +...WW....g`, + map` +pd..W..W.. +....s..d.W +.w..a.w.W. +..W..Wd... +.sWw..W.a. +..W...a.Wg`, + map` +pW...W...l +.W.W.W.WW. +...Ws.l.d. +WW.d.a..Ww +lW.lld..Wg +.W.WWw..W. +.a.lW.lWW. +.a..a.w...`, + map` +p..Wllllll +..tWllllll +WWWWllllll +llllllllll +llllllllll +llllllWWWW +llllllWg.. +llllllW..t`, + map` +pds.lgl.Tl +wW..lsdall +..a.atda.. +Wwd.lslWW. +.sdsdwW.s. +d.lwWl.d.a +.Wl.lW.sll +TWWw.a..tl`, + map` +.......... +.......... +.......... +.......... +.......... +.....p.... +.......... +..........`, +]; + +setMap(levels[level]); + +/*Important stuff*/ +const noUp = [oneways];//Can't move up into +const noRight = [onewaya];//Can't move right into +const noDown = [onewayw];//Can't move down into +const noLeft = [onewayd];//Can't move left into +//Moving: the object that is moving. +//Dir: the direction the object is moving. (up, right, down, left) +function checkMove(moving, dir){ + if (dir === "up") { + var goal = getTile(moving.x, moving.y-1).map(x => x.type); + for (var i = 0; i < goal.length; i++) { + if (noUp.includes(goal[i])) { + return false; + } + } + return true; + } else if (dir === "right") { + var goal = getTile(moving.x+1, moving.y).map(x => x.type); + for (var i = 0; i < goal.length; i++) { + if (noRight.includes(goal[i])) { + return false; + } + } + return true; + } else if (dir === "down") { + var goal = getTile(moving.x, moving.y+1).map(x => x.type); + for (var i = 0; i < goal.length; i++) { + if (noDown.includes(goal[i])) { + return false; + } + } + return true; + } else if(dir === "left") { + var goal = getTile(moving.x-1, moving.y).map(x => x.type); + for (var i = 0; i < goal.length; i++) { + if (noLeft.includes(goal[i])) { + return false; + } + } + return true; + } +} + +/*Example*/ +onInput("w", () => { + if (checkMove(getFirst(player), "up")) { + getFirst(player).y -= 1 + } +}); +onInput("a", () => { + if (checkMove(getFirst(player), "left")) { + getFirst(player).x -= 1 + } +}); +onInput("s", () => { + if (checkMove(getFirst(player), "down")) { + getFirst(player).y += 1 + } +}); +onInput("d", () => { + if (checkMove(getFirst(player), "right")) { + getFirst(player).x += 1 + } +}); + +afterInput(() => { + if (getFirst(player).x == getFirst(goal).x && getFirst(player).y == getFirst(goal).y) { + level++; + setMap(levels[level]); + if (level == 6) { + addText("You win!", { + x: 6, + y: 5, + color: color`6`, + }); + } + } + + getAll(lava).forEach((currentLavaBlock) => { + if (currentLavaBlock.x == getFirst(player).x && currentLavaBlock.y == getFirst(player).y) { + setMap(levels[level]); + } + }); + + let teleporterMap = new Map([ + [getAll(greenTeleporter)[0], getAll(greenTeleporter)[1]], + [getAll(greenTeleporter)[1], getAll(greenTeleporter)[0]], + [getAll(blueTeleporter)[0], getAll(blueTeleporter)[1]], + [getAll(blueTeleporter)[1], getAll(blueTeleporter)[0]], + ]); + + for (let i = 0; i < getAll(greenTeleporter).length; i++) { + if (getAll(greenTeleporter)[i].x == getFirst(player).x && getAll(greenTeleporter)[i].y == getFirst(player).y) { + getFirst(player).x = teleporterMap.get(getAll(greenTeleporter)[i]).x; + getFirst(player).y = teleporterMap.get(getAll(greenTeleporter)[i]).y; + break; + } + } + + for (let i = 0; i < getAll(blueTeleporter).length; i++) { + if (getAll(blueTeleporter)[i].x == getFirst(player).x && getAll(blueTeleporter)[i].y == getFirst(player).y) { + getFirst(player).x = teleporterMap.get(getAll(blueTeleporter)[i]).x; + getFirst(player).y = teleporterMap.get(getAll(blueTeleporter)[i]).y; + break; + } + } +}); + + + + + + From a3331624eac5e7af7dc0926f3858e3ad81742554 Mon Sep 17 00:00:00 2001 From: TrumpetYoda <115949328+TrumpetYoda@users.noreply.github.com> Date: Mon, 6 Feb 2023 22:06:08 -0600 Subject: [PATCH 09/92] Update under_fire.js --- games/under_fire.js | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/games/under_fire.js b/games/under_fire.js index e0fe7c7a81..cc41be2ade 100644 --- a/games/under_fire.js +++ b/games/under_fire.js @@ -465,7 +465,7 @@ let health = 100; let enemyHealth = 100; let gameStop = false; let dmgCount = 0; -let score = 0; +let score = 49; let fireLaser = true; let postMisfire = false; @@ -473,31 +473,31 @@ let postMisfire = false; // CONTROLS onInput("s", () => { - if (gameStop == false) { + if (gameStop == false && level != 0) { getFirst(player).y += 1 } }); onInput("w", () => { - if (gameStop == false) { + if (gameStop == false && level != 0) { getFirst(player).y -= 1 } }); onInput("a", () => { - if (gameStop == false) { + if (gameStop == false && level != 0) { getFirst(player).x -= 1 } }); onInput("d", () => { - if (gameStop == false) { + if (gameStop == false && level != 0) { getFirst(player).x += 1 } }); onInput("i", () => { - if (gameStop == false) { + if (gameStop == false && level != 0) { if (getFirst(player).x == getFirst(box).x && getFirst(player).y == getFirst(box).y) { mats = 5; playTune(replenish); @@ -505,12 +505,15 @@ onInput("i", () => { } }); -// do not worry about bug :) onInput("k", () => { - if (gameStop == false) { - if ((tilesWith(player, damagedFloor) || tilesWith(player, brokenFloor)) && mats>0) { + if (gameStop == false && level != 0) { + if ((tilesWith(player, damagedFloor) || tilesWith(player, brokenFloor)) && mats > 0) { let dmg = getAll(damagedFloor); - dmg.push(getFirst(brokenFloor)); + if (tilesWith(player, brokenFloor)) { + let brokenList = getAll(brokenFloor); + for (let h=0; h { }); onInput("l", () => { - if (gameStop == false && fireLaser) { + if (gameStop == false && fireLaser && score >= 50) { if (getFirst(player).x == getFirst(controlLaser).x && getFirst(player).y == getFirst(controlLaser).y) { - playtune(laserShot); firingMaBlue(); } } @@ -549,6 +551,7 @@ async function firingMaBlue() { fireLaser = false; let ranB = Math.floor(Math.random() * 4); if (ranB == 1) { + playTune(laserShot); for (let i=0; i<6; i++) addSprite(12, i, blueLaser); enemyHealth -= 10; @@ -748,4 +751,4 @@ setInterval(() => { playback.end() playTune(win); } -}, 30); \ No newline at end of file +}, 30); From 8c84731fcaa4c2b2eacb402a3111807b5dc63d3c Mon Sep 17 00:00:00 2001 From: TrumpetYoda <115949328+TrumpetYoda@users.noreply.github.com> Date: Mon, 6 Feb 2023 22:19:26 -0600 Subject: [PATCH 10/92] Update under_fire.js --- games/under_fire.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/under_fire.js b/games/under_fire.js index cc41be2ade..67c78014ee 100644 --- a/games/under_fire.js +++ b/games/under_fire.js @@ -465,7 +465,7 @@ let health = 100; let enemyHealth = 100; let gameStop = false; let dmgCount = 0; -let score = 49; +let score = 0; let fireLaser = true; let postMisfire = false; From c374e2e733335c20e9c35e45ecd23bafb91ebda0 Mon Sep 17 00:00:00 2001 From: Lima014 <121505162+Lima014@users.noreply.github.com> Date: Tue, 7 Feb 2023 08:31:42 +0100 Subject: [PATCH 11/92] Update pusher game.js --- games/pusher game.js | 1 + 1 file changed, 1 insertion(+) diff --git a/games/pusher game.js b/games/pusher game.js index 06065d5579..dc503599d7 100644 --- a/games/pusher game.js +++ b/games/pusher game.js @@ -324,6 +324,7 @@ afterInput(() => { const tilesplayerandfinal=tilesWith(final, player); if (tilesplayerandfinal.length > 0) {addText("you win!!"); level += 1 + // increase level setMap(levels[level]) } }); From 448099a37ddc65f9d5484d4127cbc7f67116053f Mon Sep 17 00:00:00 2001 From: JHansen <47265397+UserJHansen@users.noreply.github.com> Date: Wed, 8 Feb 2023 22:15:17 +1100 Subject: [PATCH 12/92] Update Snek.js This adds 2 to the width, making it fit on the sprig screen better --- games/snek.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/games/snek.js b/games/snek.js index e64826dc93..3984d5a67d 100644 --- a/games/snek.js +++ b/games/snek.js @@ -8,7 +8,7 @@ get the fruit const head = { u: "u", d: "d", l: "l", r: "r", find: "s" }; const body = "b"; const fruit = "f"; -const background = "."; +const background = "B"; setLegend( [ @@ -174,14 +174,14 @@ setLegend( ); setBackground(background); const level = map` -........ -........ -........ -........ -..bb.f.. -........ -........ -........`; +.......... +.......... +.......... +.......... +...bb.f... +.......... +.......... +..........`; setMap(level); var path = [35, 34]; var score = 0, @@ -205,10 +205,10 @@ const render = () => { } for (const num of path) { - addSprite(num % 8, Math.floor(num / 8), body); + addSprite(num % 10, Math.floor(num / 10), body); } - addSprite(path[0] % 8, Math.floor(path[0] / 8), dir); - addSprite(path[0] % 8, Math.floor(path[0] / 8), head["find"]); + addSprite(path[0] % 10, Math.floor(path[0] / 10), dir); + addSprite(path[0] % 10, Math.floor(path[0] / 10), head["find"]); if (!running) return; clearText(); @@ -225,7 +225,7 @@ const start = () => { var tile = tilesWith(fruit, head["find"]).length; if (tile) { while (tilesWith(fruit, body).length) { - getFirst(fruit).x = Math.floor(Math.random() * 8); + getFirst(fruit).x = Math.floor(Math.random() * 10); getFirst(fruit).y = Math.floor(Math.random() * 8); } score += 1; @@ -233,20 +233,20 @@ const start = () => { switch (dir) { case "r": - if ((path[0] + 1) % 8 == 0) return die(); + if ((path[0] + 1) % 10 == 0) return die(); path.unshift(path[0] + 1); break; case "l": - if ((path[0] - 1) % 8 == 7) return die(); + if ((path[0] - 1) % 10 == 9) return die(); path.unshift(path[0] - 1); break; case "u": - if (path[0] - 8 < 0) return die(); - path.unshift(path[0] - 8); + if (path[0] - 10 < 0) return die(); + path.unshift(path[0] - 10); break; case "d": - if (path[0] + 8 > 63) return die(); - path.unshift(path[0] + 8); + if (path[0] + 10 > 10*8-1) return die(); + path.unshift(path[0] + 10); break; } @@ -287,7 +287,7 @@ onInput("d", () => { onInput("j", () => { clearText(); setMap(level); - path = [35, 34]; + path = [44, 43]; score = 0; dir = "r"; currdir = "r"; From 2c9d53f08cd997c30f12bc801c62f6d5c7ff0b8d Mon Sep 17 00:00:00 2001 From: JHansen <47265397+UserJHansen@users.noreply.github.com> Date: Wed, 8 Feb 2023 22:39:58 +1100 Subject: [PATCH 13/92] Fix Bugs Fixes the RNG and a position out of bounds bug --- games/snek.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/games/snek.js b/games/snek.js index 3984d5a67d..662c25b608 100644 --- a/games/snek.js +++ b/games/snek.js @@ -5,6 +5,10 @@ get the fruit */ +if (typeof jsr == 'number') { + jsr = 0xff +} + const head = { u: "u", d: "d", l: "l", r: "r", find: "s" }; const body = "b"; const fruit = "f"; @@ -237,7 +241,7 @@ const start = () => { path.unshift(path[0] + 1); break; case "l": - if ((path[0] - 1) % 10 == 9) return die(); + if ((path[0] - 1) % 10 == 9 || path[1] == 1) return die(); path.unshift(path[0] - 1); break; case "u": @@ -291,6 +295,7 @@ onInput("j", () => { score = 0; dir = "r"; currdir = "r"; + stop(); start(); }); From 399355db49991a508b505fe31dbd4e7bf0b52e08 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Wed, 8 Feb 2023 13:14:50 -0300 Subject: [PATCH 14/92] Rename Super Maze.js to Super_Maze.js --- games/{Super Maze.js => Super_Maze.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename games/{Super Maze.js => Super_Maze.js} (100%) diff --git a/games/Super Maze.js b/games/Super_Maze.js similarity index 100% rename from games/Super Maze.js rename to games/Super_Maze.js From e9875a91888acde111ed86326653645cc8a4b060 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Wed, 8 Feb 2023 13:19:21 -0300 Subject: [PATCH 15/92] add #781 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 83ffbcd041..d694be3d9c 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2014,5 +2014,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-02" + }, + { + "filename": "Super_Maze", + "title": "Super_Maze", + "author": "the_knights_of_rohan", + "img": "", + "tags": ["puzzle"], + "addedOn": "2023-02-08" } ] From 5c0d720dbdde27c321e826671feddc55d9453862 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Wed, 8 Feb 2023 13:31:05 -0300 Subject: [PATCH 16/92] add #778 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index d694be3d9c..e6c334daa4 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2022,5 +2022,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-08" + }, + { + "filename": "under_fire", + "title": "under_fire", + "author": "alex_dvc", + "img": "", + "tags": ["puzzle"], + "addedOn": "2023-02-08" } ] From d5c7738ac543032f00221019e4a64011bcb1065b Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Wed, 8 Feb 2023 13:42:55 -0300 Subject: [PATCH 17/92] Rename pusher game.js to pusher_game.js --- games/{pusher game.js => pusher_game.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename games/{pusher game.js => pusher_game.js} (100%) diff --git a/games/pusher game.js b/games/pusher_game.js similarity index 100% rename from games/pusher game.js rename to games/pusher_game.js From 5cea0069a8332a56e230815fa35813468d0749de Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Wed, 8 Feb 2023 13:46:48 -0300 Subject: [PATCH 18/92] add #779 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index e6c334daa4..b85470a93f 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2030,5 +2030,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-08" + }, + { + "filename": "pusher_game", + "title": "pusher_game", + "author": "liam", + "img": "", + "tags": ["puzzle"], + "addedOn": "2023-02-08" } ] From e464a485e4109458da5b5080c906ee20be688dda Mon Sep 17 00:00:00 2001 From: Johna Date: Sat, 11 Feb 2023 00:52:43 +0000 Subject: [PATCH 19/92] Add files via upload --- games/Sus_Runner.js | 243 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 games/Sus_Runner.js diff --git a/games/Sus_Runner.js b/games/Sus_Runner.js new file mode 100644 index 0000000000..200e634d88 --- /dev/null +++ b/games/Sus_Runner.js @@ -0,0 +1,243 @@ +/* +@title: Sus_Runner +@author: Johna +*/ + +const player = "p"; +const treeShort = "s"; +const treeTall1 = "t"; +const treeTall2 = "u"; +const ground1 = "g"; +const ground2 = "h"; +const dead = "d"; + +setLegend( + [player, bitmap` +....000000000... +..003333333300.. +..033333333330.. +..0333333300000. +.003333330111110 +0003333330111110 +0303333330111110 +030333333300000. +03033333333330.. +03033333333330.. +03033333333330.. +00033300003330.. +..03330.033330.. +..03330.033330.. +..03330.033330.. +..0000...0000...`], + [dead, bitmap` +................ +................ +................ +................ +.....11.111..... +.....111111..... +.......11....... +.......11....... +03033333333330.. +03033333333330.. +03033333333330.. +00033300003330.. +..03330.033330.. +..03330.033330.. +..03330.033330.. +..0000...0000...`], + [treeShort, bitmap` +......00........ +.....0440....... +.00..04440...... +0440.04440...00. +0440.04440..0440 +0440.04440..0440 +0440.04440..0440 +0440.04440..0440 +0440004440.04440 +0444404440004440 +.004404440444400 +..0040444044400. +...0004440000... +.....04440...... +.....04440...... +.....04440......`], + [treeTall1, bitmap` +04440.044440.000 +044400044440.040 +0444440444400440 +.044440444404440 +.004440444404440 +...0000444404440 +.....00444404400 +......044440000. +......044440.... +......044440.... +......044440.... +......044440.... +......044440.... +......044440.... +......044440.... +......044440....`], + [treeTall2, bitmap` +........00...... +.......0440..... +......004440.... +......044440.... +......044440.... +......044440.... +......044440.... +......044440.... +......044440.... +......044440.... +.00...044440.... +0440..044440.... +04440.044440.... +04440.044440.... +04440.044440.... +04440.044440....`], + [ground1, bitmap` +0000000000000000 +................ +.000......00.... +......0......... +..00............ +............0... +................ +................ +................ +................ +................ +................ +................ +................ +................ +................`], + [ground2, bitmap` +0000000000000000 +........0....... +................ +...00.....00.... +................ +................ +................ +................ +................ +................ +................ +................ +................ +................ +................ +................`] +) + +/*setSolids([ + player, + ground1, + ground2, + treeShort, + treeTall1, + treeTall2 +]);*/ + +const levels = [ + map` +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. +.............................. +...p.......................... +hghghghghghghghghghghghghghghg`, +]; + +setMap(levels[0]); + +addText("Press W to start", { + x: 2, + y: 6, +}) + +let started = 0; +onInput("w", () => { + if (started == 0) { + started = 1; + start(); + clearText(); + } else if (started == -1) { + clearText(); + started = 0; + setMap(levels[0]); + addText("Press W to start", { + x: 2, + y: 6, + }) + } + jump(); +}); + +function start() { + let moveTree, addTree; + let score = 0; + moveTree = setInterval(function() { + clearText(); + score += 1; + getAll(treeShort).forEach(function(e) { + e.x -= 1; + clearTile(0, 8); + }) + getAll(treeTall1).forEach(function(e) { + e.x -= 1; + clearTile(0, 8); + }) + getAll(treeTall2).forEach(function(e) { + e.x -= 1; + clearTile(0, 7); + }) + if (getTile(3, 8).length > 1 || getTile(3, 7).length > 1) { + started = -1; + clearInterval(moveTree); + clearInterval(addTree); + clearTile(3, 8); + clearTile(3, 7); + addSprite(3, 8, dead); + addText("You Died", { + x: 6, + y: 6, + }); + } + addText("" + score, { + x: 1, + y: 5, + }) + }, 100); + addTree = setInterval(function() { + setTimeout(function() { + let tree = Math.floor(Math.random() * (4 - 1) + 1); + if (tree == 1 || tree == 2) { + addSprite(29, 8, treeShort); + } else { + addSprite(29, 8, treeTall1); + addSprite(29, 7, treeTall2); + } + }, Math.floor(Math.random() * (700 - 1) + 1)) + }, 1200) +} + +function jump() { + getFirst(player).y = 7; + setTimeout(function() { + getFirst(player).y = 6; + }, 100); + setTimeout(function() { + getFirst(player).y = 7; + }, 300); + setTimeout(function() { + getFirst(player).y = 8; + }, 400); +} \ No newline at end of file From 60d16a64a3d65530464382e27145349a7d94f1e2 Mon Sep 17 00:00:00 2001 From: ahoysal <91349517+ahoysal@users.noreply.github.com> Date: Fri, 10 Feb 2023 18:08:44 -0800 Subject: [PATCH 20/92] added bannai snake --- games/bannai-snake.js | 624 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 624 insertions(+) create mode 100644 games/bannai-snake.js diff --git a/games/bannai-snake.js b/games/bannai-snake.js new file mode 100644 index 0000000000..f3ac88a16e --- /dev/null +++ b/games/bannai-snake.js @@ -0,0 +1,624 @@ +/* +@title: bannai-snake +@author: aagrim hoysal +*/ + +const player = "p" +const filled = "0"; +const unfilled = "1"; +const wall = "w"; +const goal = "g"; +const menu = "m"; +const error = "e"; + +const songs = [ tune` +468.75: f4^468.75, +468.75: a4^468.75, +468.75: a4^468.75, +468.75: e4^468.75, +468.75: a4^468.75, +468.75: a4^468.75, +468.75: d4^468.75, +468.75: a4^468.75, +468.75: a4^468.75, +468.75: c4^468.75, +468.75: c5~468.75 + c4^468.75, +468.75: e5~468.75 + e4^468.75, +468.75: f5~468.75, +468.75: a5~468.75, +468.75: a5~468.75, +468.75: e5~468.75, +468.75: a5~468.75, +468.75: a5~468.75, +468.75: d5~468.75, +468.75: a5~468.75, +468.75: a5~468.75, +468.75: c5~468.75, +468.75: d5~468.75, +468.75: e5~468.75, +468.75: f5~468.75 + f4~468.75, +468.75: a4~468.75, +468.75: c5~468.75 + f4~468.75, +468.75: a4~468.75, +468.75: f5~468.75 + f4~468.75, +468.75: a4~468.75, +468.75: a4~468.75 + f4~468.75, +468.75: a4~468.75`, tune` +329.6703296703297: f4^329.6703296703297, +329.6703296703297: a4^329.6703296703297, +329.6703296703297: a4^329.6703296703297, +329.6703296703297: e4^329.6703296703297, +329.6703296703297: a4^329.6703296703297, +329.6703296703297: a4^329.6703296703297, +329.6703296703297: d4^329.6703296703297, +329.6703296703297: a4^329.6703296703297, +329.6703296703297: a4^329.6703296703297, +329.6703296703297: c4^329.6703296703297, +329.6703296703297: c5~329.6703296703297 + c4^329.6703296703297, +329.6703296703297: e5~329.6703296703297 + e4^329.6703296703297, +329.6703296703297: f5~329.6703296703297 + f4^329.6703296703297, +329.6703296703297: a5~329.6703296703297, +329.6703296703297: a5~329.6703296703297, +329.6703296703297: e5~329.6703296703297 + e4^329.6703296703297, +329.6703296703297: a5~329.6703296703297, +329.6703296703297: a5~329.6703296703297, +329.6703296703297: d5~329.6703296703297 + d4^329.6703296703297, +329.6703296703297: a5~329.6703296703297, +329.6703296703297: a5~329.6703296703297, +329.6703296703297: c5~329.6703296703297 + c4^329.6703296703297, +329.6703296703297: d5~329.6703296703297, +329.6703296703297: e5^329.6703296703297 + e4~329.6703296703297, +329.6703296703297: f5^329.6703296703297 + f4~329.6703296703297, +329.6703296703297: a4~329.6703296703297, +329.6703296703297: c5^329.6703296703297 + f4~329.6703296703297, +329.6703296703297: a4~329.6703296703297, +329.6703296703297: f5^329.6703296703297 + f4~329.6703296703297, +329.6703296703297: a4~329.6703296703297, +329.6703296703297: f4~329.6703296703297 + a4^329.6703296703297, +329.6703296703297: a4~329.6703296703297`, tune` +333.3333333333333: f4^333.3333333333333 + f5/333.3333333333333, +333.3333333333333: a4^333.3333333333333, +333.3333333333333: a4^333.3333333333333 + d5/333.3333333333333, +333.3333333333333: e4^333.3333333333333 + g5/333.3333333333333, +333.3333333333333: a4^333.3333333333333, +333.3333333333333: a4^333.3333333333333 + a5/333.3333333333333, +333.3333333333333: d4^333.3333333333333 + f5/333.3333333333333, +333.3333333333333: a4^333.3333333333333, +333.3333333333333: a4^333.3333333333333, +333.3333333333333: c4^333.3333333333333 + g4~333.3333333333333, +333.3333333333333: c5~333.3333333333333 + c4^333.3333333333333, +333.3333333333333: e5~333.3333333333333 + f4^333.3333333333333, +333.3333333333333: f5~333.3333333333333 + f4/333.3333333333333, +333.3333333333333: a5~333.3333333333333, +333.3333333333333: a5~333.3333333333333 + a4/333.3333333333333, +333.3333333333333: e5~333.3333333333333 + e4/333.3333333333333, +333.3333333333333: a5~333.3333333333333, +333.3333333333333: a5~333.3333333333333 + a4/333.3333333333333, +333.3333333333333: d5~333.3333333333333 + c5/333.3333333333333 + d4^333.3333333333333, +333.3333333333333: a5~333.3333333333333, +333.3333333333333: a5~333.3333333333333, +333.3333333333333: c5~333.3333333333333 + c4^333.3333333333333, +333.3333333333333: d5~333.3333333333333, +333.3333333333333: e5^333.3333333333333 + e4~333.3333333333333, +333.3333333333333: f5^333.3333333333333 + f4~333.3333333333333 + d5/333.3333333333333, +333.3333333333333: a4~333.3333333333333, +333.3333333333333: c5^333.3333333333333 + f4~333.3333333333333 + d5/333.3333333333333, +333.3333333333333: a4~333.3333333333333 + c5/333.3333333333333, +333.3333333333333: f5^333.3333333333333 + f4~333.3333333333333 + a4/333.3333333333333, +333.3333333333333: a4~333.3333333333333 + c5/333.3333333333333, +333.3333333333333: f4~333.3333333333333 + a4^333.3333333333333 + f5/333.3333333333333, +333.3333333333333: a4~333.3333333333333`, tune` +258.62068965517244: f4^258.62068965517244 + f5/258.62068965517244 + c5~258.62068965517244, +258.62068965517244: a4^258.62068965517244 + d5~258.62068965517244, +258.62068965517244: a4^258.62068965517244 + d5/258.62068965517244, +258.62068965517244: e4^258.62068965517244 + g5/258.62068965517244 + b4~258.62068965517244, +258.62068965517244: a4^258.62068965517244 + d5~258.62068965517244, +258.62068965517244: a4^258.62068965517244 + a5/258.62068965517244 + d5~258.62068965517244, +258.62068965517244: d4^258.62068965517244 + f5/258.62068965517244 + a4~258.62068965517244, +258.62068965517244: a4^258.62068965517244 + d5~258.62068965517244, +258.62068965517244: a4^258.62068965517244 + d5~258.62068965517244, +258.62068965517244: c4^258.62068965517244 + g4~258.62068965517244, +258.62068965517244: c5~258.62068965517244 + c4^258.62068965517244, +258.62068965517244: e5~258.62068965517244 + e4^258.62068965517244, +258.62068965517244: f5~258.62068965517244 + f4/258.62068965517244, +258.62068965517244: a5~258.62068965517244 + a4^258.62068965517244, +258.62068965517244: a5~258.62068965517244 + a4/258.62068965517244, +258.62068965517244: e5~258.62068965517244 + e4/258.62068965517244, +258.62068965517244: a5~258.62068965517244 + a4^258.62068965517244, +258.62068965517244: a5~258.62068965517244 + a4/258.62068965517244, +258.62068965517244: d5~258.62068965517244 + c5/258.62068965517244 + d4^258.62068965517244, +258.62068965517244: a5~258.62068965517244 + a4^258.62068965517244, +258.62068965517244: a5~258.62068965517244 + a4^258.62068965517244, +258.62068965517244: c5~258.62068965517244 + c4^258.62068965517244, +258.62068965517244: d5~258.62068965517244, +258.62068965517244: e5^258.62068965517244 + e4~258.62068965517244, +258.62068965517244: f5^258.62068965517244 + f4~258.62068965517244 + d5/258.62068965517244, +258.62068965517244: a4~258.62068965517244, +258.62068965517244: c5^258.62068965517244 + f4~258.62068965517244 + d5/258.62068965517244, +258.62068965517244: a4~258.62068965517244 + c5/258.62068965517244, +258.62068965517244: f5^258.62068965517244 + f4~258.62068965517244 + a4/258.62068965517244, +258.62068965517244: a4~258.62068965517244 + c5/258.62068965517244, +258.62068965517244: f4~258.62068965517244 + a4^258.62068965517244 + f5/258.62068965517244, +258.62068965517244: a4~258.62068965517244` ] + +setLegend( + [ wall, bitmap` +6666666666666666 +6.............66 +6.............66 +6.............66 +6.............66 +6.............66 +6.............66 +6.............66 +6.............66 +6.............66 +6.............66 +6.............66 +6.............66 +6.............66 +6666666666666666 +6666666666666666` ], + [ error, bitmap` +3333333333333333 +33............33 +3.3..........3.3 +3..3........3..3 +3...3......3...3 +3....3....3....3 +3.....3..3.....3 +3......33......3 +3......33......3 +3.....3..3.....3 +3....3....3....3 +3...3......3...3 +3..3........3..3 +3.3..........3.3 +33............33 +3333333333333333` ], + + [ player, bitmap` +2222222222222222 +2222222222222222 +2292929992929292 +2292929292929292 +2292929292929292 +2292929292929292 +2299929292929292 +2222929292929292 +2292929292929292 +2222929292929292 +2292929292929292 +2292929292929292 +2292929292929222 +2299929992999292 +2222222222222222 +2222222222222222` ], + [ filled, bitmap` +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222 +2222222222222222` ], + [ unfilled, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000` ], + + [ menu, bitmap` +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH` ], + [ goal, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000660000000 +0000000660000000 +0000006666000000 +0006666666666000 +0000666666660000 +0000006666000000 +0000066666600000 +0000666006660000 +0000660000660000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000` ] +) + + +setSolids([player, wall, menu]) + +const tutorial = 3; + +// Music +let track = 0; +let playback = playTune(songs[0], Infinity); + +let reset = false; +let level = 0; +let levelData = {}; +const levels = [ + // Title screen + { + "map" : map` +mmmmmmmmmm +m11111111m +m11111111m +m11111111m +m11111111m +m11111111m +m11111111m +mmmmmmmmmm`, + "title" : [ + [6, "BANNAI SNAKE"], + [9, "press j"], + [10, "to advance"] + ], + "music" : 0 + }, + // Line tutorial + { + "map" : map` +mmmmmmmmmm +mmmmmmmmmm +0000000111 +1111010000 +0000000110 +1001111111 +mmmmmmmmmm +mmmmmmmmmm`, + "title" : [ + [1, "all paths must"], + [2, "be one tile thick"], + [13, "to be valid"], + [14, "(black paths too!)"], + ], + "add" : [ + [1, 5, error], + [1, 4, error], + [2, 5, error], + [2, 4, error], + [8, 4, error], + [7, 4, error], + [8, 5, error], + [7, 5, error], + ], + "music" : 0 + }, + // Diagonals tutorial + { + "map" : map` +mmmmmmmmmm +mmmmmmmmmm +0000010000 +1011010101 +1010101101 +0000100000 +mmmmmmmmmm +mmmmmmmmmm`, + "title" : [ + [1, "lines can't"], + [2, "touch diagonally"], + [13, "but can touch"], + [14, "at a right angle"] + ], + "add" : [ + [3, 4, error], + [4, 3, error], + [5, 4, error], + [6, 3, error] + ], + "music" : 0 + }, + // Controls tutorial + { + "map" : map` +mmmmmmmmmm +mmmmmmmmmm +mmmmmmmmmm +mmmm01mmmm +mmmmp0mmmm +mmmmmmmmmm +mmmmmmmmmm +mmmmmmmmmm`, + "title" : [ + [1, "you can double back"], + [2, "from where you came"], + [3, "(you can move up"], + [4, "or right from here)"], + [10, "the entire board"], + [11, "must follow the"], + [12, "previous two rules"], + [13, "wasd to move"], + [14, "j to reset"] + ], + "music" : 0 + }, + // Blank Canvas (L1) + { + "map" : map` +1111 +1111 +1111 +111g +mmmm`, + "add" : [ [0, 0, player] ], + "title" : [ + [14, "blank canvas"] + ], + "text" : [ + [13, "remember you"], + [14, "can double back"], + [15, "on yourself!"], + ], + "music" : 0 + }, + // Solid Gold (L2) + { + "map" : map` +11111 +11111 +11111 +01101 +1111g +mmmmm`, + "add" : [ + [0, 0, player], + [0, 3, wall], + [1, 3, wall], + [3, 3, wall] + ], + "title" : [ + [14, "solid gold"] + ], + "text" : [ + [14, "sorry, try"], + [15, "again!"], + ], + "music" : 1 + }, + // Get Forked (L3) + { + "map" : map` +101101 +11111g +111110 +111111 +111110 +mmmmmm`, + "add" : [ + [0, 0, player], + [1, 0, wall], + [4, 0, wall], + [2, 1, wall], + [1, 2, wall], + [5, 2, wall], + [3, 3, wall], + [0, 4, wall], + [5, 4, wall] + ], + "title" : [ + [14, "get forked"] + ], + "text" : [ + [13, "this one's"], + [14, "tricky, retrace"], + [15, "your steps"], + ], + "music" : 2 + }, + // Sprout (L4) + { + "map" : map` +111111 +111101 +111111 +111111 +011111 +11110g +mmmmmm`, + "add" : [ + [2, 3, player], + [0, 0, wall], + [0, 3, wall], + [0, 4, wall], + [0, 5, wall], + [1, 1, wall], + [1, 4, wall], + [3, 1, wall], + [4, 1, wall], + [4, 2, wall], + [4, 5, wall] + ], + "title" : [ + [14, "sprout"] + ], + "text" : [ + [13, "think about"], + [14, "forbidden"], + [15, "squares"], + ], + "music" : 3 + }, +]; + +initialize(level) + +function initialize(levelIndex) { + levelData = levels[levelIndex]; + setMap(levelData["map"]); + + if (levelData["add"] != null) { + for (let i = 0; i < levelData["add"].length; i++) { + addSprite(levelData["add"][i][0], levelData["add"][i][1], levelData["add"][i][2]) + } + } + + switchSongs(levelData["music"]); + drawText("title") +} + +function switchSongs(to) { + if (track == to) { + return; + } + + track = to; + playback.end(); + playback = playTune(songs[to], Infinity); +} + +function drawText(str) { + clearText(); + let text = levelData[str]; + if (text != null) { + for (let i = 0; i < text.length; i++) { + addText(text[i][1], {y: text[i][0], color: color`4`}) + } + } +} + +onInput("w", () => { + let p = getFirst(player); + if (p != null) { + drawAt(p) + p.y -= 1 + } +}); +onInput("a", () => { + let p = getFirst(player); + if (p != null) { + drawAt(p) + p.x -= 1 + } +}); +onInput("s", () => { + let p = getFirst(player); + if (p != null) { + drawAt(p) + p.y += 1 + } +}); +onInput("d", () => { + let p = getFirst(player); + if (p != null) { + drawAt(p) + p.x += 1 + } +}); +onInput("j", () => { + reset = true; +}); + +function drawAt(p) { + addSprite(p.x, p.y, filled); +} + +function isValid() { + // we check each 2x2 grid to see if either of the two exist: + // xx || xy + // xx || yx + for (let y = 0; y < height()-2; y++) { + for (let x = 0; x < width()-1; x++) { + let tl = isFilled(x, y); + let tr = isFilled(x+1, y); + if (tl == isFilled(x+1, y+1) && tr == isFilled(x, y+1)) { + addSprite(x, y, error); + addSprite(x+1, y, error); + addSprite(x+1, y+1, error); + addSprite(x, y+1, error); + return [false, (tl == tr ? "path too thick" : "diagonal") ] + } + } + } + return [true, "good job!"] +} + +function isFilled(x, y) { + let t = getTile(x, y); + for (let i = 0; i < t.length; i++) { + let tp = t[i].type; + if (tp == filled || tp == player) { + return true + } + } + return false +} + +afterInput(() => { + if (level <= tutorial || reset) { + if (level <= tutorial) { + level++; + } + reset = false; + initialize(level); + return; + } + + let p = getFirst(player); + let g = getFirst(goal); + if (p.x == g.x && p.y == g.y) { + reset = true; + let valid = isValid(); + if (valid[0]) { + clearText(); + + if (level >= levels.length - 1) { + addText("thanks for", {y: 7, color: color`4`}) + addText("playing! press", {y: 8, color: color`4`}) + addText("any to restart", {y: 9, color: color`4`}) + level = -1; + return; + } + + addText("good job!", {y: 7, color: color`4`}) + addText("press anything", {y: 8, color: color`4`}) + addText("to continue", {y: 9, color: color`4`}) + level++; + + } else { + drawText("text"); + addText(valid[1], {y: 7, color: color`F`}); + } + } +}); From 77cf7364db0db0cda14312a8fd0e17d4d539515a Mon Sep 17 00:00:00 2001 From: ahoysal <91349517+ahoysal@users.noreply.github.com> Date: Fri, 10 Feb 2023 18:12:47 -0800 Subject: [PATCH 21/92] added thumbnail --- games/img/bannai-snake.png | Bin 0 -> 41064 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 games/img/bannai-snake.png diff --git a/games/img/bannai-snake.png b/games/img/bannai-snake.png new file mode 100644 index 0000000000000000000000000000000000000000..9069f1aaf0a5ce82bfa3e91f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;eMpGePJ&b9KOP zV@p6axkKq75$1)BPr{F%-*W*;bic6{eaH8udFdRRS=j{I^Y{rkQcA|lEQF!B1 z07`<#r{Hg~PxxQ33LrZ3{Is+t-_abVG`=FffWtT_eMQT0z3^2*{14O%9TW)v4*tVa zrn-Z<(*M=Jl=K8`s5V@cAVSMj7CKO9rO(*2C%$N3P_nz?uaa5+(!RTa_PrZ^>_;UC zN^6*>v+;@-YIg?S?_uGsf2ms?A8>5PWE}sF+8mmg&A!JOyEFc|&q8qCL*bm#1^?<3 z6jEmBg!})i&m+LbIpQV!uGUu5(j}nTx8BSA*P#A;2OWXVj5Pcwc#&LJJu?e3O*VhjxH6 zfFFz_r_4v?iP>~z3SRjRoDl~*#J>04NgAJd`A9o~H*|%k>R0mQ&*}1k2C|B;Tj!tn znRVZ+DUE@&y<r;Th@|4jP*yYo%H&@)Fb{-XjftdhZ`68zvhV|)*N zl^K0E`hJjk_seYZ< zy<+SsAYUF#|9QYfRa>rUQKf>Z2I#7KE5v_cBV3(C?*pTe%T%l+wHTq6{kJB=)vw4H znaWDtPEZY4;#Iy6j`)3dNXlns?Mrw>mY=2zK$Aluu#tDZ>Su7uKIrzblk!Cr4o(@R z!v^p?sv3pw7R3*znk#qt{Pf+?F<%~BVL1GZCu@ii;Rmcndy;sPPCDjsWaht&WW(B- g!!o*zM^&gHbBQNzt?qKv0zX?_JzR=6?MwW>0B1h#yZ`_I literal 0 HcmV?d00001 From d27f41161ea696ff0a18f3c4d753d92dcaab4af6 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Fri, 10 Feb 2023 23:22:48 -0300 Subject: [PATCH 22/92] add #783 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index b85470a93f..7e40b9edf2 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2038,5 +2038,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-08" + }, + { + "filename": "Sus_Runner", + "title": "Sus_Runner", + "author": "Johna", + "img": "", + "tags": ["endless"], + "addedOn": "2023-02-10" } ] From a7923c3751adfbe60d62bc4ee3ace57bd141949c Mon Sep 17 00:00:00 2001 From: Raghav Halan <102859002+agentblack-6000@users.noreply.github.com> Date: Sat, 11 Feb 2023 17:23:18 +0530 Subject: [PATCH 23/92] Add files via upload --- games/rescue_leo.js | 305 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 305 insertions(+) create mode 100644 games/rescue_leo.js diff --git a/games/rescue_leo.js b/games/rescue_leo.js new file mode 100644 index 0000000000..0eba376598 --- /dev/null +++ b/games/rescue_leo.js @@ -0,0 +1,305 @@ +/* +@title: rescue_leo +@author: agentblack_6000 + + +A game to spread awarness about sea turtles, perhaps switch to reusable +mugs the next time you go to Starbucks :) + +Leo, the sea turtle needs to reach the goal tile without hitting any trash. +Using WASD controls, navigate to the goal tile without choking on plastic. + +Potential upgrades(I'm new to JS, consider a PR!) +- Moving trash +- Main menu screen +- Congratulations text + +*/ + +const player = "p"; +const backgroundColor = "b"; +const soda_can = "t"; +const plastic_bottle = "q"; +const plastic_rings = "r"; +const goal = "g"; + +setLegend( + [ player, bitmap` +................ +................ +................ +................ +................ +................ +................ +..DDDDDDDDD..... +.D44DDDDD44D.... +.D44D444D44D.444 +.DDDDD44DDDD.040 +.DD44DDDD44D4444 +.DDDDDDDDDDD4444 +.44.44.44.44.... +.44.44.44.44.... +................`], + [ backgroundColor, bitmap` +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777 +7777777777777777`], + [ soda_can, bitmap` +................ +................ +................ +......333....... +.....33333...... +....3333223..... +...332233223.... +..33333232233... +.3333233233333.. +3323232322333... +3233323323233... +332233332233.... +.3332333333..... +..32333333...... +...333333....... +....3333........`], + [ plastic_bottle, bitmap` +................ +................ +.......000...... +.......000...... +......22222..... +....222222222... +...22222222222.. +...22222222222.. +...55555555555.. +...22222222222.. +...222222222222. +...555555555552. +...222222222222. +...22222222222.. +...55555555555.. +...22222222222..`], + [ plastic_rings, bitmap` +................ +................ +................ +.0000.0000.0000. +.0..000..000..0. +.0..000..000..0. +.0000.0000.0000. +..00...00...00.. +.0000.0000.0000. +.0..000..000..0. +.0..000..000..0. +.0000.0000.0000. +................ +................ +................ +................`], + [ goal, bitmap` +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333`], +); + +setSolids([]); +setBackground(backgroundColor); + +// Levels +let level = 0; +const levels = [ + map` +............. +............. +..bbbbbbbb... +..bbbbbbbb... +..bbbbbbbb... +..bbbbbbbb... +..bbbbbbbb..g +..tbbbbqbb... +..bpbbbtbb..r +..bbbbbrbq... +.t..........t +....t....r...`, + map` +gbbrbbbq +bbbbtbbb +btbbbbtb +bbbqbqbb +bqbtbbbb +trbbbbrb +bbbbbbbb +bbbrtbbp`, + map` +bbbbrbbg +tqbtbrbb +btqqqbbb +btbtbbrb +rbbbbbbq +rbbrbqtq +bbttqbqb +pbbtqbtq`, + map` +bbbrrrrqbbbg +brbbqqqqqqbb +brtbttrqqqbb +brtbbbttbbbb +bqbbqbbbbqbb +btqqbrqbbbtq +btbbbrbbbbtb +bbbbbrrbbttb +bbbbbbbbrbbb +brrbqbbbbbrb +bbrrqbbtbbrr +pbbbbbbbbbrr`, + map` +bqbbbbbbbbg +bbbqbrqrrbb +qbrttrrbtrb +qbrrbtrrbbb +qbbrbbbbbrr +qrbbbbtqrrr +brbbrbrrrrr +brbtqbbbbbr +brbqqrrbtqr +bbbrrbbbrrr +pbbbbbqqqrb`, + map` +btttrrrttbtbb +ttbbbbrrqttbg +ttrbrbbqqqtbt +tbrbrtbbqqrbt +bttbrtbbrrbbt +bttbbrrbrbbbr +bttqbrrbbbttt +tbbbbrrbrtrtr +rbbrttrbtttrt +bbrtttrbtrrbt +bbrtttrbrrrrt +bbbrtqbbrbbrr +bpbbbbbtttbrt`, + map` +bbbttbbqtbbbbg +trrrrrqtbbttqq +tbbbbbrbbqtbtb +tbrrrbtbtqrttt +qbbbrbtbtqtttb +qqbbrbtbtrbbtt +btbttbrbttqbrb +btbqtbbbbbbqtt +ttbbbrrbrtbtqt +rbbqtttbtqbrtb +bbrrbbbbtqbbbt +bbrqtttbrqtrtt +bbbqtqtttqqqrq +bpbbbbbrtttqtt`, + map` +bqrqqqttrbtbtbg +rbtttqtbtbtbtbb +bttrrrtrrrrbttb +ttbbrtqqbbbbbbb +ttrbrbbbbqrbrtb +ttrbrrrtbttbqrt +bttbtqbrrrtbttr +rrrbbbbbbbbbqtt +bttqbqrtbbrtrrb +tbbbbbqrrbttrrr +rbbrtbrttbtqqrr +bbrttbrbtbbbtbq +bbrttrqrrrrttrq +bbbrtqbbrbbrtrt +bpbbbbqtttbrrrq`, +]; + +setMap(levels[level]); +addText("Using WASD, reach", {x: 2, y: 2, color: color`5`}); +addText("the goal tile", {x: 2, y: 3, color: color`5`}); +addText("without touching", {x: 2, y: 4, color: color`5`}); +addText("the trash!", {x: 2, y: 5, color: color`5`}); +setTimeout(clearText, 3000); + +// WASD Controls +onInput("w", () => { + getFirst(player).y -= 1 +}); + +onInput("a", () => { + getFirst(player).x -= 1 +}); + +onInput("s", () => { + getFirst(player).y += 1 +}); + +onInput("d", () => { + getFirst(player).x += 1 +}); + + +// Restarts the game +function restartGame() { + level = 0; + setMap(levels[level]); +} + +// Checks for collision with trash +afterInput(() => { + const goalTiles = tilesWith(goal, player).length; + + // Adds up tiles with trash and player + const sodaTiles = tilesWith(player, soda_can).length; + const plasticBottleTiles = tilesWith(player, plastic_bottle).length; + const plasticRingTiles = tilesWith(player, plastic_rings).length; + const trashTiles = sodaTiles + plasticBottleTiles + plasticRingTiles; + + // Player hit trash, restart the game + if (trashTiles > 0) { + level = 0; + setMap(levels[level]); + } + + // Player reached goal tile, advance level + if (goalTiles > 0) { + // Increment level + level = level + 1; + + // Check if all levels completed, otherwise advances level + if (level > levels.length - 1) { + addText("Game over!", {x: 2, y: 2, color: color`5`}); + addText("Congratulations", {x: 2, y: 3, color: color`5`}); + setTimeout(clearText, 2000); + addText("Restarting...", {x: 2, y: 4, color: color`5`}); + setTimeout(clearText, 2000); + setTimeout(restartGame, 5000); + } + else { + setMap(levels[level]); + } + } +}); From 7e7d342e071c1a67e650c3d3a7ac87982cd91fe1 Mon Sep 17 00:00:00 2001 From: leTable <124522879+leTable@users.noreply.github.com> Date: Sat, 11 Feb 2023 10:09:18 -0500 Subject: [PATCH 24/92] Add files via upload --- ...The Sky Is Falling (For Real This Time).js | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 games/The Sky Is Falling (For Real This Time).js diff --git a/games/The Sky Is Falling (For Real This Time).js b/games/The Sky Is Falling (For Real This Time).js new file mode 100644 index 0000000000..e6ed50b432 --- /dev/null +++ b/games/The Sky Is Falling (For Real This Time).js @@ -0,0 +1,139 @@ +/* +@title: The Sky Is Falling (For Real This Time) +@author: Sawgur +*/ + + + +const player = "p"; +const wall = "w"; + +var opening = 5; +var score = 0; +var speed = 350; +var death = false; + +setLegend( + [ player, bitmap` +....6666666..... +...606666606.... +...666666666.... +...606006006.... +...000000000.... +...000000000.... +...600000006.... +.5566600066655.. +577766666665775. +577777777777775. +577777777777775. +.5555777777555.. +..CCCCCCCCCCC... +.CCCCCC.CCCCCC.. +.CCCCCC.CCCCCC.. +..000.....000...`], + [ wall, bitmap` +................ +.........LLL.... +.LLLL.LLLL1LLL.. +L11LLLL122221LL. +L12112LL222221LL +L12222222222221L +L12222222222221L +L11222222LL2221L +.LL1222221L1111L +..LL11221LLLLLLL +...LLL1LLL...... +.....LLL........ +................ +................ +................ +................`] +); + +setSolids([]); + + +function generateSky() { + opening = Math.floor(Math.random() * 9); + for (let x=0; x < 9; x++) { + if (x != opening) { + addSprite(x, 0, wall); + } + } + + score++; +} + +let level = 0; +const levels = [ + map` +......... +......... +......... +......... +......... +......... +......... +......... +......... +....p....`, +]; + +setMap(levels[level]); +generateSky(); +setPushables({ + [ player ]: [], +}); + +function gameLoop() { + addText(`Score: ${score}`, {x: 8, y: 1,color: color`0`}) + +getAll(wall).forEach((w) => { + if (w.y == 9) { + w.remove(); + } else { + w.y += 1; + }; + }); + + if (getAll(wall).length == 0) { + generateSky(); + } + + if (getFirst(wall).y == getFirst(player).y && getFirst(player).x != opening) { + lost(); + } + speed -= 1; + if (!death) { + setTimeout(gameLoop, speed); + } +} + +function lost() { + death = true; + setMap(map` +........ +........ +........ +........ +........ +........ +........ +........`); + clearText(); + addText("LOSE!", {x: 7, y: 6, color: color`0`}) + addText(`Score: ${score}`, {x: 5, y: 9, color: color`0`}) +} + +onInput("a", () => { + getFirst(player).x -= 1 +}); +onInput("d", () => { + getFirst(player).x += 1 +}); + +afterInput(() => { + +}); + +gameLoop(); From 88b3c3e97b161d48c85de923fbd50508473c2378 Mon Sep 17 00:00:00 2001 From: Mikmoomamimocki <93167918+Mikmoomamimocki@users.noreply.github.com> Date: Sat, 11 Feb 2023 10:44:47 -0500 Subject: [PATCH 25/92] Add files via upload --- games/sprig_shoot.js | 227 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 games/sprig_shoot.js diff --git a/games/sprig_shoot.js b/games/sprig_shoot.js new file mode 100644 index 0000000000..7cec948b6d --- /dev/null +++ b/games/sprig_shoot.js @@ -0,0 +1,227 @@ +/* +@title: sprig_shoot +@author: Holden L +*/ + +/* +Shoot the enemies, not the bomb! +Shooting an enemy results in +1 points. +Letting an enemy get past you results in -1 points. +Shooting a bomb results in a GAME OVER. +*/ + +const player = "p"; +const bullet = "b"; +const enemy = "e"; +const wall = "w"; +const bomb = "x"; + +const pointsup = tune` +100: c5^100, +100: g5^100, +3000`; +const pointsdown = tune` +100: g4^100, +100: c4^100, +3000`; + + +const maxAmmo = 25; +let ammo = maxAmmo; + +let points = 0; + +let gameState = "gaming"; + +addText(ammo + "/" + maxAmmo,{x:0,y:0,color:color`0`}) + +setLegend( + [ bomb, bitmap` +..........33.... +.........693.... +........C96..... +........CC...... +.......CC....... +.......CC....... +.....000000..... +....00000000.... +...0000000000... +...0000000000... +...0000000000... +...0000000000... +...0000000000... +...0000000000... +....00000000.... +.....000000.....`], + [ player, bitmap` +.00000000....... +0........0...... +0...0..0.0...... +0........0...... +0...0000.0...... +0........0...... +.00000000....... +..0....0....0000 +.00....000000... +.00....0....0... +.00....0........ +.00....0........ +..000000........ +..0....0........ +..0....0........ +..0....0........`], + [ bullet, bitmap` +................ +................ +................ +................ +................ +................ +................ +.......00....... +.......00....... +................ +................ +................ +................ +................ +................ +................`], + [ enemy, bitmap` +0000000000000000 +0222222222222220 +0222022222202220 +0222202222022220 +0222220220222220 +0222022002202220 +0222222222222220 +0222222222222220 +0222222222222220 +0222222222222220 +0222222222222220 +0222222222222220 +0222200000022220 +0222222222222220 +0222222222222220 +0000000000000000`], +); + +setSolids([]); + +let level = 0; +const levels = [ + map` +.......e.. +......e... +.....e.... +p.....e... +.......e.. +......e..x +.....e.... +....e.....`, +]; + +setMap(levels[level]); + +setPushables({ + [ player ]: [], +}); + +onInput("w", () => { + if (gameState === "gaming") { + getFirst(player).y -= 1; + } +}); +onInput("s", () => { + if (gameState === "gaming") { + getFirst(player).y += 1; + } +}); +onInput("j", () => { + if (gameState === "gaming") { + if (ammo > 0) { + addSprite(getFirst(player).x,getFirst(player).y,bullet); + ammo--; + } + } + +}); +onInput("k", () => { + if (gameState === "not gaming") { + gameState = "gaming"; + setMap(levels[level]); + ammo = maxAmmo; + points = 0; + } +}); + + + +afterInput(() => { +}); + + +setInterval(function () { + if (gameState === "gaming") { + let bullets = getAll(bullet); + for (let i = 0; i < bullets.length; i++) { + if (bullets[i].x == 9) { + bullets[i].remove() + } + bullets[i].x++; + } + for (let i = 0; i < tilesWith(bullet,enemy).length; i++) { + clearTile(tilesWith(bullet,enemy)[0][i].x, tilesWith(bullet,enemy)[0][i].y); + addSprite(9, Math.floor(Math.random() * 8), enemy) + points++; + playTune(pointsup); + } + if (tilesWith(bullet,bomb).length > 0) { + let all = getAll(); + for (let i = 0; i < all.length; i++) { + all[i].remove(); + clearText(); + gameState = "not gaming"; + } + } + + clearText() + if (gameState === "gaming") { + addText(ammo + "/" + maxAmmo,{x:0,y:0,color:color`0`}) + addText(points.toString(), {x:16,y:0,color:color`0`}) + + } + } + if (gameState === "not gaming") { + addText("GAME OVER\nPRESS K TO RESTART\n\nYOU HAD " + points + " POINTS",{x:1,y:5,color:color`0`}) + + } +}, 25) + +setInterval(function () { + if (ammo < maxAmmo && gameState === "gaming") { + ammo++; + } +}, 1000) +setInterval(function () { + if (gameState === "gaming") { + for (let i = 0; i < getAll(enemy).length; i++) { + if (getAll(enemy)[i].x == 0) { + getAll(enemy)[i].x = 9; + getAll(enemy)[i].y = Math.floor(Math.random() * 8); + points--; + playTune(pointsdown); + } + getAll(enemy)[i].x--; + } + if (getAll(enemy).length < 8) { + addSprite(9, Math.floor(Math.random() * 8), enemy); + } + let bombobj = getFirst(bomb) + if (bombobj.x == 0) { + bombobj.x = 9; + bombobj.y = Math.floor(Math.random() * 8); + } + bombobj.x--; + } +}, 500) \ No newline at end of file From bdc71b5d56d0ac4c753db214cbdd3612d3a83225 Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Sat, 11 Feb 2023 21:39:44 +0300 Subject: [PATCH 26/92] Add files via upload --- games/Labyrinth.js | 122 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 games/Labyrinth.js diff --git a/games/Labyrinth.js b/games/Labyrinth.js new file mode 100644 index 0000000000..12bcd31be5 --- /dev/null +++ b/games/Labyrinth.js @@ -0,0 +1,122 @@ +/* +@title: Labyrinth +@author: DorukSarpAlwaysStrikesBack! +*/ + +const player = "p"; +const box = "b"; +const goal = "g"; +const labywall = "w"; +const melody = tune` +147.05882352941177: a5^147.05882352941177, +441.1764705882353, +147.05882352941177: f5^147.05882352941177, +147.05882352941177, +147.05882352941177: f5^147.05882352941177, +147.05882352941177, +147.05882352941177: g5^147.05882352941177, +147.05882352941177, +147.05882352941177: d5^147.05882352941177, +147.05882352941177, +147.05882352941177: f5^147.05882352941177, +294.11764705882354, +147.05882352941177: f5-147.05882352941177, +294.11764705882354, +147.05882352941177: a4-147.05882352941177, +147.05882352941177: d5-147.05882352941177, +147.05882352941177, +147.05882352941177: a4-147.05882352941177, +147.05882352941177: e5-147.05882352941177, +147.05882352941177, +147.05882352941177: g4-147.05882352941177 + g5-147.05882352941177, +147.05882352941177: e5-147.05882352941177, +147.05882352941177, +147.05882352941177: a5-147.05882352941177, +147.05882352941177: b4-147.05882352941177, +147.05882352941177, +147.05882352941177: f4-147.05882352941177 + e5-147.05882352941177, +147.05882352941177: g5-147.05882352941177` +const playback = playTune(melody, Infinity) + +setSolids([ player, labywall ]) + +setLegend( + [ player, bitmap` +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333`], + [ labywall, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`] +); + +let level = 0; +const levels = [ + map` +wwwwwwwwwwpwwwwwwwww +w....w.............w +w..w.w.............w +w..wwwwww....wwwww.w +w...w.w......w.w.w.w +w...w.w......w.w.w.w +www.w.w..wwwww.w.w.w +w...w.w..w...w.w.w.w +w...w.w..w...w...w.w +w.....w..w....w.ww.w +w.w...w..w.........w +w.w...w..w....www..w +w.w..ww..w.ww.w.w..w +w.w..w...w..w.w.ww.w +w.wwww..ww..w.w....w +w.......w...w.w..w.w +w.......w..wwww..w.w +w.......w..w.....w.w +w.......w..w.....w.w +wwwwwwwww..wwwwwwwww`, + ] + + const cl = levels[level]; +setMap(cl); + +onInput("w", () => { + getFirst(player).y -= 1; +}); + +onInput("s", () => { + getFirst(player).y += 1; +}); + +onInput("a", () => { + getFirst(player).x -= 1; +}); + +onInput("d", () => { + getFirst(player).x += 1; +}); From a149d57c08f9810cbb13f7d02800cb1907ad0312 Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Sat, 11 Feb 2023 21:44:21 +0300 Subject: [PATCH 27/92] Update Labyrinth.js --- games/Labyrinth.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/games/Labyrinth.js b/games/Labyrinth.js index 12bcd31be5..f1742387f2 100644 --- a/games/Labyrinth.js +++ b/games/Labyrinth.js @@ -4,8 +4,6 @@ */ const player = "p"; -const box = "b"; -const goal = "g"; const labywall = "w"; const melody = tune` 147.05882352941177: a5^147.05882352941177, From ad1cf62da541b215548bb2028a791a1905e69476 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sat, 11 Feb 2023 21:28:38 -0300 Subject: [PATCH 28/92] add #784 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 7e40b9edf2..628a678a7b 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2046,5 +2046,13 @@ "img": "", "tags": ["endless"], "addedOn": "2023-02-10" + }, + { + "filename": "rescue_leo", + "title": "rescue_leo", + "author": "agentblack_6000", + "img": "", + "tags": ["puzzle"], + "addedOn": "2023-02-11" } ] From b10ba93f905942bff87e7a880aba77df805810f3 Mon Sep 17 00:00:00 2001 From: leTable <124522879+leTable@users.noreply.github.com> Date: Sat, 11 Feb 2023 19:49:34 -0500 Subject: [PATCH 29/92] Rename The Sky Is Falling (For Real This Time).js to The Sky Is Falling For Real This Time.js --- ...eal This Time).js => The Sky Is Falling For Real This Time.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename games/{The Sky Is Falling (For Real This Time).js => The Sky Is Falling For Real This Time.js} (100%) diff --git a/games/The Sky Is Falling (For Real This Time).js b/games/The Sky Is Falling For Real This Time.js similarity index 100% rename from games/The Sky Is Falling (For Real This Time).js rename to games/The Sky Is Falling For Real This Time.js From 78863f96193712b71b883708da710468b9e7e70d Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sat, 11 Feb 2023 22:08:30 -0300 Subject: [PATCH 30/92] add #786 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 628a678a7b..7e251408d9 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2054,5 +2054,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-11" + }, + { + "filename": "sprig_shoot", + "title": "sprig_shoot", + "author": "Holden L", + "img": "", + "tags": ["endless"], + "addedOn": "2023-02-11" } ] From a7711abc9ab27fcc02d8f4748d52573de620f6ee Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sat, 11 Feb 2023 22:28:23 -0300 Subject: [PATCH 31/92] Update and rename The Sky Is Falling For Real This Time.js to The_Sky_Is_Falling_For_Real_This_Time.js --- ...al This Time.js => The_Sky_Is_Falling_For_Real_This_Time.js} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename games/{The Sky Is Falling For Real This Time.js => The_Sky_Is_Falling_For_Real_This_Time.js} (97%) diff --git a/games/The Sky Is Falling For Real This Time.js b/games/The_Sky_Is_Falling_For_Real_This_Time.js similarity index 97% rename from games/The Sky Is Falling For Real This Time.js rename to games/The_Sky_Is_Falling_For_Real_This_Time.js index e6ed50b432..4407cabeb3 100644 --- a/games/The Sky Is Falling For Real This Time.js +++ b/games/The_Sky_Is_Falling_For_Real_This_Time.js @@ -1,5 +1,5 @@ /* -@title: The Sky Is Falling (For Real This Time) +@title: The_Sky_Is_Falling_For_Real_This_Time @author: Sawgur */ From 6716a6a6798ab92d7fa021ffd4e61b8f0b59f71f Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sat, 11 Feb 2023 22:39:39 -0300 Subject: [PATCH 32/92] add #785 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 7e251408d9..a23dd6bc8f 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2062,5 +2062,13 @@ "img": "", "tags": ["endless"], "addedOn": "2023-02-11" + }, + { + "filename": "The_Sky_Is_Falling_For_Real_This_Time", + "title": "The_Sky_Is_Falling_For_Real_This_Time", + "author": "Sawgur", + "img": "", + "tags": ["endless"], + "addedOn": "2023-02-11" } ] From d133ce4e8a6b354de941cda7e2d278078934f0ed Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Sun, 12 Feb 2023 15:12:20 +0300 Subject: [PATCH 33/92] Update Labyrinth.js --- games/Labyrinth.js | 63 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/games/Labyrinth.js b/games/Labyrinth.js index f1742387f2..faf5026077 100644 --- a/games/Labyrinth.js +++ b/games/Labyrinth.js @@ -5,6 +5,7 @@ const player = "p"; const labywall = "w"; +const end = "e"; const melody = tune` 147.05882352941177: a5^147.05882352941177, 441.1764705882353, @@ -72,9 +73,27 @@ setLegend( 0000000000000000 0000000000000000 0000000000000000 -0000000000000000`] +0000000000000000`], + [ end, bitmap` +LLLLLLLLLLLLLLLL +L11166666661111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11166666661111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11166666661111L +LLLLLLLLLLLLLLLL`], ); + let level = 0; const levels = [ map` @@ -97,8 +116,24 @@ w.......w...w.w..w.w w.......w..wwww..w.w w.......w..w.....w.w w.......w..w.....w.w -wwwwwwwww..wwwwwwwww`, +wwwwwwwwwwewwwwwwwww`, + map` +wwwwwwwwwwwww +w...........w +w.w.wwwwww..w +w.w.w....w..w +w.www.ww.w..w +w...w..w.ww.w +w.w.w.ew....w +w.wwwwwww...w +w.w.....www.w +w.w.....wpw.w +w...wwwww.www +w...........w +wwwwwwwwwwwww`, ] +const currentLevel = levels[level]; +setMap(currentLevel); const cl = levels[level]; setMap(cl); @@ -118,3 +153,27 @@ onInput("a", () => { onInput("d", () => { getFirst(player).x += 1; }); + +onInput("j", () => { + const currentLevel = levels[level]; + if (currentLevel !== undefined) { + clearText(""); + setMap(currentLevel); + } +}); +afterInput(() => { + +const targetNumber = tilesWith(end).length; +const numberCovered = tilesWith(end, player).length; + if (numberCovered === targetNumber) { + level = level + 1; + + const currentLevel = levels[level]; + + if (currentLevel !== undefined) { + setMap(currentLevel); + } else { + addText("you win!", { y: 10, color: color`4` }); + } + } +}); From 883b0ecf3c8dde47f5d3af22c86e0aa51b9e131e Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Sun, 12 Feb 2023 15:14:59 +0300 Subject: [PATCH 34/92] Update Labyrinth.js From 9e347d1f8328040550b0e095a6acac4ec2f1e9f4 Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Sun, 12 Feb 2023 15:55:15 +0300 Subject: [PATCH 35/92] Update Labyrinth.js --- games/Labyrinth.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/games/Labyrinth.js b/games/Labyrinth.js index faf5026077..4aaf7c88ef 100644 --- a/games/Labyrinth.js +++ b/games/Labyrinth.js @@ -131,6 +131,20 @@ w.w.....wpw.w w...wwwww.www w...........w wwwwwwwwwwwww`, + map` +wwwwwwwwww +w........w +w.wwww..pw +w.w..wwwww +w.w......w +w.w..www.w +w.wwwwew.w +w.w....w.w +w......w.w +w.wwwwww.w +w.w......w +w........w +wwwwwwwwww`, ] const currentLevel = levels[level]; setMap(currentLevel); From 5625dbae56dae00adf1575fab942045ca0b5b15d Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Sun, 12 Feb 2023 19:34:49 +0300 Subject: [PATCH 36/92] Update Labyrinth.js --- games/Labyrinth.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/games/Labyrinth.js b/games/Labyrinth.js index 4aaf7c88ef..0c815288bf 100644 --- a/games/Labyrinth.js +++ b/games/Labyrinth.js @@ -145,6 +145,34 @@ w.wwwwww.w w.w......w w........w wwwwwwwwww`, + map` +wwwwwwwwwww +w........pw +w....wwwwww +w.ww.w..w.w +w..w....w.w +w.ww..www.w +w..ww..we.w +w...w.www.w +w...w...w.w +w...wwwww.w +w.....w...w +w.........w +wwwwwwwwwww`, + map` +wwwwwwwwwwww +www........w +w.wwww..p..w +w.w..wwwwwww +w.w........w +w.w.wwwwww.w +w.wwwwew.w.w +w.w....w.w.w +w...w..w.w.w +w.wwwwww.w.w +w.w......w.w +w..........w +wwwwwwwwwwww`, ] const currentLevel = levels[level]; setMap(currentLevel); From 6d8dca480620b911dd93d5f3670881e010a5fd09 Mon Sep 17 00:00:00 2001 From: Patcybermind <97562509+Patcybermind@users.noreply.github.com> Date: Sun, 12 Feb 2023 12:51:23 -0500 Subject: [PATCH 37/92] Add files via upload --- games/3D_wire_frame_rendererV1.js | 418 ++++++++++++++++++++++++++++++ 1 file changed, 418 insertions(+) create mode 100644 games/3D_wire_frame_rendererV1.js diff --git a/games/3D_wire_frame_rendererV1.js b/games/3D_wire_frame_rendererV1.js new file mode 100644 index 0000000000..59e59825b3 --- /dev/null +++ b/games/3D_wire_frame_rendererV1.js @@ -0,0 +1,418 @@ +/* +@title: 3d_wire_frame_renderer +@author: Patcybermind +*/ +/* HOW TO USE : + w = move further + s = move closer + d = move to the right + a = move to the left + i = move up + k = move down + + j = debugger; + +*/ +// set up everything +const blue_pixel = "p"; +const background = "g"; + +setLegend( + [ blue_pixel, bitmap` +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555 +5555555555555555`], + [ background, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`] +); + + + +let level = 0; +const levels = [ + map` +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................ +................................................................................................................................................................`, +]; + +setMap(levels[level]); +setBackground(background); + +// initial translation values +let translationx = 0; +let translationy = 0; // vertical +let translationz = 50; +// focal length +let focal_length = 30; + + +// listeners +// i +onInput("i", () => { + translationy += 1; + console.log("translationy: ", translationy) +}) +// k +onInput("k", () => { + translationy += -1; + console.log("translationy: ", translationy) +}) +// a +onInput("a", () => { + translationx += -1; + console.log("translationx: ", translationx) +}) +// d +onInput("d", () => { + translationx += 1; + console.log("translationx: ", translationx) +}) +// s +onInput("s", () => { + translationz += -1; + console.log("translationz: ", translationz) +}) +// w +onInput("w", () => { + translationz += 1; + console.log("translationz: ", translationz) +}) +// j to stop +onInput("j", () => { + debugger; +}) + + +// functions + +function draw_line(x1, y1, x2, y2) { // Iterators, counters required by algorithm + let x, y, dx, dy, dx1, dy1, px, py, xe, ye, i; // Calculate line deltas + dx = x2 - x1; + dy = y2 - y1; // Create a positive copy of deltas (makes iterating easier) + dx1 = Math.abs(dx); + dy1 = Math.abs(dy); // Calculate error intervals for both axis + px = 2 * dy1 - dx1; + py = 2 * dx1 - dy1; // The line is X-axis dominant + if (dy1 <= dx1) { // Line is drawn left to right + if (dx >= 0) { + x = x1; y = y1; xe = x2; + } else { // Line is drawn right to left (swap ends) + x = x2; y = y2; xe = x1; + } + try { + addSprite(Math.round(x), (y), blue_pixel); // Draw first pixel // Rasterize the line + } + catch (error) { + console.log("outside of screen") + } + for (i = 0; x < xe; i++) { + x = x + 1; // Deal with octants... + if (px < 0) { + px = px + 2 * dy1; + } else { + if ((dx < 0 && dy < 0) || (dx > 0 && dy > 0)) { + y = y + 1; + } else { + y = y - 1; + } + px = px + 2 * (dy1 - dx1); + } // Draw pixel from line span at + // currently rasterized position + try { + addSprite(Math.round(x), Math.round(y), blue_pixel); + } + catch (error) { + console.log("outside of screen") + } + } } else { // The line is Y-axis dominant // Line is drawn bottom to top + if (dy >= 0) { + x = x1; y = y1; ye = y2; + } else { // Line is drawn top to bottom + x = x2; y = y2; ye = y1; + } + try { + addSprite(Math.round(x), Math.round(y), blue_pixel); // Draw first pixel // Rasterize the line + } + catch (error) { + console.log("outside of screen") + } + for (i = 0; y < ye; i++) { + y = y + 1; // Deal with octants... + if (py <= 0) { + py = py + 2 * dx1; + } else { + if ((dx < 0 && dy<0) || (dx > 0 && dy > 0)) { + x = x + 1; + } else { + x = x - 1; + } + py = py + 2 * (dx1 - dy1); + } // Draw pixel from line span at + // currently rasterized positions + try { + addSprite(Math.round(x), Math.round(y), blue_pixel); + } + catch (error) { + console.log("outside of screen") + } + } + } + } + +function draw_wire_frame(x0, y0, z0, x1, y1, z1) { + draw_line(80 + Math.round(focal_length * (x0 + translationx) / (z0 + translationz)), + 64 + Math.round(focal_length * (-y0 + -translationy) / (z0 + translationz)), + 80 + Math.round(focal_length * (x1 + translationx) / (z1 + translationz)), + 64 + Math.round(focal_length * (-y1 + -translationy) / (z1 + translationz)) + ); +} + +function clear(){ + for (let yclear = 0; yclear < 129; yclear++){ + for (let xclear = 0; xclear < 161; xclear++) { + clearTile(xclear, yclear) + } + } +} + +// save for later code +/* +draw_line(0, 100, 100, 0, blue_pixel); + +*/ +// render +function render() { + // code goes here + +/* + Notes + the top is +y + bottom is -y + + left is -x + right is +x + + further is +z + closer is -z +*/ + + // Cube + + // front + // front top + draw_wire_frame(-10, 10, 0, 10, 10, 0); + // front bottom + draw_wire_frame(-10, -10, 0, 10, -10, 0); + // front right + draw_wire_frame(10, -10, 0, 10, 10, 0); + // front left + draw_wire_frame(-10, -10, 0, -10, 10, 0); + + // back + // back top + draw_wire_frame(-10, 10, 20, 10, 10, 20); + // back bottom + draw_wire_frame(-10, -10, 20, 10, -10, 20); + // back right + draw_wire_frame(10, -10, 20, 10, 10, 20); + // back left + draw_wire_frame(-10, -10, 20, -10, 10, 20); + + // links + // top right + draw_wire_frame(10, 10, 0, 10, 10, 20); + // top left + draw_wire_frame(-10, 10, 0, -10, 10, 20); + // bottom right + draw_wire_frame(-10, -10, 0, -10, -10, 20); + // bottom left + draw_wire_frame(10, -10, 0, 10, -10, 20); + + + + // Pyramid + + // front + draw_wire_frame(-60, -10, 0, -40, -10, 0); + // back + draw_wire_frame(-60, -10, 20, -40, -10, 20); + // right union + draw_wire_frame(-40, -10, 0, -40, -10, 20); + // left union + draw_wire_frame(-60, -10, 0, -60, -10, 20); + + // center unions + + // front right + draw_wire_frame(-50, 10, 10, -40, -10, 0); + // front left + draw_wire_frame(-50, 10, 10, -60, -10, 0); + + // back right + draw_wire_frame(-50, 10, 10, -40, -10, 20); + // back left + draw_wire_frame(-50, 10, 10, -60, -10, 20); +} +// main code + +function main() { + clear(); + render(); +} +// schedule main +setInterval(main, 100); + From a5d32398e5f300d0352e5836a03123460e26cb7c Mon Sep 17 00:00:00 2001 From: Patcybermind <97562509+Patcybermind@users.noreply.github.com> Date: Sun, 12 Feb 2023 12:55:02 -0500 Subject: [PATCH 38/92] Add files via upload --- games/img/3D_wireframe_rendererV1.png | Bin 0 -> 4549 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 games/img/3D_wireframe_rendererV1.png diff --git a/games/img/3D_wireframe_rendererV1.png b/games/img/3D_wireframe_rendererV1.png new file mode 100644 index 0000000000000000000000000000000000000000..97526d865531298ba8d54fc4375992784ae519fc GIT binary patch literal 4549 zcmeHLYgAHe8s3(vbIeQQjQ5hVRcBUoP&5rSEHlkDmQ9xvm7z$eU62$|NQttNnlviU z@lv9ztZ`0LXnBj`qK8RyymB&BP>@V0%@7$y0%UfrRqKQ^KhK|8?zQ%_zP;Dp-}>I? zeV+Gw_rA1iXSBmNp5Fif;1IJtayI}hl7MHVoeg;B+uU;?0@lQcn7wx3kz;q{B6#gV z+J++SAtaNsFc~-?C5?c`ttVnLaJV#LDuJY4EI@(}{psUFTQhJN(osShWbaWt4%kCZ zgZRTCQMe=s+z%cAjzc#1hinLf?ApOv>3{=(WvgN$x9p{qO$@Ei_fE+@qqyM{IEM-OW+DB77DvZQ*a4P#Nh`c6#&J=y3| zt*UZ+@B_Pax^AsDQ%4GS8sANwBJU%=-SO72*GuRZ3x+owf&cClxYC-xo(}?pTz~}* z7Id&+gN0J?n^eLEw@m=xI?`1=M-XjIJX>xYO>o_0jiQ#PE(SJl{sK+jcuL&Oo94j5 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EZt436;g0*+vTT(AK{2HE%MJIv zUHyFbL<7IBzF>+Go$yA@Z8S=lMAa; Date: Sun, 12 Feb 2023 12:55:39 -0500 Subject: [PATCH 39/92] Delete 3D_wireframe_rendererV1.png --- games/img/3D_wireframe_rendererV1.png | Bin 4549 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 games/img/3D_wireframe_rendererV1.png diff --git a/games/img/3D_wireframe_rendererV1.png b/games/img/3D_wireframe_rendererV1.png deleted file mode 100644 index 97526d865531298ba8d54fc4375992784ae519fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4549 zcmeHLYgAHe8s3(vbIeQQjQ5hVRcBUoP&5rSEHlkDmQ9xvm7z$eU62$|NQttNnlviU z@lv9ztZ`0LXnBj`qK8RyymB&BP>@V0%@7$y0%UfrRqKQ^KhK|8?zQ%_zP;Dp-}>I? zeV+Gw_rA1iXSBmNp5Fif;1IJtayI}hl7MHVoeg;B+uU;?0@lQcn7wx3kz;q{B6#gV z+J++SAtaNsFc~-?C5?c`ttVnLaJV#LDuJY4EI@(}{psUFTQhJN(osShWbaWt4%kCZ zgZRTCQMe=s+z%cAjzc#1hinLf?ApOv>3{=(WvgN$x9p{qO$@Ei_fE+@qqyM{IEM-OW+DB77DvZQ*a4P#Nh`c6#&J=y3| zt*UZ+@B_Pax^AsDQ%4GS8sANwBJU%=-SO72*GuRZ3x+owf&cClxYC-xo(}?pTz~}* z7Id&+gN0J?n^eLEw@m=xI?`1=M-XjIJX>xYO>o_0jiQ#PE(SJl{sK+jcuL&Oo94j5 zCnotGY568SWlQDRfkD1@sMHWdSrDVM zb7-5>B3V1M@7<9{;f!mO#Mm{}thJ9LW0zY2XU_E4dwrO6)QsDy8 ziNx!2|4Aa{wgUiI-TDH=I>lOcylJS0N6R`U9p9f2N0asUFK4TB=DKKk7p#}KDHg^5;AYUpo$#VJ3WcpgS#6v$a1}7j4HJDK_Y=(s36%Fj znZW!}`!GeXE^d+IkB`5lVxNi@te5!qL3!Rkgj=PmYbM-2!j4A1}fNA;m(! zrPT=tF|ccy1lmhcjQpcm;3G56GL{r5r*4dvuo@C~r!L;y+Pe$@?CkKLp`@~NutR(I zyE2mG;fjhvo~puuVars4B%;zS7zYIl_wstWr-I4Uxdr}y?wSTM;EvpwE?eWGasaxv zrWWeo6w7ze8Ya{AVcAofUe(Ycx;HzX7hK;-U3^CCPqqg8tq8BrpiCvMhvC}|P;Q!!E1xG_t6eDAv71D`yx-vRYa&|sD0aOo%a581`%|G>71wd1b zMGT)*lZbWCYrAdRJoT8beO5ypx%?A;od5TUx(lbd0 zpW_wm6H7xPKb)p;%%izcwG^Lt0~2HT7eU79)@WWRrrXUoUR*5d7S9MA`?BV=9VW3p zd>oy+22=Lso2!!C&j8aW%&Ohxx=GR*CYwp5w& ziC`9MG&#wT2j7n8y(CFCgtil;^^Qhw3v!ygC;r&L(U1Ss9UU!)rLK0vWBUhM1LEAD_^ceuTA&{y`d`^MI8M%AbaNb4@{>%W95U+8-fV_v#TpUl|5Fhd{~% ze~{w`;>E|$YdtEYWV+@TY5{YkbBG~)|A3($v>jGkrstC#pIt3(f?h5uO84)=E!W{* zql7u!egPenm@bPlOX<&^X)BAeh6Y&3Eb+?Bbxx*9t7u^)?7$!T_n<_}f0HB{K{COF zFYRN~LhA7Y{8q7eNa5yVI(kg{s9>46ZC2M<1^} zVFRI zRz}Y@W}%R^Wpvb?7wp!FiNe11?YJCSP%xc5W>QwIDcmpAX!PjQHu2C~v@NGKqKcg- zykI9dG}TiV*!|KAONi}+BCXTqI^DZM7isc=n)alEZt436;g0*+vTT(AK{2HE%MJIv zUHyFbL<7IBzF>+Go$yA@Z8S=lMAa; Date: Sun, 12 Feb 2023 12:56:32 -0500 Subject: [PATCH 40/92] Add files via upload --- games/img/3D_wire_frame_rendererV1.png | Bin 0 -> 4549 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 games/img/3D_wire_frame_rendererV1.png diff --git a/games/img/3D_wire_frame_rendererV1.png b/games/img/3D_wire_frame_rendererV1.png new file mode 100644 index 0000000000000000000000000000000000000000..97526d865531298ba8d54fc4375992784ae519fc GIT binary patch literal 4549 zcmeHLYgAHe8s3(vbIeQQjQ5hVRcBUoP&5rSEHlkDmQ9xvm7z$eU62$|NQttNnlviU z@lv9ztZ`0LXnBj`qK8RyymB&BP>@V0%@7$y0%UfrRqKQ^KhK|8?zQ%_zP;Dp-}>I? zeV+Gw_rA1iXSBmNp5Fif;1IJtayI}hl7MHVoeg;B+uU;?0@lQcn7wx3kz;q{B6#gV z+J++SAtaNsFc~-?C5?c`ttVnLaJV#LDuJY4EI@(}{psUFTQhJN(osShWbaWt4%kCZ zgZRTCQMe=s+z%cAjzc#1hinLf?ApOv>3{=(WvgN$x9p{qO$@Ei_fE+@qqyM{IEM-OW+DB77DvZQ*a4P#Nh`c6#&J=y3| zt*UZ+@B_Pax^AsDQ%4GS8sANwBJU%=-SO72*GuRZ3x+owf&cClxYC-xo(}?pTz~}* z7Id&+gN0J?n^eLEw@m=xI?`1=M-XjIJX>xYO>o_0jiQ#PE(SJl{sK+jcuL&Oo94j5 zCnotGY568SWlQDRfkD1@sMHWdSrDVM zb7-5>B3V1M@7<9{;f!mO#Mm{}thJ9LW0zY2XU_E4dwrO6)QsDy8 ziNx!2|4Aa{wgUiI-TDH=I>lOcylJS0N6R`U9p9f2N0asUFK4TB=DKKk7p#}KDHg^5;AYUpo$#VJ3WcpgS#6v$a1}7j4HJDK_Y=(s36%Fj znZW!}`!GeXE^d+IkB`5lVxNi@te5!qL3!Rkgj=PmYbM-2!j4A1}fNA;m(! zrPT=tF|ccy1lmhcjQpcm;3G56GL{r5r*4dvuo@C~r!L;y+Pe$@?CkKLp`@~NutR(I zyE2mG;fjhvo~puuVars4B%;zS7zYIl_wstWr-I4Uxdr}y?wSTM;EvpwE?eWGasaxv zrWWeo6w7ze8Ya{AVcAofUe(Ycx;HzX7hK;-U3^CCPqqg8tq8BrpiCvMhvC}|P;Q!!E1xG_t6eDAv71D`yx-vRYa&|sD0aOo%a581`%|G>71wd1b zMGT)*lZbWCYrAdRJoT8beO5ypx%?A;od5TUx(lbd0 zpW_wm6H7xPKb)p;%%izcwG^Lt0~2HT7eU79)@WWRrrXUoUR*5d7S9MA`?BV=9VW3p zd>oy+22=Lso2!!C&j8aW%&Ohxx=GR*CYwp5w& ziC`9MG&#wT2j7n8y(CFCgtil;^^Qhw3v!ygC;r&L(U1Ss9UU!)rLK0vWBUhM1LEAD_^ceuTA&{y`d`^MI8M%AbaNb4@{>%W95U+8-fV_v#TpUl|5Fhd{~% ze~{w`;>E|$YdtEYWV+@TY5{YkbBG~)|A3($v>jGkrstC#pIt3(f?h5uO84)=E!W{* zql7u!egPenm@bPlOX<&^X)BAeh6Y&3Eb+?Bbxx*9t7u^)?7$!T_n<_}f0HB{K{COF zFYRN~LhA7Y{8q7eNa5yVI(kg{s9>46ZC2M<1^} zVFRI zRz}Y@W}%R^Wpvb?7wp!FiNe11?YJCSP%xc5W>QwIDcmpAX!PjQHu2C~v@NGKqKcg- zykI9dG}TiV*!|KAONi}+BCXTqI^DZM7isc=n)alEZt436;g0*+vTT(AK{2HE%MJIv zUHyFbL<7IBzF>+Go$yA@Z8S=lMAa; Date: Sun, 12 Feb 2023 22:23:04 +0300 Subject: [PATCH 41/92] Update Labyrinth.js --- games/Labyrinth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/Labyrinth.js b/games/Labyrinth.js index 0c815288bf..296e8514c4 100644 --- a/games/Labyrinth.js +++ b/games/Labyrinth.js @@ -163,7 +163,7 @@ wwwwwwwwwww`, wwwwwwwwwwww www........w w.wwww..p..w -w.w..wwwwwww +w.w..wwwww.w w.w........w w.w.wwwwww.w w.wwwwew.w.w From d021ea357084fa74f5daaae01c8120a8df70c90f Mon Sep 17 00:00:00 2001 From: sahilchess <125219792+sahilchess@users.noreply.github.com> Date: Sun, 12 Feb 2023 16:07:09 -0500 Subject: [PATCH 42/92] Add files via upload --- The Maze of Sprig.js | 273 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 The Maze of Sprig.js diff --git a/The Maze of Sprig.js b/The Maze of Sprig.js new file mode 100644 index 0000000000..79d4b0e133 --- /dev/null +++ b/The Maze of Sprig.js @@ -0,0 +1,273 @@ +/* +@title: The Maze of Sprig +@author: SahilD +*/ + +const player = "p"; +const wall = "w"; +const block = "b"; +const teleport = "t" + +setLegend( + [ player, bitmap` +...6666666666... +..666666666666.. +.66666666666666. +6LL6336663366LL6 +66L6336663366L66 +66LL666D6666LL66 +666LF666666FL666 +66666FFFFFF66666 +666L66666666L666 +655L55555555L556 +655L55555555L556 +655L55555555L556 +655L55555555L556 +6666666666666666 +...0........0... +...00.......00..`], + [ wall, bitmap` +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC`], + [ block, bitmap` +LLLLLLLLLLLLLLLL +L3333LLLLLLLLLLL +L3LL3L3LLL3L3333 +L3333L3LLL3L3LLL +L3LLLL3LLL3L3LLL +L3LLLL3LLL3L3LLL +LLLLLL3LLL3L3333 +LLLLLLL333LLLLL3 +LLLLLLLLLLLLLLL3 +LLLLLLLLLLLL3333 +LLLL3LLL3LLLLLLL +LLLL3LLL3LLLLLLL +LLLL3LLL3LLLLLLL +LLLL33333LLLLLLL +LLLL3LLL3LLLLLLL +LLLL3LLL3LLLLLLL`], + [teleport, bitmap` +7777777777777777 +1117777777777717 +1777777177777171 +1777117111117111 +1117117171717177 +7777777777777111 +7777777777777777 +7777777777777717 +7177777177777171 +1117117111117111 +7177117171717177 +7777777777777111 +7777737773777777 +7777737373777777 +7773777777737777 +7777333333377777`] +); + + +setSolids([player, wall, block]); + +let level = 0; +const levels = [ + map` +p.wt +..b. +..w. +....`, + map` +p..ww +...ww +.wwww +.wwww +.wwww +...ww +.b..w +...tw +..www`, + map` +.w..w.wwwww +.w..w...w.. +.b..w...w.. +.w..w...w.. +.w..w...b.. +.wwbw...w.. +.w..w...w.. +.w..w...w.. +.w..b...w.t +pw..w.wwwww`, + map` +.wwww..w...t... +.w...w..w.....w +.w....w..w...w. +.w....b..bb.w.. +.w....w....w... +.w...w.....w... +.wwbw......w... +.w...w.....w... +.w....w....w... +.w....w....w... +.b....w....w... +pwwwww.....w...`, + map` +pw..w..w.w...... +bw..w..ww.b....t +....w...w..wbbbb +....w..bw...wbbb +wwbww..b.....wbb +.......b......wb +.......b.......w`, + map` +pw..w..w. +bw..w.b.. +....w.b.. +....w..w. +ww.ww..w. +.......w. +.......w. +wwwwwwww. +........t`, + map` +p.w...b..ww...w......ww... +..b..w...w....w.......w... +..w.wwww.....ww........... +..ww..........w....w.ww... +..ww.........w..w......ww. +www.....w.....wbb.....w... +......w..w..w.wbb......w.. +..w..w...w.w.w.w.ww..w.... +...ww..........w.......... +.ww.....w....w......w..... +..w...w..w.ww..w....www... +..w......w......w......... +www...w...w.....w.w..w.w.. +...w......w...w...ww...... +..w.....w........ww....... +.w......www............w.. +...........ww...w.ww..ww.. +............w...w.w..w...t`, + map` +bbwwwwwbb.wwwww........bb. +bbwbbb....w...w........b.. +bbwbbb.bbbw....w....wwww.. +bbwbbb..bb......w...w..ww. +bbwbbb....w.....w...w...w. +bbwwwww...w.....w...b..tw. +bbbbbbw...wwwwwww...w...w. +bbbbbbw....w........w..w.. +bbbbbbw....wbbbb....wwww.. +bbbwbbw....w...b....ww.... +bbbwwww....w.bbbb...wwww.. +bb...........b..bb..w..w.. +..............bbbb........ +....wwwww.bb...wwb........ +......w...bb..ww.......bbb +......w.......w..www...bbb +......w.w..bb.b....w..bbb. +p..wwwwww..b..wwwwww...b.b`, + +]; + + + + + +const currentLevel = levels[level]; +setMap(currentLevel); + +setPushables({ + [ player ]: [block] +}); + +//Start - Movement +onInput("w", () => { + getFirst(player).y += -1; +}); + +onInput("s", () => { + getFirst(player).y += 1; +}); + + +onInput("d", () => { + getFirst(player).x += 1; +}); + +onInput("a", () => { + getFirst(player).x += -1; +}); +//End - Movement + +//Teleport feature +onInput("j", () => { + const currentLevel = levels[level]; + if (currentLevel !== undefined) { + clearText(""); + setMap(currentLevel); + } +}); + +afterInput(() => { + // count the number of tiles with goals + const targetNumber = tilesWith(teleport).length; + + // count the number of tiles with goals and boxes + const numberCovered = tilesWith(teleport, player).length; + + if (numberCovered === targetNumber) { + // increase the current level number + level = level + 1; + + const currentLevel = levels[level]; + + // make sure the level exists and if so set the map + if (currentLevel !== undefined) { + setMap(currentLevel); + } else { + addText("Woooo Hooooo", { y: 10, color: color`H` }); + } + } +}); +//End - Teleport Feature + + + +afterInput(() => { + // count the number of tiles with goals + const targetNumber = tilesWith(teleport).length; + + // count the number of tiles with goals and boxes + const numberCovered = tilesWith(teleport, player).length; + + if (numberCovered === targetNumber) { + // increase the current level number + level = level + 1; + + const currentLevel = levels[level]; + + // make sure the level exists and if so set the map + if (currentLevel !== undefined) { + setMap(currentLevel); + } else { + addText("You Broke Out", { y: 4, color: color`H` }); + } + } +}); +//End - Teleport Feature + + + From c9b45f77e9762482ca66a82d79041a025293f03c Mon Sep 17 00:00:00 2001 From: sahilchess <125219792+sahilchess@users.noreply.github.com> Date: Sun, 12 Feb 2023 16:12:45 -0500 Subject: [PATCH 43/92] Add TheMazeOfSprig thumbnail --- games/img/TheMazeOfSprig.png | Bin 0 -> 3632 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 games/img/TheMazeOfSprig.png diff --git a/games/img/TheMazeOfSprig.png b/games/img/TheMazeOfSprig.png new file mode 100644 index 0000000000000000000000000000000000000000..bd3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mIYf!PEA$nFJu<=*y5V)J?Npsh=s)kssBz{chY_ z9dLF9f(klqKEjOuc#i#&wbPCd|2JNi(J2bjVunu8HbTl__?HJfzT4x<-4&4V56a^< ANdN!< literal 0 HcmV?d00001 From ffca67c0f90a80a59f7889924dc94ee93c55c322 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sun, 12 Feb 2023 18:13:28 -0300 Subject: [PATCH 44/92] add #790 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index a23dd6bc8f..8c5a8aad49 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2070,5 +2070,13 @@ "img": "", "tags": ["endless"], "addedOn": "2023-02-11" + }, + { + "filename": "3D_wire_frame_rendererV1", + "title": "3D_wire_frame_rendererV1", + "author": "Patcybermind", + "img": "", + "tags": ["simulation"], + "addedOn": "2023-02-11" } ] From 524918d144879cb8da7493fa08218df15243be8b Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Mon, 13 Feb 2023 00:40:32 +0300 Subject: [PATCH 45/92] Update Labyrinth.js --- games/Labyrinth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/Labyrinth.js b/games/Labyrinth.js index 296e8514c4..93cbd3618c 100644 --- a/games/Labyrinth.js +++ b/games/Labyrinth.js @@ -1,5 +1,5 @@ /* -@title: Labyrinth +@title: Labyrint @author: DorukSarpAlwaysStrikesBack! */ From 773f968e6fb87587c40bd47b2cbf3a8e02e04230 Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Mon, 13 Feb 2023 00:40:40 +0300 Subject: [PATCH 46/92] Update Labyrinth.js --- games/Labyrinth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/Labyrinth.js b/games/Labyrinth.js index 93cbd3618c..296e8514c4 100644 --- a/games/Labyrinth.js +++ b/games/Labyrinth.js @@ -1,5 +1,5 @@ /* -@title: Labyrint +@title: Labyrinth @author: DorukSarpAlwaysStrikesBack! */ From d5abcd11c95d84aa8ff8482e3307611420977f59 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sun, 12 Feb 2023 18:50:19 -0300 Subject: [PATCH 47/92] add #787 --- games/metadata.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/games/metadata.json b/games/metadata.json index 8c5a8aad49..00be2cb33c 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2077,6 +2077,14 @@ "author": "Patcybermind", "img": "", "tags": ["simulation"], - "addedOn": "2023-02-11" + "addedOn": "2023-02-12" + }, + { + "filename": "Labyrinth", + "title": "Labyrinth", + "author": "DorukSarpAlwaysStrikesBack!", + "img": "", + "tags": ["puzzle"], + "addedOn": "2023-02-12" } ] From 7c3f7a501491eb6bc7f6ea88924c99ef79eedcf1 Mon Sep 17 00:00:00 2001 From: jianmin-chen Date: Mon, 13 Feb 2023 07:20:06 -0500 Subject: [PATCH 48/92] Add game --- games/plants_vs_zombies.js | 849 +++++++++++++++++++++++++++++++++++++ 1 file changed, 849 insertions(+) create mode 100644 games/plants_vs_zombies.js diff --git a/games/plants_vs_zombies.js b/games/plants_vs_zombies.js new file mode 100644 index 0000000000..5735db84c6 --- /dev/null +++ b/games/plants_vs_zombies.js @@ -0,0 +1,849 @@ +// Constants +const AVG_HEALTH = 5; +const ZOMBIE_HEALTH = [240, 320]; +const ZOMBIE_SPEED = 2000; +const NEW_SUN = 2000; // Every 10 seconds +const NEW_ZOMBIE = 10000; // Every 10 seconds +const SUN_VALUE = 25; +const MAX_SUNLIGHT = 5; // 5 at any given time - collect them! +const BULLETS = { + green: { letter: "y", bitmap: bitmap` +................ +................ +................ +.....000000..... +....0DDDDDD0.... +...0DDDDD4440... +...0DD2244440... +...0DD2444440... +...0DD4444440... +...0D44444440... +...0D44444440... +....04444440.... +.....000000..... +................ +................ +................` }, + blue: { letter: "x", bitmap: bitmap` +................ +................ +................ +.....000000..... +....05555550.... +...0555557770... +...0552277770... +...0552777770... +...0557777770... +...0577777770... +...0577777770... +....07777770.... +.....000000..... +................ +................ +................` } +}; + +function random(min, max) { // min and max included + return Math.floor(Math.random() * (max - min + 1) + min) +} + +let borderCursor = { letter: "h", bitmap: bitmap` +6666666666666666 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6..............6 +6666666666666666` }; +let borderChoice = 0; + +let cursor = { letter: "i", bitmap: bitmap` +8888888888888888 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8..............8 +8888888888888888`, x: 1, y: 1, active: false }; + +// Map +const lightGreenGrass = { letter: "k", bitmap: bitmap` +4444444444444444 +44D4444444444444 +4444444444444444 +4444443444444D44 +4444444444444444 +4444444444444444 +444D444444424444 +44DDD44444444444 +444D44444D444444 +4444444444444444 +4444444444444444 +44444444D4D43444 +444D44444D444444 +44444444444444D4 +4444444444444444 +4444444444444444` }; +const darkGreenGrass = { letter: "j", bitmap: bitmap` +DDDDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDD4DDD +DDDDDDDDDDD444DD +DDDDDDD2DDDD4DDD +DD4DDDDDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDD3DDDDD +DDDDDDDDDDDDDDDD +DDDDD4D4DDDDDDDD +DDDDDD4DDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDD4DDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD` }; +const stone = { letter: "s", bitmap: bitmap` +LLLLLLLLLLLLLLLL +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +L11111111111111L +LLLLLLLLLLLLLLLL` }; +const brown = { letter: "g", bitmap: bitmap` +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LCCCCCCCCCCCCCCC +LLLLLLLLLLLLLLLL` }; +const grasses = { + lightGreenGrass, + darkGreenGrass +}; +const sunlight = {letter: "z", bitmap: bitmap` +.......00....... +......0660...... +.000.066660.000. +.06606666660660. +.06666000066660. +..0660FFFF0660.. +.0660FFFFFF0660. +06660FFFFFF06660 +06660FFFFFF06660 +.0660FFFFFF0660. +..0660FFFF0660.. +.06666000066660. +.06606666660660. +.000.066660.000. +......0660...... +.......00.......`}; + +function Sun(x, y) { + return { + x, + y, + letter: "z", + type: "sunlight" + }; +}; + +// Zombies +const zombie = { letter: "w", bitmap: bitmap` +................ +..00000......... +.0111110........ +.010101L000..... +.012121L0FF0.... +.011111L0FFF0... +.0LL2100LFFFF0.. +.02LL0F0LFFFF0.. +..0000F0LFFFF0.. +.....0F000L0L0.. +....00F05505050. +....00F00550500. +..00L0111005500. +.0FFL010101100L. +.000000.0..0LFF. +................` }; +function Zombie(x, y) { + return { + bitmap: zombie.bitmap, + letter: zombie.letter, + x, + y, + health: random(...ZOMBIE_HEALTH), + speed: random(1500, 2500), + speedChanged: false, + curr: 0, + attackingPlant: false, + run: function(timestamp) { + this.curr += timestamp; + if (this.curr > this.speed) { + this.curr = 0; + // Return true if game is over (i.e., this.x = 0) + if (this.x === 0) return true; + // If plant is in front, you've got to wait a while ("attacking") before destroying the plant and moving forward + const sprites = getTile(this.x - 1, this.y).filter(tile => ![lightGreenGrass, darkGreenGrass].includes(tile.type)); + if (sprites.length && sprites[0].type !== sunlight.letter) { + const sprite = sprites[0]; + // "Attack" the plant - that is, wait until the next round + if (!this.attackingPlant) { + this.attackingPlant = true; + this.speed *= 2; // A little bit longer to attack the plant + return; + } else { + this.attackingPlant = false; + } + } else this.x--; + if (this.speedChanged) this.speed = random(1500, 2500); // Reset back to original speed + return false; + } else return false; + } + }; +} + +function shootBullet(x, y, type, collide) { + return { + x, + y, + letter: BULLETS[type].letter, + bitmap: BULLETS[type].bitmap, + collide, + speed: 50, + curr: 0, + run: function(timestamp) { + this.curr += timestamp; + if (this.curr > this.speed) { + this.curr = 0; + if (this.x < width() - 1) this.x++; // Move "forward" one + } + } + }; +} + +// Plants +function Plant(bitmap, options={}) { + // For some reason I can't do ...options? + let res = { bitmap, delta: 0 }; + if (!options.letter || !options.type || !options.cost) throw new Error("Plants need to have a letter, type, cost and a recharge time, ya know?"); + for (let key of Object.keys(options)) res[key] = options[key]; + if (!res.health) res.health = AVG_HEALTH; // I dunno? + return res; +} + +const peashooter = Plant(bitmap` +................ +.....0000..000.. +....04444004440. +...044424444040. +...044404444040. +...044404DD4040. +....0444D004440. +.....00D0..000.. +......040....... +....0004400..... +....0D40D040.... +...044440DD0.... +...040D444440... +....0.000D4D0... +.........040.... +..........0.....`, { + x: 0, + y: 0, + letter: "a", + type: "offensive", + cost: 100, + bullet: BULLETS.green, + bulletAmount: 1, + recharge: 1500, + onBulletCollide: function (zombie) { + // Peashooters can do 40 damage + zombie.health -= 40; + console.log(zombie); + }, + curr: 0, + run: function(timestamp) { + this.curr += timestamp; + if (this.curr > this.recharge) { + this.curr = 0; + return [shootBullet(this.x, this.y, "green", this.onBulletCollide)]; + } + } +}); +const snowPea = Plant(bitmap` +.00............. +.070.0000..000.. +..0507777007770. +.00077727777070. +075077707777070. +.00077707557070. +.07507775007770. +.050.0050..000.. +..0...070....... +....0007700..... +....05705070.... +...077770770.... +...0705777770... +....0.0005750... +.........050.... +..........0.....`, { + x: 0, + y: 0, + letter: "b", + type: "offensive", + cost: 175, + speed: 5000, + bullet: BULLETS.blue, + bulletAmount: 1, + recharge: 1200, + onBulletCollide: function (zombie) { + zombie.health -= 40; + if (!zombie.speedChanged) { + zombie.speed *= 2; + zombie.speedChanged = true; + } + }, + curr: 0, + run: function(timestamp) { + this.curr += timestamp; + if (this.curr > this.recharge) { + this.curr = 0; + return [shootBullet(this.x, this.y, "blue", this.onBulletCollide)]; + } + } +}); +const repeaterPea = Plant(bitmap` +..00............ +.04D00000..000.. +04DD04444004440. +.00044424444040. +.0D044404444040. +04D044404DD4040. +.0D00444D004440. +..0..00D0..000.. +......040....... +....0004400..... +....0D40D040.... +...044440DD0.... +...040D444440... +....0.000D4D0... +.........040.... +..........0.....`, { + x: 0, + y: 0, + letter: "c", + type: "offensive", + cost: 200, + speed: 3000, + bullet: BULLETS.green, + bulletAmount: 2, + recharge: 750, + onBulletCollide: function (zombie) { + zombie.health -= 40; + + }, + curr: 0, + run: function (timestamp) { + this.curr += timestamp; + if (this.curr > this.recharge) { + this.curr = 0; + return [shootBullet(this.x, this.y, "green", this.onBulletCollide)]; + } + } +}); +const sunflower = Plant(bitmap` +.....000000..... +....06666160.... +...0616666610... +..0616FFFFF660.. +..066FF2F2F660.. +..016FF0F0F610.. +..066FF0F0F660.. +...016FFFFF160.. +....066666660... +....00000000.... +....0D40D0D40... +...044440D4440.. +...040D444D0D0.. +....0.00000.0... +................ +................`, { + x: 0, + y: 0, + letter: "d", + type: "sunflower", + cost: 50, + recharge: 10000, + speed: 24000, + curr: 0, + run: function(timestamp) { + this.curr += timestamp; + if (this.curr > this.speed) { + this.curr = 0; + return Sun(random(0, mapSize.x), random(0, mapSize.y)); + } + } +}); +const wallnut = Plant(bitmap` +.......0000..... +......0FFFF0.... +.....0LFFFFF0... +....0LFFFFFFF0.. +...0LLFFFFFFF0.. +..0LLFFF2FF2FF0. +..0LLFF20F20FF0. +..0LLFF22F22FF0. +..0LLFFFFFFFFF0. +..0LLFF00FFFFF0. +...0LFFFF0FFFF0. +...0LFFFFFFFFF0. +....0LFFFFFFF0.. +.....0LFFFFF0... +......000000.... +................`, { + x: 0, + y: 0, + letter: "e", + type: "defensive", + cost: 50, + health: 40, + onCollide: function () { + this.health--; + if (this.health <= 0) { + // Oop, the wallnut dies :( + } + } +}); +const potatoMine = Plant(bitmap` +................ +................ +......000....... +.....03C30...... +.....03330...... +......010....... +.....00000...... +....0FFFFF0..... +...0FLF2F2F0.... +..00LFF0F0F0.... +.0L0FFFFFFF00... +..0000002200F0.. +.0F0F0F000FF0... +..0.0.000F0F0... +.........0.0.... +................`, { + x: 0, + y: 0, + letter: "f", + type: "defensive", + cost: 25, + onCollide: function (zombie) { + zombie.health = 0; + zombie.respond(); + // TODO: Remove oneself + } +}); +const plants = { + peashooter, + snowPea, + repeaterPea, + sunflower, + wallnut, + potatoMine +} + +function PlantCard(bitmap, plant) { + return { + bitmap, + letter: plant.letter.toUpperCase(), + plant, + } +}; + +const plantCards = [ + PlantCard(bitmap` +CCCCCCCCCCCCCCCC +CC000000000000CC +C022220C3022220C +C02220000002220C +C0220FF2F2F0220C +C0220FF0F0F0220C +C02201010100220C +C020L0F0F0FF020C +C00000000000000C +C01111111111110C +C01100011000110C +C01111011011110C +C01100111100110C +C01100011001110C +CC000000000000CC +CCCCCCCCCCCCCCCC`, potatoMine), // Cost: 25 + PlantCard(bitmap` +CCCCCCCCCCCCCCCC +CC000000000000CC +C02201666660220C +C02066FFFF61020C +C0206F2FF2F6020C +C0206F0FF0F6020C +C02066FFFF66020C +C02201666610220C +C00000000000000C +C01111111111110C +C01100011000110C +C01101111010110C +C01110011000110C +C01100111111110C +CC000000000000CC +CCCCCCCCCCCCCCCC`, sunflower), // Cost: 50 + PlantCard(bitmap` +CCCCCCCCCCCCCCCC +CC000000000000CC +C02220LLFFF0220C +C0220LLFFFF0220C +C0220LLF0F00220C +C0220LLFFFF0220C +C0220LLFFFF0220C +C02220LLFFF0220C +C00000000000000C +C01111111111110C +C01100011000110C +C01101111010110C +C01110011000110C +C01100111111110C +CC000000000000CC +CCCCCCCCCCCCCCCC`, wallnut), // Cost: 50 + PlantCard(bitmap` +CCCCCCCCCCCCCCCC +CC000000000000CC +C02200002220220C +C02044440004020C +C02044244444020C +C02044044444020C +C02044440004020C +C02200002220220C +C00000000000000C +C01111111111110C +C01101000100010C +C01101010101010C +C01101000100010C +C01111111111110C +CC000000000000CC +CCCCCCCCCCCCCCCC`, peashooter), // Cost: 100 + PlantCard(bitmap` +CCCCCCCCCCCCCCCC +CC000000000000CC +C02022000022020C +C00700777700700C +C02070772777700C +C00700770777700C +C02020777700700C +C02222000022020C +C00000000000000C +C01111111111110C +C01101000100010C +C01101110101110C +C01101101110010C +C01111111100110C +CC000000000000CC +CCCCCCCCCCCCCCCC`, snowPea), // Cost: 175 + PlantCard(bitmap` +CCCCCCCCCCCCCCCC +CC000000000000CC +C02002000022020C +C00DD0444400400C +C020D0442444400C +C00D00440444400C +C00DD0444400400C +C02002000022020C +C00000000000000C +C01111111111110C +C01000100010000C +C01110101010100C +C01001100010000C +C01000111111110C +CC000000000000CC +CCCCCCCCCCCCCCCC`, repeaterPea), // Cost: 200 +]; + +// Functions +function generateRandomMap(level) { +} + +let legend = [[ borderCursor.letter, borderCursor.bitmap ], [ cursor.letter, cursor.bitmap ], [ sunlight.letter, sunlight.bitmap ]]; +for (let bullet of Object.keys(BULLETS)) { + legend.push([ BULLETS[bullet].letter, BULLETS[bullet].bitmap ]); +} +legend.push([ zombie.letter, zombie.bitmap ]); +for (let card of plantCards) { + legend.push([ card.letter, card.bitmap ]); + legend.push([ card.plant.letter, card.plant.bitmap ]); +} + +setLegend(...[ + ...legend, + [ lightGreenGrass.letter, lightGreenGrass.bitmap ], + [ darkGreenGrass.letter, darkGreenGrass.bitmap ], + [ stone.letter, stone.bitmap ], + [ brown.letter, brown.bitmap ] +]); + +const initGrid = map` +sFDEABCssss +sjkjkjkjkjk +skjkjkjkjkj +sjkjkjkjkjk +skjkjkjkjkj +sjkjkjkjkjk +sssssssssss`; +const mapSize = { x: 10, y: 6 }; +function Grid(changes) { + let grid = initGrid; + if (changes) { + for (let key of Object.key(changes)) grid[key] = changes[key]; + } + return grid; +} + +function createNewSun() { + // Create new sun at random location + const x = random(1, mapSize.x); + const y = random(1, mapSize.y); + return { + bitmap, + x, + y + }; +} + +function validX(x) { + if (x > 0 && x < width()) return true; + return false; +} + +function validY(y) { + if (y > 0 && y < height()) return true; + return false; +} + +function GameClass() { + return { + sprites: [], + plantSprites: [], + zombieSprites: [], + sunlight: [], + map: undefined, + amount: 0, + init: function (map) { + this.map = map; + setMap(this.map); + addSprite(borderChoice + 1, 0, borderCursor.letter); + addText(String(this.amount), { x: 0, y: 0, color: color`6`}); + }, + addSprite: function (sprite) { + this.sprites.push(sprite); + }, + run: function (timestamp) { + // First, clear every sprite that isn't static or a plant + for (let plant of this.plantSprites) { + // Check if plant collided with zombie, and "kill" plant based on zombie.attackingPlant + const zombie = this.zombieSprites.filter(zombie => zombie.x === plant.x && zombie.y === plant.y); + + if (plant.run) { + const res = plant.run(timestamp); + if (res && res.type === "sunlight" && this.sunlight.length < MAX_SUNLIGHT) { + // Put on screen once + addSprite(res.x, res.y, res.letter); + this.sunlight.push(res); + } else if (Array.isArray(res)) { + for (let sprite of res) { + // Add each sprite (most likely bullets) to the list of sprites. + addSprite(sprite.x, sprite.y, sprite.letter); + this.sprites.push(sprite); + } + } + } + } + let newSprites = []; + for (let sprite of this.sprites) { + const past = getTile(sprite.x, sprite.y).filter(tile => tile.type === sprite.letter)[0]; + past.remove(); + sprite.run(timestamp); + // Check if sprite is bullet, and if so, whether or not it has collided with zombie + if (sprite.letter === BULLETS.green.letter || sprite.letter === BULLETS.blue.letter) { + const zombie = this.zombieSprites.filter(zombie => zombie.x === sprite.x && zombie.y === sprite.y); + if (zombie.length) { + let zombieSprite = zombie[0]; // First zombie + sprite.collide(zombieSprite); + continue; + } + } + if (validY(sprite.y) && sprite.x < width() - 1) { + addSprite(sprite.x, sprite.y, sprite.letter); + newSprites.push(sprite); + } + } + this.sprites = newSprites; + let newZombies = []; + for (let sprite of this.zombieSprites) { + const past = getTile(sprite.x, sprite.y).filter(tile => tile.type === sprite.letter)[0]; + past.remove(); + sprite.run(timestamp); + if (validX(sprite.x) && validY(sprite.y) && sprite.health > 0) { + addSprite(sprite.x, sprite.y, sprite.letter); + newZombies.push(sprite); + } + } + this.zombieSprites = newZombies; + clearText(); + addText(String(this.amount), { x: 0, y: 0, color: color`6` }); + } + }; +} + +let game = GameClass(); +game.init(initGrid); + +onInput("a", () => { + if (borderChoice > 0 && !cursor.active) borderChoice--; +}); + +onInput("d", () => { + if (borderChoice !== plantCards.length - 1 && !cursor.active) borderChoice++; +}); + +onInput("s", () => { + // Let user place a sprite! But only if they have the requisite amount of sunlight + const plant = plantCards[borderChoice].plant; + console.log(plant); + if (plant.cost > game.amount) return; + if (!getAll(cursor.letter).length) { + addSprite(cursor.x, cursor.y, cursor.letter); + cursor.active = true; + } +}); + +onInput("w", () => { + // Put down sprite + for (let sprite of game.plantSprites) { + if (sprite.x === cursor.x && sprite.y === cursor.y) return; + } + addSprite(cursor.x, cursor.y, plantCards[borderChoice].plant.letter); + const tiles = getTile(cursor.x, cursor.y); + clearTile(cursor.x, cursor.y); + for (let tile of tiles) { + if (tile._type !== cursor.letter) addSprite(cursor.x, cursor.y, tile._type); + } + const plant = plantCards[borderChoice].plant; + plant.x = cursor.x; + plant.y = cursor.y; + game.plantSprites.push(plant); + game.amount -= plant.cost; + cursor.active = false; + cursor.x = 1; + cursor.y = 1; +}); + +onInput("i", () => { + if (cursor.y <= 1 || !cursor.active) return; + getFirst(cursor.letter).y--; + cursor.y--; +}); + +onInput("j", () => { + if (cursor.x <= 1 || !cursor.active) return; + getFirst(cursor.letter).x--; + cursor.x--; +}); + +onInput("l", () => { + if (cursor.x >= mapSize.x || !cursor.active) return; + getFirst(cursor.letter).x++; + cursor.x++; +}); + +onInput("k", () => { + if (!cursor.active) { + // If cursor isn't active, this collects sunlight + if (game.sunlight.length) { + const collected = game.sunlight[0]; + game.sunlight = game.sunlight.slice(1); // Remove first one + const sprite = getTile(collected.x, collected.y).filter(tile => tile.type === sunlight.letter)[0]; + sprite.remove(); + game.amount += SUN_VALUE; + } + } + else if (cursor.y >= mapSize.y - 1) return; + else { + getFirst(cursor.letter).y++; + cursor.y++; + } +}); + +afterInput(() => { + getFirst(borderCursor.letter).x = borderChoice + 1; + addText(String(game.amount), { x: 0, y: 0, color: color`6`}); +}); + +let last = new Date(); +let sunlightCount = 0; +let zombieCount = 0; +setInterval(() => { + let timestamp = new Date() - last; + sunlightCount += timestamp; + if (sunlightCount >= NEW_SUN && game.sunlight.length < 5) { + sunlightCount = 0; + const newSun = Sun(random(0, mapSize.x), random(0, mapSize.y)); + addSprite(newSun.x, newSun.y, newSun.letter); + game.sunlight.push(newSun); + } + zombieCount += timestamp; + if (zombieCount >= NEW_ZOMBIE) { + zombieCount = 0; + const newZombie = Zombie(mapSize.x, random(1, mapSize.y - 1)); + addSprite(newZombie.x, newZombie.y, newZombie.letter); + game.zombieSprites.push(newZombie); + } + game.run(timestamp); + last = new Date(); + // Every so often, we need to generate a zombie at (last x, random y from mapSize.y + 1 to mapSize.y - 1). These should automatically start moving + // We should also have bulletSprites that have collide() functions when they collide with zombies. + // Also make sure to run collide() functions on the plants themselves (for example, wallnut). + // Every run(), check if any of the zombies reach the end (behind the plants). If they do, the game is over. + // For now, if the player kills 100 zombies (10 for test), the player wins. Clear screen, clearInterval, game over. +}, 1000 / 60); From 18cc52152256429c4ada50160a0253981fd74101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Popovi=C4=87?= <63392259+markonije@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:41:02 +0100 Subject: [PATCH 49/92] Create ValentinesGame.js --- games/ValentinesGame.js | 137 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 games/ValentinesGame.js diff --git a/games/ValentinesGame.js b/games/ValentinesGame.js new file mode 100644 index 0000000000..b8bf9a0e70 --- /dev/null +++ b/games/ValentinesGame.js @@ -0,0 +1,137 @@ +/* +@title: ValentinesGame +@author: Markonije +*/ + +const player1 = "p"; +const player2 = "q"; +const mappa = "m"; +const wall = "w"; + +setLegend( + [ player1, bitmap` +................ +.........333.... +........33333... +.......3333333.. +.......33333333. +.......333333333 +.......333333333 +.......333333333 +........33333333 +.........3333333 +..........333333 +...........33333 +............3333 +.............333 +..............33 +...............3`], + [player2, bitmap` +................ +...333.......... +..33333......... +.3333333........ +33333333........ +33333333........ +33333333........ +33333333........ +3333333......... +333333.......... +33333........... +3333............ +333............. +33.............. +3............... +................`], + [mappa, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000033003300000 +0000333333330000 +0000033333300000 +0000003333000000 +0000000330000000 +0000000000000000 +0000000000000000`], + [wall, bitmap` +1L1L1L1L1L1L1L1L +L1L1L1L1L1L1L1L1 +1L1L1L1L1L1L1L1L +L1L1L1L1L1L1L1L1 +1L1L1L1L1L1L1L1L +L1L1L1L1L1L1L1L1 +1L1L1L1L1L1L1L1L +L1L1L1L1L1L1L1L1 +1L1L1L1L1L1L1L1L +L1L1L1L1L1L1L1L1 +1L1L1L1L1L1L1L1L +L1L1L1L1L1L1L1L1 +1L1L1L1L1L1L1L1L +L1L1L1L1L1L1L1L1 +1L1L1L1L1L1L1L1L +L1L1L1L1L1L1L1L1`] +); + +setSolids([player1, player2, wall]); + +let level = 0; +const levels = [ + map` +...q +.... +..w. +p.w.`, +]; + +setMap(levels[level]); + + +onInput("w", () => { + getFirst(player1).y -= 1 +}); +onInput("a", () => { + getFirst(player1).x -= 1 +}); +onInput("s", () => { + getFirst(player1).y += 1 +}); +onInput("d", () => { + getFirst(player1).x += 1 +}); +onInput("i", () => { + getFirst(player2).y -= 1 +}); +onInput("j", () => { + getFirst(player2).x -= 1 +}); +onInput("k", () => { + getFirst(player2).y += 1 +}); +onInput("l", () => { + getFirst(player2).x += 1 +}); + + +afterInput(() => { + if(getFirst(player1).y === getFirst(player2).y && getFirst(player1).x === getFirst(player2).x-1){ + level = level + 1; + + const currentLevel = levels[level]; + + + if (currentLevel !== undefined) { + setMap(currentLevel); + } else { + setMap(map` +m`); + addText("YOU WON!", { y: 4, color: color`3` }); + } + } +}); From e89c6e2b147f9d79cdc923f9ba4804e31829b9db Mon Sep 17 00:00:00 2001 From: Jianmin Chen <59099858+jianmin-chen@users.noreply.github.com> Date: Mon, 13 Feb 2023 10:11:20 -0500 Subject: [PATCH 50/92] Update plants_vs_zombies.js --- games/plants_vs_zombies.js | 69 ++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/games/plants_vs_zombies.js b/games/plants_vs_zombies.js index 5735db84c6..d4475e1b60 100644 --- a/games/plants_vs_zombies.js +++ b/games/plants_vs_zombies.js @@ -1,7 +1,6 @@ // Constants const AVG_HEALTH = 5; const ZOMBIE_HEALTH = [240, 320]; -const ZOMBIE_SPEED = 2000; const NEW_SUN = 2000; // Every 10 seconds const NEW_ZOMBIE = 10000; // Every 10 seconds const SUN_VALUE = 25; @@ -209,10 +208,9 @@ function Zombie(x, y) { x, y, health: random(...ZOMBIE_HEALTH), - speed: random(1500, 2500), + speed: random(1000, 2500), speedChanged: false, curr: 0, - attackingPlant: false, run: function(timestamp) { this.curr += timestamp; if (this.curr > this.speed) { @@ -220,17 +218,10 @@ function Zombie(x, y) { // Return true if game is over (i.e., this.x = 0) if (this.x === 0) return true; // If plant is in front, you've got to wait a while ("attacking") before destroying the plant and moving forward - const sprites = getTile(this.x - 1, this.y).filter(tile => ![lightGreenGrass, darkGreenGrass].includes(tile.type)); + const sprites = getTile(this.x - 1, this.y).filter(tile => ![lightGreenGrass.letter, darkGreenGrass.letter, sunlight.letter].includes(tile.type)); if (sprites.length && sprites[0].type !== sunlight.letter) { const sprite = sprites[0]; - // "Attack" the plant - that is, wait until the next round - if (!this.attackingPlant) { - this.attackingPlant = true; - this.speed *= 2; // A little bit longer to attack the plant - return; - } else { - this.attackingPlant = false; - } + // "Attack" the plant } else this.x--; if (this.speedChanged) this.speed = random(1500, 2500); // Reset back to original speed return false; @@ -448,7 +439,9 @@ const wallnut = Plant(bitmap` this.health--; if (this.health <= 0) { // Oop, the wallnut dies :( + return false; } + return true; } }); const potatoMine = Plant(bitmap` @@ -476,7 +469,7 @@ const potatoMine = Plant(bitmap` onCollide: function (zombie) { zombie.health = 0; zombie.respond(); - // TODO: Remove oneself + return false; } }); const plants = { @@ -601,10 +594,6 @@ CC000000000000CC CCCCCCCCCCCCCCCC`, repeaterPea), // Cost: 200 ]; -// Functions -function generateRandomMap(level) { -} - let legend = [[ borderCursor.letter, borderCursor.bitmap ], [ cursor.letter, cursor.bitmap ], [ sunlight.letter, sunlight.bitmap ]]; for (let bullet of Object.keys(BULLETS)) { legend.push([ BULLETS[bullet].letter, BULLETS[bullet].bitmap ]); @@ -669,11 +658,14 @@ function GameClass() { sunlight: [], map: undefined, amount: 0, + score: 0, + over: false, init: function (map) { this.map = map; setMap(this.map); addSprite(borderChoice + 1, 0, borderCursor.letter); addText(String(this.amount), { x: 0, y: 0, color: color`6`}); + addText(String(this.score), { x: 19, y: 0, color: color`4` }); }, addSprite: function (sprite) { this.sprites.push(sprite); @@ -681,9 +673,13 @@ function GameClass() { run: function (timestamp) { // First, clear every sprite that isn't static or a plant for (let plant of this.plantSprites) { - // Check if plant collided with zombie, and "kill" plant based on zombie.attackingPlant + // Check if plant collided with zombie, and "kill" plant based on zombie.attackingPlant, or let plant serve as defense const zombie = this.zombieSprites.filter(zombie => zombie.x === plant.x && zombie.y === plant.y); - + if (zombie.length) { + if (plant.onCollide) { + // Plant has a onCollide function + } + } if (plant.run) { const res = plant.run(timestamp); if (res && res.type === "sunlight" && this.sunlight.length < MAX_SUNLIGHT) { @@ -721,17 +717,27 @@ function GameClass() { this.sprites = newSprites; let newZombies = []; for (let sprite of this.zombieSprites) { + if (sprite.x === 0) { + // Check if zombie has reached behind plants - if so, the game is over + addText("Oopsies! Try again?", { x: 3, y: 10, color: color`3` }); + game.over = true; + clearInterval(gameloop); + } const past = getTile(sprite.x, sprite.y).filter(tile => tile.type === sprite.letter)[0]; past.remove(); sprite.run(timestamp); if (validX(sprite.x) && validY(sprite.y) && sprite.health > 0) { addSprite(sprite.x, sprite.y, sprite.letter); newZombies.push(sprite); + } else if (sprite.health < 0) { + // Zombie killed + this.score++; } } this.zombieSprites = newZombies; clearText(); addText(String(this.amount), { x: 0, y: 0, color: color`6` }); + addText(String(this.score), { x: 19, y: 0, color: color`4` }); } }; } @@ -740,14 +746,15 @@ let game = GameClass(); game.init(initGrid); onInput("a", () => { - if (borderChoice > 0 && !cursor.active) borderChoice--; + if (!game.over && borderChoice > 0 && !cursor.active) borderChoice--; }); onInput("d", () => { - if (borderChoice !== plantCards.length - 1 && !cursor.active) borderChoice++; + if (!game.over && borderChoice !== plantCards.length - 1 && !cursor.active) borderChoice++; }); onInput("s", () => { + if (game.over) return; // Let user place a sprite! But only if they have the requisite amount of sunlight const plant = plantCards[borderChoice].plant; console.log(plant); @@ -759,6 +766,7 @@ onInput("s", () => { }); onInput("w", () => { + if (game.over) return; // Put down sprite for (let sprite of game.plantSprites) { if (sprite.x === cursor.x && sprite.y === cursor.y) return; @@ -780,24 +788,25 @@ onInput("w", () => { }); onInput("i", () => { - if (cursor.y <= 1 || !cursor.active) return; + if (game.over || cursor.y <= 1 || !cursor.active) return; getFirst(cursor.letter).y--; cursor.y--; }); onInput("j", () => { - if (cursor.x <= 1 || !cursor.active) return; + if (game.over || cursor.x <= 1 || !cursor.active) return; getFirst(cursor.letter).x--; cursor.x--; }); onInput("l", () => { - if (cursor.x >= mapSize.x || !cursor.active) return; + if (game.over || cursor.x >= mapSize.x || !cursor.active) return; getFirst(cursor.letter).x++; cursor.x++; }); onInput("k", () => { + if (game.over) return; if (!cursor.active) { // If cursor isn't active, this collects sunlight if (game.sunlight.length) { @@ -816,6 +825,7 @@ onInput("k", () => { }); afterInput(() => { + if (game.over) return; getFirst(borderCursor.letter).x = borderChoice + 1; addText(String(game.amount), { x: 0, y: 0, color: color`6`}); }); @@ -823,7 +833,13 @@ afterInput(() => { let last = new Date(); let sunlightCount = 0; let zombieCount = 0; -setInterval(() => { +let gameloop = setInterval(() => { + if (game.score === 100) { + // Player wins! + addText("You saved the day!", { x: 1, y: 10, color: color`3` }); + game.over = true; + clearInterval(gameloop); + } let timestamp = new Date() - last; sunlightCount += timestamp; if (sunlightCount >= NEW_SUN && game.sunlight.length < 5) { @@ -841,9 +857,6 @@ setInterval(() => { } game.run(timestamp); last = new Date(); - // Every so often, we need to generate a zombie at (last x, random y from mapSize.y + 1 to mapSize.y - 1). These should automatically start moving // We should also have bulletSprites that have collide() functions when they collide with zombies. // Also make sure to run collide() functions on the plants themselves (for example, wallnut). - // Every run(), check if any of the zombies reach the end (behind the plants). If they do, the game is over. - // For now, if the player kills 100 zombies (10 for test), the player wins. Clear screen, clearInterval, game over. }, 1000 / 60); From a65fee4f19f4cbabbe62f3c79378f1d01439299a Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Mon, 13 Feb 2023 13:07:19 -0300 Subject: [PATCH 51/92] fix bug --- games/ValentinesGame.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/games/ValentinesGame.js b/games/ValentinesGame.js index b8bf9a0e70..a82b7799db 100644 --- a/games/ValentinesGame.js +++ b/games/ValentinesGame.js @@ -94,28 +94,36 @@ setMap(levels[level]); onInput("w", () => { - getFirst(player1).y -= 1 + if(!getFirst(player1)) return; + getFirst(player1).y -= 1 }); onInput("a", () => { - getFirst(player1).x -= 1 + if(!getFirst(player1)) return; + getFirst(player1).x -= 1 }); onInput("s", () => { - getFirst(player1).y += 1 + if(!getFirst(player1)) return; + getFirst(player1).y += 1 }); onInput("d", () => { - getFirst(player1).x += 1 + if(!getFirst(player1)) return; + getFirst(player1).x += 1 }); onInput("i", () => { + if(!getFirst(player1)) return; getFirst(player2).y -= 1 }); onInput("j", () => { - getFirst(player2).x -= 1 + if(!getFirst(player2)) return; + getFirst(player2).x -= 1 }); onInput("k", () => { - getFirst(player2).y += 1 + if(!getFirst(player2)) return; + getFirst(player2).y += 1 }); onInput("l", () => { - getFirst(player2).x += 1 + if(!getFirst(player2)) return; + getFirst(player2).x += 1 }); From 872e507b46d5f71c9707e6ac8f2f3d3781068d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Popovi=C4=87?= <63392259+markonije@users.noreply.github.com> Date: Mon, 13 Feb 2023 17:15:13 +0100 Subject: [PATCH 52/92] fix bug --- games/ValentinesGame.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/games/ValentinesGame.js b/games/ValentinesGame.js index a82b7799db..b455077c9a 100644 --- a/games/ValentinesGame.js +++ b/games/ValentinesGame.js @@ -110,7 +110,7 @@ onInput("d", () => { getFirst(player1).x += 1 }); onInput("i", () => { - if(!getFirst(player1)) return; + if(!getFirst(player2)) return; getFirst(player2).y -= 1 }); onInput("j", () => { @@ -128,6 +128,8 @@ onInput("l", () => { afterInput(() => { + if(!getFirst(player1)) return; + if(!getFirst(player2)) return; if(getFirst(player1).y === getFirst(player2).y && getFirst(player1).x === getFirst(player2).x-1){ level = level + 1; From 615b76a43e644fb941937c9646595d09aca92554 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Mon, 13 Feb 2023 13:23:19 -0300 Subject: [PATCH 53/92] add #792 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 00be2cb33c..28e07a4636 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2086,5 +2086,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-12" + }, + { + "filename": "ValentinesGame", + "title": "ValentinesGame", + "author": "Markonije", + "img": "", + "tags": ["puzzle"], + "addedOn": "2023-02-13" } ] From 3f73b16c649998e65f1e81aac5fd2cd7486166c1 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Mon, 13 Feb 2023 13:39:38 -0300 Subject: [PATCH 54/92] add #788 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 28e07a4636..4404946533 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2094,5 +2094,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-13" + }, + { + "filename": "bannai-snake", + "title": "bannai-snake", + "author": "aagrim hoysal", + "img": "", + "tags": ["puzzle"], + "addedOn": "2023-02-13" } ] From e9453edb39f43bc9b496cc9a41b3404094dd2aa0 Mon Sep 17 00:00:00 2001 From: sahilchess <125219792+sahilchess@users.noreply.github.com> Date: Mon, 13 Feb 2023 16:48:44 -0500 Subject: [PATCH 55/92] Update The Maze of Sprig.js --- The Maze of Sprig.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/The Maze of Sprig.js b/The Maze of Sprig.js index 79d4b0e133..3e49a18485 100644 --- a/The Maze of Sprig.js +++ b/The Maze of Sprig.js @@ -2,6 +2,22 @@ @title: The Maze of Sprig @author: SahilD */ +/* +instructions +Get your character to the green teleporter to get to the next level. +Controls: W = up + S = down + A = left + d = right + J = restart + +*/ +/* +Have you ever got a liitle bored and your mom told you, "You can't get on your computer!" +Then get your sprig and play The Maze of Sprig. It is a fun game with sound and cool blocks. You can also add your own maps so you can play at your own will! +*/ + + const player = "p"; const wall = "w"; From a24b7606ecb18e1c33c80a28870b721d8e254c2d Mon Sep 17 00:00:00 2001 From: Kai <109107855+KaiEtkin@users.noreply.github.com> Date: Mon, 13 Feb 2023 21:50:11 -0800 Subject: [PATCH 56/92] Add files via upload --- games/the_hungry_mouse.js | 224 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 games/the_hungry_mouse.js diff --git a/games/the_hungry_mouse.js b/games/the_hungry_mouse.js new file mode 100644 index 0000000000..46a573fcb0 --- /dev/null +++ b/games/the_hungry_mouse.js @@ -0,0 +1,224 @@ +/* +@title: the_hungry_mouse +@author: KaiEtkin +*/ + +const player = "p"; +const cheese = "c"; +const cheese2 = "v"; +const cheese3 = "b"; +const cheese4 = "n"; +const trap = "t"; + +setLegend( + [ player, bitmap` +................ +................ +..........11.... +..........11.... +..........11.1.. +....LLLLLLLL.11. +8..LLLLLLLLL11.. +88.LLLLLLLLL1L.. +.88LLLLLLLLLLL.. +...LLLLLLLLLLL.. +...LLLLLLLLLLL.. +....LLLLLLLLL... +....LLLLLL...... +................ +................ +................`], + [ cheese, bitmap` +................ +................ +...............6 +..............66 +............6666 +..........666666 +........66666666 +.....66666666666 +...6666666666666 +.666666666666666 +6666666666666666 +6666666666666666 +6666666666666666 +6666666666666666 +............6... +................`], + [ cheese2, bitmap` +................ +................ +......666....... +.....666666..... +....666666666... +....666666666... +...66FF666666... +...66FF666666... +...66666666FF... +...666F6666FF... +...66FF66666F... +...66FF666666... +....6666666..... +................ +................ +................`], + [cheese3, bitmap` +................ +................ +................ +...6666......... +..666666........ +..6FF6666....... +..66F66666...... +..6666666666.... +...6666F66666... +...6666FF6666... +....666FF666666. +.....6666666666. +................ +................ +................ +................`], + [cheese4, bitmap` +....66.......... +....666......... +....6F66........ +....6FF66....... +.....FF6666..... +...66666666..... +...666666666.... +....6666666..... +....6FF6666..... +....6FF6FF6..... +....6666FF6..... +....6666666..... +....666666...... +......6......... +................ +................`], + [trap, bitmap` +................ +................ +................ +....CCCCCC...... +....C1CCC1...... +....C1CC11...... +....C11C1C...... +....CC1C1C...... +....CC111C...... +....CCCCCC...... +....CC66CC...... +....CC66CC...... +....CCCCCC...... +....CCCCCC...... +....CCCCCC...... +................`], +); + +setSolids([]); + +let level = 0; +let cheeses = 0; +let dead = false; +const levels = [ + map` +p...t.. +...t.v. +.t.t..t +.c...t. +...t.n. +.t.b... +.t..t.t`, +]; + +setMap(levels[level]); + +setPushables({ + [ player ]: [], +}); + +onInput("w", () => { + getFirst(player).y -= 1 +}); + +onInput("a", () => { + getFirst(player).x -= 1 +}); + +onInput("s", () => { + getFirst(player).y += 1 +}); + +onInput("d", () => { + getFirst(player).x += 1 +}); + +const constantCheck = () => { + const { y: playerY, x: playerX } = getFirst(player); + + const gotCheese = tilesWith(cheese, player).length; + const gotTrapped = tilesWith(trap, player).length; + const gotCheese2 = tilesWith(cheese2, player).length; + const gotCheese3 = tilesWith(cheese3, player).length; + const gotCheese4 = tilesWith(cheese4, player).length; + + if (gotCheese) { + cheeses = cheeses +1; + addText(cheeses.toString(), { y: 1, color: color`7` }); + getFirst(cheese).remove() + } + if (gotTrapped) { + dead = true; + setMap(map` +tttttttt +tttttttt +tt....tt +tttttttt +tttttttt +tttttttt +tttttttt +tttttttt`); + clearText(); + addText('You Lost!', {y: 4, color: color`7`}); + + } + + if(gotCheese2){ + cheeses = cheeses +1; + addText(cheeses.toString(), { y: 1, color: color`7` }); + + getFirst(cheese2).remove() + + } + if(gotCheese3){ + cheeses = cheeses +1; + addText(cheeses.toString(), { y: 1, color: color`7` }); + + getFirst(cheese3).remove() + + } + if(gotCheese4){ + cheeses = cheeses +1; + addText(cheeses.toString(), { y: 1, color: color`7` }); + + getFirst(cheese4).remove() + + } + +if(cheeses >= 4){ + setMap(map` +bbbbbbbb +bbbbbbbb +b......b +bbbbbbbb +bbbbbbbb +bbbbbbbb +bbbbbbbb +bbbbbbbb`); + clearText(); + addText('You Won!!!!', {y: 4, color: color`7`}); +} +}; +afterInput(() => { + constantCheck(); +}); From 96a43a2d75b7f4daffe2fb95825e29f8b72dcb88 Mon Sep 17 00:00:00 2001 From: Kai <109107855+KaiEtkin@users.noreply.github.com> Date: Mon, 13 Feb 2023 21:52:00 -0800 Subject: [PATCH 57/92] Add files via upload --- games/img/the_hungry_mouse | Bin 0 -> 63129 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 games/img/the_hungry_mouse diff --git a/games/img/the_hungry_mouse b/games/img/the_hungry_mouse new file mode 100644 index 0000000000000000000000000000000000000000..80be0833191f95e66a4e3100ab544f35cb7769a2 GIT binary patch literal 63129 zcmeFa2Uru^x;G9nYy(7T0@;ER1Vp993R0seRmF}-w_ybo5TwVgu>y8bY1^(SMO08) zG%DK$SV8GFP!J-;1OmzT&SWM6a{k}_fA^kqPhmfgnCT-a2dcEnHwbLT0p# zgoMNhd%HP{B_yPn$Uo9=@Qazs)<6jfN!Jb5)(h>et*HyQ`K{Zqd98%Rgu_9H935vb z8nrv#m@Uu#ZRChu<45{xj<#T~Tf``PFt#JQE;N5*YR-r6%Za^`KD~@}&(!A1jjlMi zD4R+;RX$Bd`tbt(`tvGVDw^XSn4XSMN$pHXRIQTOe@koeOQk(F*lqA5=#M)! zK5q}SZvM-~0TGL8j3&TJZa>4c@E@8;E$yh1Jk-6i&~U17g&{(Ol^@R=k*lpHM~ z1)n70pQWUl__K}V1c_nj?*s{nJsTv5*q8=Vv%3F>8sny*>P0vU=OvwY~xC{Q^_Z7ns5i(*AZX0TL1_I>Mi%tK7!4I(#BcJP^nb&ZEMz=b2e-N zn!zj zeP|&fH2N!0+ET{cNX#`$8NG-UC19lbhB;14;V+08@*jZ>|C=ECi+m25U`a{8BOyVT zu%9z)X^3QV#pDdbCqd)ajU>{tJ{wJ-)y=bFEwo{crM)N4J0?S;Owm-bQ9Y<0k~q)q z;N;7Szb)6UcsLW@*{VfRg3kD;vT#rM&hGdL3}|-NoRb;Lhys zmSw$y1H!Mi!e>H$oUqA^xqrp#XB@RY+iq&VP_tT z_R7^hIOv=vbLg~iyFV?)4&!-$c~dg`W)Nr}8xl&AEoZso27nY_u{$yFj7tr+Dv4wwI*Bg-aG zDZcj$o}8Cr2VXuGG>9(oW&q9oK7=%-k(hq&mIrk4NmjVkl}CMVIFR9g?NbD|xAo1+ zL$6USW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K|7TI8Rz|oNptC@m- zt@}~-J)ZBw#4uoA=0hZ~)v)XQ$I8|3Y)*bZG1cSE)r1Q3!gk=QYd5Z zQs@M!1JyBqRvnnKPkZ0pztfp(mV^QYYQ$cgoBFP}=H4o6|4+6>s%Q-r>i`x{usUFO z>p?i{vM;e8-@e-~^FVnmu~7_x_Y<`z-dKI`L*664Ms=25%_<#t zL9H8*I*`@-LDAHeU;h6ogM23F;@A1Cz}C%gnfcpaots?Kk6yvO;S+Hb0;>bXD7a}< zv-`I``;XBm9*yGBTs)eK@fFl3O@&|OMqTEk^40Wn^y!Z bxc`XHY7q4OwR+NZ1|aZs^>bP0l+XkK2F)>- literal 0 HcmV?d00001 From f87ece2efaf7a0c84de5897bc7d880fcb135c906 Mon Sep 17 00:00:00 2001 From: Jianmin Chen <59099858+jianmin-chen@users.noreply.github.com> Date: Tue, 14 Feb 2023 07:04:30 -0500 Subject: [PATCH 58/92] Plants vs. Zombies is ready! --- games/plants_vs_zombies.js | 1289 +++++++++++++++++++++--------------- 1 file changed, 760 insertions(+), 529 deletions(-) diff --git a/games/plants_vs_zombies.js b/games/plants_vs_zombies.js index d4475e1b60..858cc2b98d 100644 --- a/games/plants_vs_zombies.js +++ b/games/plants_vs_zombies.js @@ -1,52 +1,35 @@ -// Constants -const AVG_HEALTH = 5; -const ZOMBIE_HEALTH = [240, 320]; -const NEW_SUN = 2000; // Every 10 seconds -const NEW_ZOMBIE = 10000; // Every 10 seconds -const SUN_VALUE = 25; -const MAX_SUNLIGHT = 5; // 5 at any given time - collect them! -const BULLETS = { - green: { letter: "y", bitmap: bitmap` -................ -................ -................ -.....000000..... -....0DDDDDD0.... -...0DDDDD4440... -...0DD2244440... -...0DD2444440... -...0DD4444440... -...0D44444440... -...0D44444440... -....04444440.... -.....000000..... -................ -................ -................` }, - blue: { letter: "x", bitmap: bitmap` -................ -................ -................ -.....000000..... -....05555550.... -...0555557770... -...0552277770... -...0552777770... -...0557777770... -...0577777770... -...0577777770... -....07777770.... -.....000000..... -................ -................ -................` } -}; +/* + @title: Plants vs. Zombies + @author: jianmin-chen -function random(min, max) { // min and max included - return Math.floor(Math.random() * (max - min + 1) + min) -} + Instructions: + Use A + D to choose which plant to put down. + Use S to make selection, then use IJKL to move the selection cursor around. + Use W to finally put down the plant. + Goal: Kill 10 zombies to win. Don't let the zombies touch the stone, or they win! + Types of plants (find a working strategy!): + * Peashooter: Shoots peas + * Snow pea: Shoots peas, but also slows down zombies + * Repeater: Shoots peas faster + * Wallnut: Line of defense + * Potato mine: Detonates on touching a zombie. + * Sunflower: The must-have. Faster sunflower generation. + Feel free to adjust the options below +*/ -let borderCursor = { letter: "h", bitmap: bitmap` +// Options +const sunValue = 25 +const newSun = 20000 // Every 20 seconds +const maxSuns = 5 +const newZombie = 12000 // Every 12 seconds +const zombieHealth = [240, 320] +const zombieSpeed = [1000, 2500] +const zombieDamage = [10, 20] + +// Cursors +let borderCursor = { + letter: 'a', + bitmap: bitmap` 6666666666666666 6..............6 6..............6 @@ -62,10 +45,12 @@ let borderCursor = { letter: "h", bitmap: bitmap` 6..............6 6..............6 6..............6 -6666666666666666` }; -let borderChoice = 0; - -let cursor = { letter: "i", bitmap: bitmap` +6666666666666666` +} +let borderChoice = 0 +let cursor = { + letter: 'b', + bitmap: bitmap` 8888888888888888 8..............8 8..............8 @@ -81,10 +66,16 @@ let cursor = { letter: "i", bitmap: bitmap` 8..............8 8..............8 8..............8 -8888888888888888`, x: 1, y: 1, active: false }; +8888888888888888`, + x: 1, + y: 1, + active: false +} -// Map -const lightGreenGrass = { letter: "k", bitmap: bitmap` +// Map sprites +const lightGreenGrass = { + letter: 'c', + bitmap: bitmap` 4444444444444444 44D4444444444444 4444444444444444 @@ -100,8 +91,11 @@ const lightGreenGrass = { letter: "k", bitmap: bitmap` 444D44444D444444 44444444444444D4 4444444444444444 -4444444444444444` }; -const darkGreenGrass = { letter: "j", bitmap: bitmap` +4444444444444444` +} +const darkGreenGrass = { + letter: 'd', + bitmap: bitmap` DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDD DDDDDDDDDDDD4DDD @@ -117,8 +111,11 @@ DDDDDD4DDDDDDDDD DDDDDDDDDDDDDDDD DDDDDDDDDDDD4DDD DDDDDDDDDDDDDDDD -DDDDDDDDDDDDDDDD` }; -const stone = { letter: "s", bitmap: bitmap` +DDDDDDDDDDDDDDDD` +} +const stone = { + letter: 'e', + bitmap: bitmap` LLLLLLLLLLLLLLLL L11111111111111L L11111111111111L @@ -134,8 +131,11 @@ L11111111111111L L11111111111111L L11111111111111L L11111111111111L -LLLLLLLLLLLLLLLL` }; -const brown = { letter: "g", bitmap: bitmap` +LLLLLLLLLLLLLLLL` +} +const brown = { + letter: 'f', + bitmap: bitmap` LCCCCCCCCCCCCCCC LCCCCCCCCCCCCCCC LCCCCCCCCCCCCCCC @@ -151,154 +151,181 @@ LCCCCCCCCCCCCCCC LCCCCCCCCCCCCCCC LCCCCCCCCCCCCCCC LCCCCCCCCCCCCCCC -LLLLLLLLLLLLLLLL` }; -const grasses = { - lightGreenGrass, - darkGreenGrass -}; -const sunlight = {letter: "z", bitmap: bitmap` -.......00....... -......0660...... -.000.066660.000. -.06606666660660. -.06666000066660. -..0660FFFF0660.. -.0660FFFFFF0660. -06660FFFFFF06660 -06660FFFFFF06660 -.0660FFFFFF0660. -..0660FFFF0660.. -.06666000066660. -.06606666660660. -.000.066660.000. -......0660...... -.......00.......`}; - -function Sun(x, y) { - return { - x, - y, - letter: "z", - type: "sunlight" - }; -}; - -// Zombies -const zombie = { letter: "w", bitmap: bitmap` +LLLLLLLLLLLLLLLL` +} +const grasses = { lightGreenGrass, darkGreenGrass } +const sunlight = { + letter: 'g', + bitmap: bitmap` ................ -..00000......... -.0111110........ -.010101L000..... -.012121L0FF0.... -.011111L0FFF0... -.0LL2100LFFFF0.. -.02LL0F0LFFFF0.. -..0000F0LFFFF0.. -.....0F000L0L0.. -....00F05505050. -....00F00550500. -..00L0111005500. -.0FFL010101100L. -.000000.0..0LFF. -................` }; -function Zombie(x, y) { - return { - bitmap: zombie.bitmap, - letter: zombie.letter, - x, - y, - health: random(...ZOMBIE_HEALTH), - speed: random(1000, 2500), - speedChanged: false, - curr: 0, - run: function(timestamp) { - this.curr += timestamp; - if (this.curr > this.speed) { - this.curr = 0; - // Return true if game is over (i.e., this.x = 0) - if (this.x === 0) return true; - // If plant is in front, you've got to wait a while ("attacking") before destroying the plant and moving forward - const sprites = getTile(this.x - 1, this.y).filter(tile => ![lightGreenGrass.letter, darkGreenGrass.letter, sunlight.letter].includes(tile.type)); - if (sprites.length && sprites[0].type !== sunlight.letter) { - const sprite = sprites[0]; - // "Attack" the plant - } else this.x--; - if (this.speedChanged) this.speed = random(1500, 2500); // Reset back to original speed - return false; - } else return false; - } - }; +................ +................ +................ +......0000...... +.....066660..... +....06600660.... +....060FF060.... +....060FF060.... +....06600660.... +.....066660..... +......0000...... +................ +................ +................ +................` } +const bullets = { + green: { + letter: 'h', + bitmap: bitmap` +................ +................ +................ +...........00... +..........0420.. +..........0440.. +...........00... +................ +................ +................ +................ +................ +................ +................ +................ +................` + }, + blue: { + letter: 'i', + bitmap: bitmap` +................ +................ +................ +...........00... +..........0720.. +..........0770.. +...........00... +................ +................ +................ +................ +................ +................ +................ +................ +................` + } +} + +// Functions +const random = (min, max) => Math.floor(Math.random() * (max - min + 1) + min) +const getSprites = (x, y) => + getTile(x, y).filter( + tile => + ![ + stone.letter, + lightGreenGrass.letter, + darkGreenGrass.letter, + sunlight.letter + ].includes(tile.type) + ) +const validX = x => (x > 0 && x < width() - 1 ? true : false) +const validY = y => (y > 0 && y < height() - 1 ? true : false) -function shootBullet(x, y, type, collide) { +function Sun(x = random(0, width() - 1), y = random(0, height() - 1)) { + return { x, y, letter: sunlight.letter, bitmap: sunlight.bitmap } +} + +function shootBullet(x, y, type, collide, bulletSpeed) { + if (!Object.keys(bullets).includes(type)) + throw new Error('Bullet type does not exist') return { x, y, - letter: BULLETS[type].letter, - bitmap: BULLETS[type].bitmap, + letter: bullets[type].letter, + bitmap: bullets[type].bitmap, collide, - speed: 50, + speed: bulletSpeed, curr: 0, - run: function(timestamp) { - this.curr += timestamp; + run: function (timestamp) { + this.curr += timestamp if (this.curr > this.speed) { - this.curr = 0; - if (this.x < width() - 1) this.x++; // Move "forward" one + this.curr = 0 + if (this.x < width()) this.x++ // Move forward until we reach end } } - }; + } } // Plants -function Plant(bitmap, options={}) { +function Plant(bitmap, options = {}) { // For some reason I can't do ...options? - let res = { bitmap, delta: 0 }; - if (!options.letter || !options.type || !options.cost) throw new Error("Plants need to have a letter, type, cost and a recharge time, ya know?"); - for (let key of Object.keys(options)) res[key] = options[key]; - if (!res.health) res.health = AVG_HEALTH; // I dunno? - return res; + let res = { bitmap } + if (!options.letter || !options.cost) + throw new Error('Not all plant properties provided') + for (let key of Object.keys(options)) res[key] = options[key] + return res } -const peashooter = Plant(bitmap` -................ -.....0000..000.. -....04444004440. -...044424444040. -...044404444040. -...044404DD4040. -....0444D004440. -.....00D0..000.. -......040....... -....0004400..... -....0D40D040.... -...044440DD0.... -...040D444440... -....0.000D4D0... -.........040.... -..........0.....`, { - x: 0, - y: 0, - letter: "a", - type: "offensive", - cost: 100, - bullet: BULLETS.green, - bulletAmount: 1, - recharge: 1500, - onBulletCollide: function (zombie) { - // Peashooters can do 40 damage - zombie.health -= 40; - console.log(zombie); - }, - curr: 0, - run: function(timestamp) { - this.curr += timestamp; - if (this.curr > this.recharge) { - this.curr = 0; - return [shootBullet(this.x, this.y, "green", this.onBulletCollide)]; +function peashooter() { + return Plant( + bitmap` + ................ + .....0000..000.. + ....04444004440. + ...044424444040. + ...044404444040. + ...044404DD4040. + ....0444D004440. + .....00D0..000.. + ......040....... + ....0004400..... + ....0D40D040.... + ...044440DD0.... + ...040D444440... + ....0.000D4D0... + .........040.... + ..........0.....`, + { + x: 0, + y: 0, + letter: 'k', + cost: 100, + health: 200, + bullet: bullets.green, + recharge: 1500, + bulletSpeed: 50, + onBulletCollide: function (zombie) { + zombie.health -= 40 + }, + curr: 0, + run: function (timestamp) { + this.curr += timestamp + if (this.curr > this.recharge) { + this.curr = 0 + return [ + shootBullet( + this.x, + this.y, + 'green', + this.onBulletCollide, + this.bulletSpeed + ) + ] + } + }, + onCollide: function (zombie) { + this.health -= zombie.damage + if (this.health <= 0) return false + return true + } } - } -}); -const snowPea = Plant(bitmap` + ) +} + +function snowpea() { + return Plant( + bitmap` .00............. .070.0000..000.. ..0507777007770. @@ -314,33 +341,53 @@ const snowPea = Plant(bitmap` ...0705777770... ....0.0005750... .........050.... -..........0.....`, { - x: 0, - y: 0, - letter: "b", - type: "offensive", - cost: 175, - speed: 5000, - bullet: BULLETS.blue, - bulletAmount: 1, - recharge: 1200, - onBulletCollide: function (zombie) { - zombie.health -= 40; - if (!zombie.speedChanged) { - zombie.speed *= 2; - zombie.speedChanged = true; - } - }, - curr: 0, - run: function(timestamp) { - this.curr += timestamp; - if (this.curr > this.recharge) { - this.curr = 0; - return [shootBullet(this.x, this.y, "blue", this.onBulletCollide)]; +..........0.....`, + { + x: 0, + y: 0, + letter: 'l', + cost: 225, + health: 120, + bullet: bullets.blue, + bulletSpeed: 50, + recharge: 1200, + onBulletCollide: function (zombie) { + // Besides damage, also slows down zombie + zombie.health -= 40 + if (!zombie.speedChanged) { + // Only change speed if it hasn't changed yet + zombie.speed *= 2 // Actually slows it down + zombie.speedChange = true + } + }, + curr: 0, + run: function (timestamp) { + this.curr += timestamp + if (this.curr > this.recharge) { + this.curr = 0 + return [ + shootBullet( + this.x, + this.y, + 'blue', + this.onBulletCollide, + this.bulletSpeed + ) + ] + } + }, + onCollide: function (zombie) { + this.health -= zombie.damage + if (this.health <= 0) return false + return true + } } - } -}); -const repeaterPea = Plant(bitmap` + ) +} + +function repeater() { + return Plant( + bitmap` ..00............ .04D00000..000.. 04DD04444004440. @@ -356,30 +403,48 @@ const repeaterPea = Plant(bitmap` ...040D444440... ....0.000D4D0... .........040.... -..........0.....`, { - x: 0, - y: 0, - letter: "c", - type: "offensive", - cost: 200, - speed: 3000, - bullet: BULLETS.green, - bulletAmount: 2, - recharge: 750, - onBulletCollide: function (zombie) { - zombie.health -= 40; - - }, - curr: 0, - run: function (timestamp) { - this.curr += timestamp; - if (this.curr > this.recharge) { - this.curr = 0; - return [shootBullet(this.x, this.y, "green", this.onBulletCollide)]; +..........0.....`, + { + x: 0, + y: 0, + letter: 'm', + cost: 200, + health: 200, + bullet: bullets.green, + bulletSpeed: 50, + recharge: 750, + onBulletCollide: function (zombie) { + // Just a faster version of the pea + zombie.health -= 40 + }, + curr: 0, + run: function (timestamp) { + this.curr += timestamp + if (this.curr > this.recharge) { + this.curr = 0 + return [ + shootBullet( + this.x, + this.y, + 'green', + this.onBulletCollide, + this.bulletSpeed + ) + ] + } + }, + onCollide: function (zombie) { + this.health -= zombie.damage + if (this.health <= 0) return false + return true + } } - } -}); -const sunflower = Plant(bitmap` + ) +} + +function sunflower() { + return Plant( + bitmap` .....000000..... ....06666160.... ...0616666610... @@ -395,24 +460,35 @@ const sunflower = Plant(bitmap` ...040D444D0D0.. ....0.00000.0... ................ -................`, { - x: 0, - y: 0, - letter: "d", - type: "sunflower", - cost: 50, - recharge: 10000, - speed: 24000, - curr: 0, - run: function(timestamp) { - this.curr += timestamp; - if (this.curr > this.speed) { - this.curr = 0; - return Sun(random(0, mapSize.x), random(0, mapSize.y)); +................`, + { + x: 0, + y: 0, + letter: 'n', + cost: 50, + health: 200, + recharge: 5000, + speed: 5000, + curr: 0, + run: function (timestamp) { + this.curr += timestamp + if (this.curr > this.speed) { + this.curr = 0 + return Sun() // Generate sun at given interval + } + }, + onCollide: function (zombie) { + this.health -= zombie.damage + if (this.health <= 0) return false + return true + } } - } -}); -const wallnut = Plant(bitmap` + ) +} + +function wallnut() { + return Plant( + bitmap` .......0000..... ......0FFFF0.... .....0LFFFFF0... @@ -428,23 +504,25 @@ const wallnut = Plant(bitmap` ....0LFFFFFFF0.. .....0LFFFFF0... ......000000.... -................`, { - x: 0, - y: 0, - letter: "e", - type: "defensive", - cost: 50, - health: 40, - onCollide: function () { - this.health--; - if (this.health <= 0) { - // Oop, the wallnut dies :( - return false; +................`, + { + x: 0, + y: 0, + letter: 'o', + cost: 50, + health: 400, + onCollide: function () { + this.health-- + if (this.health <= 0) return false + return true + } } - return true; - } -}); -const potatoMine = Plant(bitmap` + ) +} + +function potatomine() { + return Plant( + bitmap` ................ ................ ......000....... @@ -460,37 +538,32 @@ const potatoMine = Plant(bitmap` .0F0F0F000FF0... ..0.0.000F0F0... .........0.0.... -................`, { - x: 0, - y: 0, - letter: "f", - type: "defensive", - cost: 25, - onCollide: function (zombie) { - zombie.health = 0; - zombie.respond(); - return false; - } -}); -const plants = { - peashooter, - snowPea, - repeaterPea, - sunflower, - wallnut, - potatoMine +................`, + { + x: 0, + y: 0, + letter: 'p', + cost: 25, + onCollide: function (zombie) { + // "Detonate" on impact + zombie.health /= 2 + return false + } + } + ) } +const plants = { peashooter, snowpea, repeater, wallnut, potatomine } +const plantLetters = Object.keys(plants).map(plant => plants[plant]().letter) + function PlantCard(bitmap, plant) { - return { - bitmap, - letter: plant.letter.toUpperCase(), - plant, - } -}; + // Cost cards for the plants + return { bitmap, letter: plant().letter.toUpperCase(), plant } +} const plantCards = [ - PlantCard(bitmap` + PlantCard( + bitmap` CCCCCCCCCCCCCCCC CC000000000000CC C022220C3022220C @@ -506,8 +579,11 @@ C01111011011110C C01100111100110C C01100011001110C CC000000000000CC -CCCCCCCCCCCCCCCC`, potatoMine), // Cost: 25 - PlantCard(bitmap` +CCCCCCCCCCCCCCCC`, + potatomine + ), + PlantCard( + bitmap` CCCCCCCCCCCCCCCC CC000000000000CC C02201666660220C @@ -523,8 +599,11 @@ C01101111010110C C01110011000110C C01100111111110C CC000000000000CC -CCCCCCCCCCCCCCCC`, sunflower), // Cost: 50 - PlantCard(bitmap` +CCCCCCCCCCCCCCCC`, + sunflower + ), + PlantCard( + bitmap` CCCCCCCCCCCCCCCC CC000000000000CC C02220LLFFF0220C @@ -540,8 +619,11 @@ C01101111010110C C01110011000110C C01100111111110C CC000000000000CC -CCCCCCCCCCCCCCCC`, wallnut), // Cost: 50 - PlantCard(bitmap` +CCCCCCCCCCCCCCCC`, + wallnut + ), + PlantCard( + bitmap` CCCCCCCCCCCCCCCC CC000000000000CC C02200002220220C @@ -557,8 +639,11 @@ C01101010101010C C01101000100010C C01111111111110C CC000000000000CC -CCCCCCCCCCCCCCCC`, peashooter), // Cost: 100 - PlantCard(bitmap` +CCCCCCCCCCCCCCCC`, + peashooter + ), + PlantCard( + bitmap` CCCCCCCCCCCCCCCC CC000000000000CC C02022000022020C @@ -574,8 +659,11 @@ C01101110101110C C01101101110010C C01111111100110C CC000000000000CC -CCCCCCCCCCCCCCCC`, snowPea), // Cost: 175 - PlantCard(bitmap` +CCCCCCCCCCCCCCCC`, + snowpea + ), + PlantCard( + bitmap` CCCCCCCCCCCCCCCC CC000000000000CC C02002000022020C @@ -591,272 +679,415 @@ C01110101010100C C01001100010000C C01000111111110C CC000000000000CC -CCCCCCCCCCCCCCCC`, repeaterPea), // Cost: 200 -]; +CCCCCCCCCCCCCCCC`, + repeater + ) +] -let legend = [[ borderCursor.letter, borderCursor.bitmap ], [ cursor.letter, cursor.bitmap ], [ sunlight.letter, sunlight.bitmap ]]; -for (let bullet of Object.keys(BULLETS)) { - legend.push([ BULLETS[bullet].letter, BULLETS[bullet].bitmap ]); -} -legend.push([ zombie.letter, zombie.bitmap ]); -for (let card of plantCards) { - legend.push([ card.letter, card.bitmap ]); - legend.push([ card.plant.letter, card.plant.bitmap ]); -} - -setLegend(...[ - ...legend, - [ lightGreenGrass.letter, lightGreenGrass.bitmap ], - [ darkGreenGrass.letter, darkGreenGrass.bitmap ], - [ stone.letter, stone.bitmap ], - [ brown.letter, brown.bitmap ] -]); - -const initGrid = map` -sFDEABCssss -sjkjkjkjkjk -skjkjkjkjkj -sjkjkjkjkjk -skjkjkjkjkj -sjkjkjkjkjk -sssssssssss`; -const mapSize = { x: 10, y: 6 }; -function Grid(changes) { - let grid = initGrid; - if (changes) { - for (let key of Object.key(changes)) grid[key] = changes[key]; - } - return grid; +// Zombies +const zombie = { + letter: 'j', + bitmap: bitmap` +................ +..00000......... +.0111110........ +.010101L000..... +.012121L0FF0.... +.011111L0FFF0... +.0LL2100LFFFF0.. +.02LL0F0LFFFF0.. +..0000F0LFFFF0.. +.....0F000L0L0.. +....00F05505050. +....00F00550500. +..00L0111005500. +.0FFL010101100L. +.000000.0..0LFF. +................` } - -function createNewSun() { - // Create new sun at random location - const x = random(1, mapSize.x); - const y = random(1, mapSize.y); +function Zombie(x, y) { return { - bitmap, + letter: zombie.letter, + bitmap: zombie.bitmap, x, - y - }; + y, + health: random(...zombieHealth), + damage: random(...zombieDamage), + speed: random(...zombieSpeed), + speedChanged: false, + curr: 0, + type: 'zombie', + run: function (timestamp) { + // => true = zombie dead, false = zombie not dead (undead, pun intended) + this.curr += timestamp + if (this.curr > this.speed) { + this.curr = 0 + const plants = getSprites(this.x, this.y).filter(tile => + plantLetters.includes(tile.type) + ) + if (!plants.length) this.x-- // Only move if it hasn't collided with plant + if (this.speedChanged) { + this.speed = random(...zombieSpeed) // Reset zombie speed + this.speedChanged = false + } + return false + } else return false + } + } } -function validX(x) { - if (x > 0 && x < width()) return true; - return false; -} +const blackBackground = 'q' -function validY(y) { - if (y > 0 && y < height()) return true; - return false; +// Legend +// In order of "z-index" +let legend = [ + [ + blackBackground, + bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000` + ], + [borderCursor.letter, borderCursor.bitmap], + [cursor.letter, cursor.bitmap], + [sunlight.letter, sunlight.bitmap] +] +legend.push([zombie.letter, zombie.bitmap]) +for (let card of plantCards) { + legend.push([card.letter, card.bitmap]) + legend.push([card.plant().letter, card.plant().bitmap]) +} +for (let bullet of Object.keys(bullets)) { + legend.push([bullets[bullet].letter, bullets[bullet].bitmap]) } -function GameClass() { +setLegend( + ...[ + ...legend, + [lightGreenGrass.letter, lightGreenGrass.bitmap], + [darkGreenGrass.letter, darkGreenGrass.bitmap], + [stone.letter, stone.bitmap], + [brown.letter, brown.bitmap] + ] +) + +// Map +const grid = map` +ePNOKLMeeee +edcdcdcdcdc +ecdcdcdcdcd +edcdcdcdcdc +ecdcdcdcdcd +edcdcdcdcdc +eeeeeeeeeee` + +// Music +const melody = tune` +272.72727272727275: b4-272.72727272727275 + g4~272.72727272727275 + f4~272.72727272727275 + e4~272.72727272727275, +272.72727272727275: c5-272.72727272727275 + a4~272.72727272727275 + g4~272.72727272727275 + f4~272.72727272727275 + d4~272.72727272727275, +272.72727272727275: b4-272.72727272727275 + g4~272.72727272727275 + f4~272.72727272727275 + e4~272.72727272727275, +272.72727272727275: c5-272.72727272727275 + a4~272.72727272727275 + g4~272.72727272727275 + f4~272.72727272727275 + c4~272.72727272727275, +272.72727272727275: b4^272.72727272727275 + g4~272.72727272727275 + f4~272.72727272727275 + e4~272.72727272727275, +272.72727272727275: g4^272.72727272727275 + f4~272.72727272727275, +272.72727272727275: g4~272.72727272727275, +272.72727272727275: a4^272.72727272727275, +272.72727272727275: g4-272.72727272727275 + b4~272.72727272727275, +272.72727272727275: a4~272.72727272727275 + e4~272.72727272727275 + c5~272.72727272727275, +272.72727272727275: a4^272.72727272727275 + d4~272.72727272727275, +272.72727272727275: g4-272.72727272727275 + b4~272.72727272727275, +272.72727272727275: a4~272.72727272727275 + e4~272.72727272727275 + c5~272.72727272727275, +272.72727272727275: d5-272.72727272727275 + d4~272.72727272727275, +272.72727272727275: g4^272.72727272727275 + b4~272.72727272727275, +272.72727272727275: a4~272.72727272727275 + c5~272.72727272727275 + e4~272.72727272727275, +272.72727272727275: d4~272.72727272727275 + c4~272.72727272727275, +272.72727272727275: g4~272.72727272727275 + a4~272.72727272727275, +272.72727272727275: a5~272.72727272727275 + g5~272.72727272727275 + f5~272.72727272727275 + e5~272.72727272727275 + c5-272.72727272727275, +272.72727272727275: a5~272.72727272727275 + g5~272.72727272727275 + f5~272.72727272727275 + d5~272.72727272727275 + e5^272.72727272727275, +272.72727272727275: g5~272.72727272727275 + f5~272.72727272727275 + d5~272.72727272727275 + e5-272.72727272727275 + c4~272.72727272727275, +272.72727272727275: e5~272.72727272727275 + d5^272.72727272727275 + c4~272.72727272727275 + d4~272.72727272727275, +272.72727272727275: a5~272.72727272727275 + f5~272.72727272727275 + g5-272.72727272727275 + c4~272.72727272727275, +272.72727272727275: b5^272.72727272727275, +272.72727272727275: a4~272.72727272727275 + a5^272.72727272727275 + g4~272.72727272727275, +272.72727272727275: c4/272.72727272727275, +272.72727272727275: a5~272.72727272727275 + g5~272.72727272727275 + f5~272.72727272727275 + e5~272.72727272727275 + c5-272.72727272727275, +272.72727272727275: a5~272.72727272727275 + g5~272.72727272727275 + f5~272.72727272727275 + d5~272.72727272727275 + e5^272.72727272727275, +272.72727272727275: g5~272.72727272727275 + f5~272.72727272727275 + d5~272.72727272727275 + e5-272.72727272727275 + c4~272.72727272727275, +272.72727272727275: e5~272.72727272727275 + d5^272.72727272727275 + c4~272.72727272727275 + b5^272.72727272727275 + d4~272.72727272727275, +272.72727272727275: f5~272.72727272727275 + a5~272.72727272727275 + b5^272.72727272727275 + g5-272.72727272727275 + c4~272.72727272727275, +272.72727272727275: a5-272.72727272727275 + c4~272.72727272727275` + +// Game +function Game() { return { sprites: [], plantSprites: [], zombieSprites: [], sunlight: [], - map: undefined, - amount: 0, - score: 0, + playback: undefined, + map: grid, + amount: 200, // Amount of sunlight + score: 0, // Number of zombies killed over: false, - init: function (map) { - this.map = map; - setMap(this.map); - addSprite(borderChoice + 1, 0, borderCursor.letter); - addText(String(this.amount), { x: 0, y: 0, color: color`6`}); - addText(String(this.score), { x: 19, y: 0, color: color`4` }); - }, - addSprite: function (sprite) { - this.sprites.push(sprite); + init: function () { + setMap(this.map) + this.playback = playTune(melody, Infinity) + addSprite(borderChoice + 1, 0, borderCursor.letter) + addText(String(this.amount), { x: 0, y: 0, color: color`6` }) + addText(String(this.score), { x: 19, y: 0, color: color`4` }) }, run: function (timestamp) { - // First, clear every sprite that isn't static or a plant - for (let plant of this.plantSprites) { - // Check if plant collided with zombie, and "kill" plant based on zombie.attackingPlant, or let plant serve as defense - const zombie = this.zombieSprites.filter(zombie => zombie.x === plant.x && zombie.y === plant.y); - if (zombie.length) { - if (plant.onCollide) { - // Plant has a onCollide function - } - } - if (plant.run) { - const res = plant.run(timestamp); - if (res && res.type === "sunlight" && this.sunlight.length < MAX_SUNLIGHT) { - // Put on screen once - addSprite(res.x, res.y, res.letter); - this.sunlight.push(res); - } else if (Array.isArray(res)) { - for (let sprite of res) { - // Add each sprite (most likely bullets) to the list of sprites. - addSprite(sprite.x, sprite.y, sprite.letter); - this.sprites.push(sprite); + try { + let newPlants = [] + for (let plant of this.plantSprites) { + if (plant.run) { + const res = plant.run(timestamp) + if ( + res && + res.letter === sunlight.letter && + this.sunlight.length < maxSuns + ) { + // Add sunlight, which is static + addSprite(res.x, res.y, res.letter) + this.sunlight.push(res) + } else if (Array.isArray(res)) { + // Add each sprite (most likely bullets) to the list of sprites + for (let sprite of res) { + addSprite(sprite.x, sprite.y, sprite.letter) + this.sprites.push(sprite) + } } } - } - } - let newSprites = []; - for (let sprite of this.sprites) { - const past = getTile(sprite.x, sprite.y).filter(tile => tile.type === sprite.letter)[0]; - past.remove(); - sprite.run(timestamp); - // Check if sprite is bullet, and if so, whether or not it has collided with zombie - if (sprite.letter === BULLETS.green.letter || sprite.letter === BULLETS.blue.letter) { - const zombie = this.zombieSprites.filter(zombie => zombie.x === sprite.x && zombie.y === sprite.y); + // Check if plant collided with zombie, and "kill" + const zombie = this.zombieSprites.filter( + zombie => zombie.x === plant.x && zombie.y === plant.y + ) if (zombie.length) { - let zombieSprite = zombie[0]; // First zombie - sprite.collide(zombieSprite); - continue; + if (plant.onCollide) { + const survives = plant.onCollide(zombie[0]) + if (!survives) { + // Plant died :( so it doesn't get added to new plant + const past = getTile(plant.x, plant.y).filter( + tile => tile.type === plant.letter + )[0] + if (past) past.remove() + continue + } + } } + newPlants.push(plant) } - if (validY(sprite.y) && sprite.x < width() - 1) { - addSprite(sprite.x, sprite.y, sprite.letter); - newSprites.push(sprite); + this.plantSprites = newPlants + + let newSprites = [] + for (let sprite of this.sprites) { + const past = getTile(sprite.x, sprite.y).filter( + tile => tile.type === sprite.letter + )[0] + past.remove() + sprite.run(timestamp) + // Check if sprite is bullet, and if so, whether or not it has collided with zombie + if ( + sprite.letter === bullets.green.letter || + sprite.letter === bullets.blue.letter + ) { + const zombie = this.zombieSprites.filter( + zombie => zombie.x === sprite.x && zombie.y === sprite.y + ) + if (zombie.length) { + let zombieObj = zombie[0] + sprite.collide(zombieObj) + continue + } + } + if (validY(sprite.y) && sprite.x < width() - 1) { + // If the character hasn't fallen off the screen yet, show it + addSprite(sprite.x, sprite.y, sprite.letter) + newSprites.push(sprite) + } } - } - this.sprites = newSprites; - let newZombies = []; - for (let sprite of this.zombieSprites) { - if (sprite.x === 0) { - // Check if zombie has reached behind plants - if so, the game is over - addText("Oopsies! Try again?", { x: 3, y: 10, color: color`3` }); - game.over = true; - clearInterval(gameloop); + this.sprites = newSprites + + let newZombies = [] + for (let sprite of this.zombieSprites) { + const past = getTile(sprite.x, sprite.y).filter( + tile => tile.type === sprite.letter + )[0] + if (past) past.remove() + if (sprite.health <= 0) { + this.score++ + continue + } + sprite.run(timestamp) + if (sprite.x > 0) { + addSprite(sprite.x, sprite.y, sprite.letter) + newZombies.push(sprite) + } else if (sprite.x <= 0) { + // Check if zombie has reached behind plants - if so, the game is over + this.cleanup('Ooopsies!', 6, 7) + return + } } - const past = getTile(sprite.x, sprite.y).filter(tile => tile.type === sprite.letter)[0]; - past.remove(); - sprite.run(timestamp); - if (validX(sprite.x) && validY(sprite.y) && sprite.health > 0) { - addSprite(sprite.x, sprite.y, sprite.letter); - newZombies.push(sprite); - } else if (sprite.health < 0) { - // Zombie killed - this.score++; + this.zombieSprites = newZombies + + clearText() + addText(String(this.amount), { x: 0, y: 0, color: color`6` }) + addText(String(this.score), { x: 19, y: 0, color: color`4` }) + } catch (err) { + console.log('Found the error!', err) + } + }, + cleanup: function (text, x, y) { + clearInterval(gameloop) + this.over = true + for (let x = 0; x < width(); x++) { + for (let y = 0; y < height(); y++) { + clearTile(x, y) } } - this.zombieSprites = newZombies; - clearText(); - addText(String(this.amount), { x: 0, y: 0, color: color`6` }); - addText(String(this.score), { x: 19, y: 0, color: color`4` }); + clearText() + setBackground(blackBackground) + addText(text, { x, y, color: color`3` }) + if (this.playback) this.playback.end() } - }; + } } -let game = GameClass(); -game.init(initGrid); +let game = Game() +game.init() -onInput("a", () => { - if (!game.over && borderChoice > 0 && !cursor.active) borderChoice--; -}); +onInput('a', () => { + if (!game.over && borderChoice > 0 && !cursor.active) borderChoice-- +}) -onInput("d", () => { - if (!game.over && borderChoice !== plantCards.length - 1 && !cursor.active) borderChoice++; -}); +onInput('d', () => { + if (!game.over && borderChoice !== plantCards.length - 1 && !cursor.active) + borderChoice++ +}) -onInput("s", () => { - if (game.over) return; - // Let user place a sprite! But only if they have the requisite amount of sunlight - const plant = plantCards[borderChoice].plant; - console.log(plant); - if (plant.cost > game.amount) return; +onInput('s', () => { + if (game.over) return + // Let user place a plant! But only if they have the requisite sunlight, and if there isn't already a plant there + const plant = plantCards[borderChoice].plant() + if (plant.cost > game.amount) return if (!getAll(cursor.letter).length) { - addSprite(cursor.x, cursor.y, cursor.letter); - cursor.active = true; + cursor.x = 1 + cursor.y = 1 + addSprite(cursor.x, cursor.y, cursor.letter) + cursor.active = true } -}); +}) -onInput("w", () => { - if (game.over) return; - // Put down sprite +onInput('w', () => { + if (game.over) return for (let sprite of game.plantSprites) { - if (sprite.x === cursor.x && sprite.y === cursor.y) return; + if (sprite.x === cursor.x && sprite.y === cursor.y) return } - addSprite(cursor.x, cursor.y, plantCards[borderChoice].plant.letter); - const tiles = getTile(cursor.x, cursor.y); - clearTile(cursor.x, cursor.y); - for (let tile of tiles) { - if (tile._type !== cursor.letter) addSprite(cursor.x, cursor.y, tile._type); - } - const plant = plantCards[borderChoice].plant; - plant.x = cursor.x; - plant.y = cursor.y; - game.plantSprites.push(plant); - game.amount -= plant.cost; - cursor.active = false; - cursor.x = 1; - cursor.y = 1; -}); - -onInput("i", () => { - if (game.over || cursor.y <= 1 || !cursor.active) return; - getFirst(cursor.letter).y--; - cursor.y--; -}); - -onInput("j", () => { - if (game.over || cursor.x <= 1 || !cursor.active) return; - getFirst(cursor.letter).x--; - cursor.x--; -}); - -onInput("l", () => { - if (game.over || cursor.x >= mapSize.x || !cursor.active) return; - getFirst(cursor.letter).x++; - cursor.x++; -}); - -onInput("k", () => { - if (game.over) return; + + // Put down sprite and remove cursor + const cursorSprite = getTile(cursor.x, cursor.y).filter( + tile => tile.type === cursor.letter + )[0] + if (cursorSprite) cursorSprite.remove() + + const plant = plantCards[borderChoice].plant() + plant.x = cursor.x + plant.y = cursor.y + game.plantSprites.push(plant) + game.amount -= plant.cost + addSprite(cursor.x, cursor.y, plant.letter) + cursor.active = false + cursor.x = 1 + cursor.y = 1 +}) + +onInput('i', () => { + if (game.over || cursor.y <= 1 || !cursor.active) return + getFirst(cursor.letter).y-- + cursor.y-- +}) + +onInput('j', () => { + if (game.over || cursor.x <= 1 || !cursor.active) return + getFirst(cursor.letter).x-- + cursor.x-- +}) + +onInput('l', () => { + if (game.over || cursor.x >= width() - 1 || !cursor.active) return + getFirst(cursor.letter).x++ + cursor.x++ +}) + +onInput('k', () => { + if (game.over) return if (!cursor.active) { // If cursor isn't active, this collects sunlight if (game.sunlight.length) { - const collected = game.sunlight[0]; - game.sunlight = game.sunlight.slice(1); // Remove first one - const sprite = getTile(collected.x, collected.y).filter(tile => tile.type === sunlight.letter)[0]; - sprite.remove(); - game.amount += SUN_VALUE; + const collected = game.sunlight[0] + game.sunlight = game.sunlight.slice(1) // Remove first sun + const sprite = getTile(collected.x, collected.y).filter( + tile => tile.type === sunlight.letter + )[0] + sprite.remove() + game.amount += sunValue } - } - else if (cursor.y >= mapSize.y - 1) return; + } else if (cursor.y >= height() - 2) return else { - getFirst(cursor.letter).y++; - cursor.y++; + // Move cursor + getFirst(cursor.letter).y++ + cursor.y++ } -}); +}) afterInput(() => { - if (game.over) return; - getFirst(borderCursor.letter).x = borderChoice + 1; - addText(String(game.amount), { x: 0, y: 0, color: color`6`}); -}); - -let last = new Date(); -let sunlightCount = 0; -let zombieCount = 0; + if (game.over) return + getFirst(borderCursor.letter).x = borderChoice + 1 +}) + +// Game loop +let last = new Date() +let sunlightCount = 0 +let zombieCount = 0 let gameloop = setInterval(() => { - if (game.score === 100) { - // Player wins! - addText("You saved the day!", { x: 1, y: 10, color: color`3` }); - game.over = true; - clearInterval(gameloop); - } - let timestamp = new Date() - last; - sunlightCount += timestamp; - if (sunlightCount >= NEW_SUN && game.sunlight.length < 5) { - sunlightCount = 0; - const newSun = Sun(random(0, mapSize.x), random(0, mapSize.y)); - addSprite(newSun.x, newSun.y, newSun.letter); - game.sunlight.push(newSun); + if (game.score === 10) game.cleanup('You saved the day!!', 1, 7) + + let timestamp = new Date() - last + + sunlightCount += timestamp + if (sunlightCount >= newSun && game.sunlight.length < maxSuns) { + sunlightCount = 0 + const newSun = Sun() + addSprite(newSun.x, newSun.y, newSun.letter) + game.sunlight.push(newSun) } - zombieCount += timestamp; - if (zombieCount >= NEW_ZOMBIE) { - zombieCount = 0; - const newZombie = Zombie(mapSize.x, random(1, mapSize.y - 1)); - addSprite(newZombie.x, newZombie.y, newZombie.letter); - game.zombieSprites.push(newZombie); + + zombieCount += timestamp + if (zombieCount >= newZombie) { + zombieCount = 0 + const pos = [width() - 1, random(1, height() - 2)] + console.log(pos) + const newZombie = Zombie(...pos) + addSprite(newZombie.x, newZombie.y, newZombie.letter) + game.zombieSprites.push(newZombie) } - game.run(timestamp); - last = new Date(); - // We should also have bulletSprites that have collide() functions when they collide with zombies. - // Also make sure to run collide() functions on the plants themselves (for example, wallnut). -}, 1000 / 60); + + game.run(timestamp) + last = new Date() + + // Also make sure to run collide() functions on the plants themselves. + // Fix weird zombie behavior. + // Fix weird text behavior when game is over. +}, 1000 / 60) From d038933e722ba8fda3fb87f3309ebd10b509aaa0 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Tue, 14 Feb 2023 13:24:28 -0300 Subject: [PATCH 59/92] Rename The Maze of Sprig.js to games/The_Maze_of_Sprig.js --- The Maze of Sprig.js => games/The_Maze_of_Sprig.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename The Maze of Sprig.js => games/The_Maze_of_Sprig.js (100%) diff --git a/The Maze of Sprig.js b/games/The_Maze_of_Sprig.js similarity index 100% rename from The Maze of Sprig.js rename to games/The_Maze_of_Sprig.js From 4f5e631e70289e57785d0401b4f070da42c235c9 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Tue, 14 Feb 2023 13:34:09 -0300 Subject: [PATCH 60/92] add #791 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 4404946533..ec9fcbc339 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2102,5 +2102,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-13" + }, + { + "filename": "The_Maze_of_Sprig", + "title": "The_Maze_of_Sprig", + "author": "SahilD", + "img": "TheMazeOfSprig", + "tags": ["puzzle"], + "addedOn": "2023-02-14" } ] From 768a1277daf74d8f19d4dd515502b97a63bdc375 Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Tue, 14 Feb 2023 22:25:05 +0300 Subject: [PATCH 61/92] Add files via upload --- games/Labyrinth2.js | 340 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 340 insertions(+) create mode 100644 games/Labyrinth2.js diff --git a/games/Labyrinth2.js b/games/Labyrinth2.js new file mode 100644 index 0000000000..b1814bd2af --- /dev/null +++ b/games/Labyrinth2.js @@ -0,0 +1,340 @@ +/* +@title: Labyrinth2 +@author: DorukSarpAlwaysStrikesBack! +*/ + +const player = "p"; +const labywall = "w"; +const end = "e"; +const textt = "t"; +const texth = "h"; +const textx = "x"; +const textheart = "v"; +const melody = tune` +147.05882352941177: b5~147.05882352941177, +147.05882352941177: a5~147.05882352941177, +147.05882352941177: g5~147.05882352941177, +294.11764705882354, +147.05882352941177: g5~147.05882352941177, +147.05882352941177: a5~147.05882352941177 + b5~147.05882352941177, +147.05882352941177: d5~147.05882352941177, +147.05882352941177, +147.05882352941177: g5~147.05882352941177 + c5~147.05882352941177 + e4~147.05882352941177, +147.05882352941177: g5~147.05882352941177, +147.05882352941177: e5~147.05882352941177, +147.05882352941177, +147.05882352941177: a4~147.05882352941177 + f5~147.05882352941177, +147.05882352941177: e4~147.05882352941177, +147.05882352941177: f5~147.05882352941177, +147.05882352941177: a4~147.05882352941177, +147.05882352941177: c5~147.05882352941177, +147.05882352941177: d5~147.05882352941177, +147.05882352941177: f5~147.05882352941177, +147.05882352941177: b4~147.05882352941177, +147.05882352941177: d5~147.05882352941177, +147.05882352941177: b4~147.05882352941177, +147.05882352941177: d5~147.05882352941177 + g5~147.05882352941177, +147.05882352941177, +147.05882352941177: e5~147.05882352941177, +147.05882352941177, +147.05882352941177: d5~147.05882352941177, +294.11764705882354, +147.05882352941177: f5~147.05882352941177, +147.05882352941177` +const playback = playTune(melody, Infinity) + +setSolids([ player, labywall ]) + +setLegend( + [ player, bitmap` +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3023333333333203 +3003333333333003 +3003333333333003 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333 +3333333333333333`], + [ labywall, bitmap` +LLLLLLLLLLLLLLLL +0000000LL0000000 +0000000LL0000000 +LLLLLLLLLLLLLLLL +0000000LL0000000 +0000000LL0000000 +LLLLLLLLLLLLLLLL +0000000LL0000000 +0000000LL0000000 +LLLLLLLLLLLLLLLL +0000000LL0000000 +0000000LL0000000 +LLLLLLLLLLLLLLLL +0000000LL0000000 +0000000LL0000000 +LLLLLLLLLLLLLLLL`], + [ textt, bitmap` +................ +.00000000000000. +.00000000000000. +.......00....... +.......00....... +.......00....... +.......00....... +.......00....... +.......00....... +.......00....... +.......00....... +.......00....... +.......00....... +.......00....... +................ +................`], + [ texth, bitmap` +................ +................ +................ +.00..........00. +.00..........00. +.00..........00. +.00..........00. +.00000000000000. +.00000000000000. +.00..........00. +.00..........00. +.00..........00. +.00..........00. +.00..........00. +................ +................`], + [ textx, bitmap` +................ +.00..........00. +..00........00.. +...00......00... +....00....00.... +.....00..00..... +......0000...... +.......00....... +......0000...... +.....00..00..... +....00....00.... +...00......00... +..00........00.. +.00..........00. +.0............0. +................`], + [ textheart, bitmap` +............33.. +...........3333. +.3333.....33333. +.33333...333333. +.33333333333333. +.33333333333333. +.33333333333333. +.33333333333333. +..333333333333.. +...33333333333.. +....333333333... +.....33333333... +......33333..... +.......333...... +.......333...... +................`], + [ end, bitmap` +LLLLLLLLLLLLLLLL +L11166666661111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11166666661111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11161111111111L +L11166666661111L +LLLLLLLLLLLLLLLL`], +); + + +let level = 0; +const levels = [ + map` +wpwwwwwww +w....we.w +w.ww.ww.w +w..w..w.w +w..wwww.w +w.......w +wwwwwwwww`, + map` +wwwwwwwwwwwwwwwwwww +w........w........w +w.wwwwww.wwwwwwww.w +w...wp...w.....ew.w +w...www..w......w.w +w....w...w......w.w +w....w...w......w.w +w....w...w.wwwwww.w +w....w...w........w +w....wwwww........w +w........wwwwwwww.w +w.................w +wwwwwwwwwwwwwwwwwww`, + map` +wwwwwwwwww +w.wwww...w +w.w..w..pw +w....www.w +w.w...ew.w +w.wwwwww.w +w.w......w +w.w...w..w +w.wwwww..w +w..w.w...w +w..w.w...w +w........w +wwwwwwwwww`, + map` +wwwwwwwwwwwwwwwwww +w........p.w.....w +w....wwwwwwww.ww.w +w.ww.w..w...w..w.w +w..w....w.w.w..w.w +w.ww..www.w.w..w.w +w..ww..w..w.w.ew.w +w...w.www.wwwwww.w +w...w...w..w..w..w +w...wwwww..w..w..w +w.....w....w.ww..w +w................w +wwwwwwwwwwwwwwwwww`, + map` +wwwwwwwwwwww +w..........w +www.www....w +w.w...w....w +w.w...ww..ew +w.w....wwwww +w.w........w +w.wwwwww.w.w +w......w.w.w +w......w.w.w +w......w.w.w +w......w.w.w +w...wwww.w.w +w...w....w.w +w...w....w.w +w...w.wwww.w +w...w.w....w +w...w.wwwwww +w...w......w +w...w......w +w...w......w +w...w......w +w...wwwwww.w +w........w.w +w........w.w +w........w.w +w........w.w +w........w.w +w........w.w +w........w.w +w....wwwww.w +w....w.....w +w....w.....w +w...ww.....w +w...w......w +w...w......w +w...w.....pw +w...wwwwwwww +w..........w +w..........w +wwwwwwwwwwww`, + map` +wwwwwwwwwwwwwwwwwwwww +w....w....w.........w +w....w....w.........w +w....w....w.........w +w.ww.w....w.wwwwww..w +w.w..w.wwww.we...w..w +w.w..w....w.w....w..w +w.w..w....w.wwww.w..w +w.w..w....w......w..w +w.w..w....wwwwwwww..w +w.ww.wwww..w........w +w..w.w..w..w.wwwwww.w +w..w.w..w..w.w..w...w +w..w.w..w..w.ww.w...w +w..w.w..w.......w...w +w..w.w..wwwwwwwww...w +w..w.w..............w +w..w.w..............w +w..wpw..............w +w..www..............w +w...................w +wwwwwwwwwwwwwwwwwwwww`, + map` +wwwwwwwwwwwwwwwwwwwwwww +wpwthxv..w.w.......w..w +w.w......w.w.w....ew..w +w.wwwwwwww.w.wwwwwww..w +w.....................w +wwwwwwwwwwwwwwwwwwwwwww`, + ] +const currentLevel = levels[level]; +setMap(currentLevel); + + const cl = levels[level]; +setMap(cl); + +onInput("w", () => { + getFirst(player).y -= 1; +}); + +onInput("s", () => { + getFirst(player).y += 1; +}); + +onInput("a", () => { + getFirst(player).x -= 1; +}); + +onInput("d", () => { + getFirst(player).x += 1; +}); + +onInput("j", () => { + const currentLevel = levels[level]; + if (currentLevel !== undefined) { + clearText(""); + setMap(currentLevel); + } +}); +afterInput(() => { + +const targetNumber = tilesWith(end).length; +const numberCovered = tilesWith(end, player).length; + if (numberCovered === targetNumber) { + level = level + 1; + + const currentLevel = levels[level]; + + if (currentLevel !== undefined) { + setMap(currentLevel); + } else { + addText("you win!", { y: 10, color: color`4` }); + } + } +}); From d0fedb508ea271e52dcad5c30de17eb77e9b132f Mon Sep 17 00:00:00 2001 From: Odysseus Abraham Kirikopoulos Date: Tue, 14 Feb 2023 22:55:59 +0200 Subject: [PATCH 62/92] Added Pocket Piano --- games/pocket-piano.js | 219 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 games/pocket-piano.js diff --git a/games/pocket-piano.js b/games/pocket-piano.js new file mode 100644 index 0000000000..e3c87cdd2f --- /dev/null +++ b/games/pocket-piano.js @@ -0,0 +1,219 @@ +/* +@title: Pocket Piano +@author: Odysseus Kirikopoulos +*/ + +const tune_c = tune` +500, +500: c4^500, +15000`; +const tune_d = tune` +500, +500: d4^500, +15000`; +const tune_e = tune` +500, +500: e4^500, +15000`; +const tune_f = tune` +500, +500: f4^500, +15000`; +const tune_g = tune` +500, +500: g4^500, +15000`; +const tune_a = tune` +500, +500: a4^500, +15000`; +const tune_b = tune` +500, +500: b4^500, +15000`; +const tune_c_high = tune` +500, +500: c5^500, +15000`; + +const note_c = "c"; +const note_d = "d"; +const note_e = "e"; +const note_f = "f"; +const note_g = "g"; +const note_a = "a"; +const note_b = "b"; +const press = "p"; + +setLegend( + [ note_c, bitmap` +3333333333333333 +3333333333333333 +3333322222233333 +3332222222222333 +3332000220002333 +3322022020202233 +3322022020202233 +3322022020202233 +3322022020202233 +3322022020202233 +3322022020202233 +3332000220002333 +3332222222222333 +3333322222233333 +3333333333333333 +3333333333333333`], + [ note_d, bitmap` +9999999999999999 +9999999999999999 +9999922222299999 +9992222222222999 +9992000020002999 +9922022020222299 +9922022020222299 +9922000020022299 +9922002220022299 +9922020220222299 +9922020220222299 +9992022020002999 +9992222222222999 +9999922222299999 +9999999999999999 +9999999999999999`], + [ note_e, bitmap` +6666666666666666 +6666666666666666 +6666622222266666 +6662222222222666 +6662002002202666 +6622000002202266 +6622020202202266 +6622022202202266 +6622022202202266 +6622022202202266 +6622022202202266 +6662022202202666 +6662222222222666 +6666622222266666 +6666666666666666 +6666666666666666`], + [ note_f, bitmap` +DDDDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD +DDDDD222222DDDDD +DDD2222222222DDD +DDD2000020002DDD +DD220222202022DD +DD220222202022DD +DD220002202022DD +DD220222200022DD +DD220222202022DD +DD220222202022DD +DDD2022220202DDD +DDD2222222222DDD +DDDDD222222DDDDD +DDDDDDDDDDDDDDDD +DDDDDDDDDDDDDDDD`], + [ note_g, bitmap` +7777777777777777 +7777777777777777 +7777722222277777 +7772222222222777 +7770002000202777 +7720222020202277 +7720222020202277 +7720002020202277 +7722202020202277 +7722202020202277 +7720002000200277 +7772222222222777 +7772222222222777 +7777722222277777 +7777777777777777 +7777777777777777`], + [ note_a, bitmap` +5555555555555555 +5555555555555555 +5555522222255555 +5552222222222555 +5552022200002555 +5522022202202255 +5522022202202255 +5522022200002255 +5522022202202255 +5522022202202255 +5522000202202255 +5552222222222555 +5552222222222555 +5555522222255555 +5555555555555555 +5555555555555555`], + [ note_b, bitmap` +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH +HHHHH222222HHHHH +HHH2222222222HHH +HHH2000222022HHH +HH220222220222HH +HH220222220222HH +HH220022220222HH +HH222002220222HH +HH222202220222HH +HH222202220222HH +HHH2000222022HHH +HHH2222222222HHH +HHHHH222222HHHHH +HHHHHHHHHHHHHHHH +HHHHHHHHHHHHHHHH`], +); + +setSolids([note_a, note_b, note_c, note_d, note_e, note_f, note_g, press]); + +const piano = map` +cdefgabc`; + +setMap(piano); + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +onInput("w", () => { + playTune(tune_c); + setMap(piano); +}); + +onInput("a", () => { + playTune(tune_d); + setMap(piano); +}); + +onInput("s", () => { + playTune(tune_e); + setMap(piano); +}); + +onInput("d", () => { + playTune(tune_f); + setMap(piano); +}); + +onInput("i", () => { + playTune(tune_g); + setMap(piano); +}); + +onInput("j", () => { + playTune(tune_a); + setMap(piano); +}); + +onInput("k", () => { + playTune(tune_b); + setMap(piano); +}); + +onInput("l", () => { + playTune(tune_c_high); + setMap(piano); +}); \ No newline at end of file From ebfff6ff29f8d4192269cf303b336cd96b5bc300 Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Wed, 15 Feb 2023 00:08:35 +0300 Subject: [PATCH 63/92] Update Labyrinth2.js --- games/Labyrinth2.js | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/games/Labyrinth2.js b/games/Labyrinth2.js index b1814bd2af..f29bca521f 100644 --- a/games/Labyrinth2.js +++ b/games/Labyrinth2.js @@ -223,7 +223,7 @@ wwwwwwwwwwwwwwwwww`, map` wwwwwwwwwwww w..........w -www.www....w +w.wwwww....w w.w...w....w w.w...ww..ew w.w....wwwww @@ -241,26 +241,7 @@ w...w.w....w w...w.wwwwww w...w......w w...w......w -w...w......w -w...w......w -w...wwwwww.w -w........w.w -w........w.w -w........w.w -w........w.w -w........w.w -w........w.w -w........w.w -w....wwwww.w -w....w.....w -w....w.....w -w...ww.....w -w...w......w -w...w......w -w...w.....pw -w...wwwwwwww -w..........w -w..........w +w.........pw wwwwwwwwwwww`, map` wwwwwwwwwwwwwwwwwwwww From d6f224195ade8cdadfffe289165076c5f1524f69 Mon Sep 17 00:00:00 2001 From: Odysseus Abraham Kirikopoulos Date: Tue, 14 Feb 2023 23:08:44 +0200 Subject: [PATCH 64/92] Update pocket-piano.js --- games/pocket-piano.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/games/pocket-piano.js b/games/pocket-piano.js index e3c87cdd2f..393d76a058 100644 --- a/games/pocket-piano.js +++ b/games/pocket-piano.js @@ -174,10 +174,6 @@ cdefgabc`; setMap(piano); -function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - onInput("w", () => { playTune(tune_c); setMap(piano); @@ -216,4 +212,4 @@ onInput("k", () => { onInput("l", () => { playTune(tune_c_high); setMap(piano); -}); \ No newline at end of file +}); From 4c2242862e6bdc4400bd8d8b34341c02fbfd0e5a Mon Sep 17 00:00:00 2001 From: ItsImpeccable <51460403+itsimpeccable@users.noreply.github.com> Date: Wed, 15 Feb 2023 00:10:52 +0300 Subject: [PATCH 65/92] Update Labyrinth2.js --- games/Labyrinth2.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/games/Labyrinth2.js b/games/Labyrinth2.js index f29bca521f..49c93ec211 100644 --- a/games/Labyrinth2.js +++ b/games/Labyrinth2.js @@ -149,22 +149,22 @@ LLLLLLLLLLLLLLLL`], .......333...... ................`], [ end, bitmap` -LLLLLLLLLLLLLLLL -L11166666661111L -L11161111111111L -L11161111111111L -L11161111111111L -L11161111111111L -L11161111111111L -L11166666661111L -L11161111111111L -L11161111111111L -L11161111111111L -L11161111111111L -L11161111111111L -L11161111111111L -L11166666661111L -LLLLLLLLLLLLLLLL`], +1111111111111111 +1LLL6666666LLLL1 +1LLL6LLLLLLLLLL1 +1LLL6LLLLLLLLLL1 +1LLL6LLLLLLLLLL1 +1LLL6LLLLLLLLLL1 +1LLL6LLLLLLLLLL1 +1LLL6666666LLLL1 +1LLL6LLLLLLLLLL1 +1LLL6LLLLLLLLLL1 +1LLL6LLLLLLLLLL1 +1LLL6LLLLLLLLLL1 +1LLL6LLLLLLLLLL1 +1LLL6LLLLLLLLLL1 +1LLL6666666LLLL1 +1111111111111111`], ); From 08ba89b29927aed8af849cfbfb4bb0374ae68774 Mon Sep 17 00:00:00 2001 From: Kai <109107855+KaiEtkin@users.noreply.github.com> Date: Tue, 14 Feb 2023 16:19:53 -0800 Subject: [PATCH 66/92] Delete the_hungry_mouse --- games/img/the_hungry_mouse | Bin 63129 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 games/img/the_hungry_mouse diff --git a/games/img/the_hungry_mouse b/games/img/the_hungry_mouse deleted file mode 100644 index 80be0833191f95e66a4e3100ab544f35cb7769a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 63129 zcmeFa2Uru^x;G9nYy(7T0@;ER1Vp993R0seRmF}-w_ybo5TwVgu>y8bY1^(SMO08) zG%DK$SV8GFP!J-;1OmzT&SWM6a{k}_fA^kqPhmfgnCT-a2dcEnHwbLT0p# zgoMNhd%HP{B_yPn$Uo9=@Qazs)<6jfN!Jb5)(h>et*HyQ`K{Zqd98%Rgu_9H935vb z8nrv#m@Uu#ZRChu<45{xj<#T~Tf``PFt#JQE;N5*YR-r6%Za^`KD~@}&(!A1jjlMi zD4R+;RX$Bd`tbt(`tvGVDw^XSn4XSMN$pHXRIQTOe@koeOQk(F*lqA5=#M)! zK5q}SZvM-~0TGL8j3&TJZa>4c@E@8;E$yh1Jk-6i&~U17g&{(Ol^@R=k*lpHM~ z1)n70pQWUl__K}V1c_nj?*s{nJsTv5*q8=Vv%3F>8sny*>P0vU=OvwY~xC{Q^_Z7ns5i(*AZX0TL1_I>Mi%tK7!4I(#BcJP^nb&ZEMz=b2e-N zn!zj zeP|&fH2N!0+ET{cNX#`$8NG-UC19lbhB;14;V+08@*jZ>|C=ECi+m25U`a{8BOyVT zu%9z)X^3QV#pDdbCqd)ajU>{tJ{wJ-)y=bFEwo{crM)N4J0?S;Owm-bQ9Y<0k~q)q z;N;7Szb)6UcsLW@*{VfRg3kD;vT#rM&hGdL3}|-NoRb;Lhys zmSw$y1H!Mi!e>H$oUqA^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U;%jd`HwxJ<@26YKk-uemSwPK_73L}kIFrg3a7+TL0|v!`^;|wL zcR#v)x8CxAdlcw`+4RPDF)!_oKVQ4+v&wzta3!?bmf3ZJ3rHQPuT&SB;B{a0{=0vt z8SO5CS_5|6CC|OSTiWGcovZ#+Zl_S^UMZgUYVQOpoEBJnG~JK|7TI8Rz|oNptC@m- zt@}~-J)ZBw#4uoA=0hZ~)v)XQ$I8|3Y)*bZG1cSE)r1Q3!gk=QYd5Z zQs@M!1JyBqRvnnKPkZ0pztfp(mV^QYYQ$cgoBFP}=H4o6|4+6>s%Q-r>i`x{usUFO z>p?i{vM;e8-@e-~^FVnmu~7_x_Y<`z-dKI`L*664Ms=25%_<#t zL9H8*I*`@-LDAHeU;h6ogM23F;@A1Cz}C%gnfcpaots?Kk6yvO;S+Hb0;>bXD7a}< zv-`I``;XBm9*yGBTs)eK@fFl3O@&|OMqTEk^40Wn^y!Z bxc`XHY7q4OwR+NZ1|aZs^>bP0l+XkK2F)>- From d6a536ae60f7421ff6dc49beaecaaaf65faaf806 Mon Sep 17 00:00:00 2001 From: Kai <109107855+KaiEtkin@users.noreply.github.com> Date: Tue, 14 Feb 2023 16:20:25 -0800 Subject: [PATCH 67/92] Add files via upload --- games/img/the_hungry_mouse.png | Bin 0 -> 63129 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 games/img/the_hungry_mouse.png diff --git a/games/img/the_hungry_mouse.png b/games/img/the_hungry_mouse.png new file mode 100644 index 0000000000000000000000000000000000000000..80be0833191f95e66a4e3100ab544f35cb7769a2 GIT binary patch literal 63129 zcmeFa2Uru^x;G9nYy(7T0@;ER1Vp993R0seRmF}-w_ybo5TwVgu>y8bY1^(SMO08) zG%DK$SV8GFP!J-;1OmzT&SWM6a{k}_fA^kqPhmfgnCT-a2dcEnHwbLT0p# zgoMNhd%HP{B_yPn$Uo9=@Qazs)<6jfN!Jb5)(h>et*HyQ`K{Zqd98%Rgu_9H935vb z8nrv#m@Uu#ZRChu<45{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f19099dbae2869de2a7e63c2bdefb980 Mon Sep 17 00:00:00 2001 From: Kai <109107855+KaiEtkin@users.noreply.github.com> Date: Tue, 14 Feb 2023 16:21:23 -0800 Subject: [PATCH 68/92] Delete the_hungry_mouse.js --- games/the_hungry_mouse.js | 224 -------------------------------------- 1 file changed, 224 deletions(-) delete mode 100644 games/the_hungry_mouse.js diff --git a/games/the_hungry_mouse.js b/games/the_hungry_mouse.js deleted file mode 100644 index 46a573fcb0..0000000000 --- a/games/the_hungry_mouse.js +++ /dev/null @@ -1,224 +0,0 @@ -/* -@title: the_hungry_mouse -@author: KaiEtkin -*/ - -const player = "p"; -const cheese = "c"; -const cheese2 = "v"; -const cheese3 = "b"; -const cheese4 = "n"; -const trap = "t"; - -setLegend( - [ player, bitmap` -................ -................ -..........11.... -..........11.... -..........11.1.. -....LLLLLLLL.11. -8..LLLLLLLLL11.. -88.LLLLLLLLL1L.. -.88LLLLLLLLLLL.. -...LLLLLLLLLLL.. -...LLLLLLLLLLL.. -....LLLLLLLLL... -....LLLLLL...... -................ -................ -................`], - [ cheese, bitmap` -................ -................ -...............6 -..............66 -............6666 -..........666666 -........66666666 -.....66666666666 -...6666666666666 -.666666666666666 -6666666666666666 -6666666666666666 -6666666666666666 -6666666666666666 -............6... -................`], - [ cheese2, bitmap` -................ -................ -......666....... -.....666666..... -....666666666... -....666666666... -...66FF666666... -...66FF666666... -...66666666FF... -...666F6666FF... -...66FF66666F... -...66FF666666... -....6666666..... -................ -................ -................`], - [cheese3, bitmap` -................ -................ -................ -...6666......... -..666666........ -..6FF6666....... -..66F66666...... -..6666666666.... -...6666F66666... -...6666FF6666... -....666FF666666. -.....6666666666. -................ -................ -................ -................`], - [cheese4, bitmap` -....66.......... -....666......... -....6F66........ -....6FF66....... -.....FF6666..... -...66666666..... -...666666666.... -....6666666..... -....6FF6666..... -....6FF6FF6..... -....6666FF6..... -....6666666..... -....666666...... -......6......... -................ -................`], - [trap, bitmap` -................ -................ -................ -....CCCCCC...... -....C1CCC1...... -....C1CC11...... -....C11C1C...... -....CC1C1C...... -....CC111C...... -....CCCCCC...... -....CC66CC...... -....CC66CC...... -....CCCCCC...... -....CCCCCC...... -....CCCCCC...... -................`], -); - -setSolids([]); - -let level = 0; -let cheeses = 0; -let dead = false; -const levels = [ - map` -p...t.. -...t.v. -.t.t..t -.c...t. -...t.n. -.t.b... -.t..t.t`, -]; - -setMap(levels[level]); - -setPushables({ - [ player ]: [], -}); - -onInput("w", () => { - getFirst(player).y -= 1 -}); - -onInput("a", () => { - getFirst(player).x -= 1 -}); - -onInput("s", () => { - getFirst(player).y += 1 -}); - -onInput("d", () => { - getFirst(player).x += 1 -}); - -const constantCheck = () => { - const { y: playerY, x: playerX } = getFirst(player); - - const gotCheese = tilesWith(cheese, player).length; - const gotTrapped = tilesWith(trap, player).length; - const gotCheese2 = tilesWith(cheese2, player).length; - const gotCheese3 = tilesWith(cheese3, player).length; - const gotCheese4 = tilesWith(cheese4, player).length; - - if (gotCheese) { - cheeses = cheeses +1; - addText(cheeses.toString(), { y: 1, color: color`7` }); - getFirst(cheese).remove() - } - if (gotTrapped) { - dead = true; - setMap(map` -tttttttt -tttttttt -tt....tt -tttttttt -tttttttt -tttttttt -tttttttt -tttttttt`); - clearText(); - addText('You Lost!', {y: 4, color: color`7`}); - - } - - if(gotCheese2){ - cheeses = cheeses +1; - addText(cheeses.toString(), { y: 1, color: color`7` }); - - getFirst(cheese2).remove() - - } - if(gotCheese3){ - cheeses = cheeses +1; - addText(cheeses.toString(), { y: 1, color: color`7` }); - - getFirst(cheese3).remove() - - } - if(gotCheese4){ - cheeses = cheeses +1; - addText(cheeses.toString(), { y: 1, color: color`7` }); - - getFirst(cheese4).remove() - - } - -if(cheeses >= 4){ - setMap(map` -bbbbbbbb -bbbbbbbb -b......b -bbbbbbbb -bbbbbbbb -bbbbbbbb -bbbbbbbb -bbbbbbbb`); - clearText(); - addText('You Won!!!!', {y: 4, color: color`7`}); -} -}; -afterInput(() => { - constantCheck(); -}); From 8e0c3fef6c2a2b679206cc0013e7c8375398863b Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Tue, 14 Feb 2023 21:35:08 -0300 Subject: [PATCH 69/92] add #794 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index ec9fcbc339..7748657cb1 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2110,5 +2110,13 @@ "img": "TheMazeOfSprig", "tags": ["puzzle"], "addedOn": "2023-02-14" + }, + { + "filename": "Labyrinth2", + "title": "Labyrinth2", + "author": "DorukSarpAlwaysStrikesBack!", + "img": "", + "tags": ["puzzle"], + "addedOn": "2023-02-14" } ] From 4fe53ec6b35d9fe0f35ae2abb05932d91c40e118 Mon Sep 17 00:00:00 2001 From: Kai <109107855+KaiEtkin@users.noreply.github.com> Date: Tue, 14 Feb 2023 17:48:32 -0800 Subject: [PATCH 70/92] Add files via upload --- games/the_hungry_mouse.js | 268 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 268 insertions(+) create mode 100644 games/the_hungry_mouse.js diff --git a/games/the_hungry_mouse.js b/games/the_hungry_mouse.js new file mode 100644 index 0000000000..a268c17a36 --- /dev/null +++ b/games/the_hungry_mouse.js @@ -0,0 +1,268 @@ +/* +@title: the_hungry_mouse +@author: KaiEtkin +*/ + +const player = "p"; +const cheese = "c"; +const cheese2 = "v"; +const cheese3 = "b"; +const cheese4 = "n"; +const trap = "t"; +let gameOver = false; + +setLegend( + [ player, bitmap` +................ +................ +..........11.... +..........11.... +..........11.1.. +....LLLLLLLL.11. +8..LLLLLLLLL11.. +88.LLLLLLLLL1L.. +.88LLLLLLLLLLL.. +...LLLLLLLLLLL.. +...LLLLLLLLLLL.. +....LLLLLLLLL... +....LLLLLL...... +................ +................ +................`], + [ cheese, bitmap` +................ +................ +...............6 +..............66 +............6666 +..........666666 +........66666666 +.....66666666666 +...6666666666666 +.666666666666666 +666666666666FFFF +666666666FFFFFFF +66666FFFFFFFFFFF +FFFFFFFFFFFF.... +................ +................`], + [ cheese2, bitmap` +................ +................ +......666....... +.....666666..... +....666666666... +....666666666... +...66FF666666... +...66FF666666... +...66666666FF... +...666F6666FF... +...66FF66666F... +...66FF666666... +....6666666..... +................ +................ +................`], + [cheese3, bitmap` +................ +................ +................ +...6666......... +..666666........ +..6FF6666....... +..66F66666...... +..6666666666.... +...6666F66666... +...6666FF6666... +....666FF666666. +.....6666666666. +................ +................ +................ +................`], + [cheese4, bitmap` +....66.......... +....666......... +....6F66........ +....6FF66....... +.....FF6666..... +...66666666..... +...666666666.... +....6666666..... +....6FF6666..... +....6FF6FF6..... +....6666FF6..... +....6666666..... +....666666...... +......6......... +................ +................`], + [trap, bitmap` +................ +................ +................ +....CCCCCC...... +....C1CCC1...... +....C1CC11...... +....C11C1C...... +....CC1C1C...... +....CC111C...... +....CCCCCC...... +....CC66CC...... +....CC66CC...... +....CCCCCC...... +....CCCCCC...... +....CCCCCC...... +................`], +); + +setSolids([]); + +let level = 0; +let cheeses = 0; +let dead = false; +const levels = [ + map` +p...t.. +...t.v. +.t.t..t +.c...t. +...t.n. +.t.b... +.t..t.t`, + map` +v.t...c +.tt.t.t +...p... +.t.t.t. +...t... +.tt..t. +n.t.t.b`, + map` +.b.t..p +t..t.t. +.t..vt. +.....tt +.c.t..t +..t.n.t +tt.t.t.` + +]; + +setMap(levels[level]); + +setPushables({ + [ player ]: [], +}); + + +onInput("w", () => { + if(!gameOver){ + getFirst(player).y -= 1 + } +}); + +onInput("a", () => { + if(!gameOver){ + getFirst(player).x -= 1 + } +}); + +onInput("s", () => { + if(!gameOver){ + getFirst(player).y += 1 + } +}); + +onInput("d", () => { + if(!gameOver){ + getFirst(player).x += 1 + } +}); + + +const constantCheck = () => { + const { y: playerY, x: playerX } = getFirst(player); + + const gotCheese = tilesWith(cheese, player).length; + const gotTrapped = tilesWith(trap, player).length; + const gotCheese2 = tilesWith(cheese2, player).length; + const gotCheese3 = tilesWith(cheese3, player).length; + const gotCheese4 = tilesWith(cheese4, player).length; + + if (gotCheese) { + cheeses = cheeses +1; + addText(cheeses.toString(), { y: 1, color: color`7` }); + getFirst(cheese).remove() + } + if (gotTrapped) { + dead = true; + setMap(map` +tttttttt +tttttttt +tt....tt +tttttttt +tttttttt +tttttttt +tttttttt +tttttttt`); + clearText(); + addText('You Lost!', {y: 4, color: color`7`}); + gameOver = true; + } + + if(gotCheese2){ + cheeses = cheeses +1; + addText(cheeses.toString(), { y: 1, color: color`7` }); + + getFirst(cheese2).remove() + + } + if(gotCheese3){ + cheeses = cheeses +1; + addText(cheeses.toString(), { y: 1, color: color`7` }); + + getFirst(cheese3).remove() + + } + if(gotCheese4){ + cheeses = cheeses +1; + addText(cheeses.toString(), { y: 1, color: color`7` }); + + getFirst(cheese4).remove() + + } + +if(cheeses == 4){ + level = level + 1; + + const currentLevel = levels[level]; + if (currentLevel !== undefined) { + setMap(currentLevel); + clearText() + cheeses = 0; + addText(cheeses.toString(), { y: 1, color: color`7` }); + } else { + setMap(map` +bbbbbbb +bbbbbbb +bbbbbbb +bbbbbbb +bbbbbbb +bbbbbbb +bbbbbbb`); + clearText(); + addText("you win!", { y: 4, color: color`3` }); + gameOver=true; + + } + + + +} +}; +afterInput(() => { + if(gameOver == false){ + constantCheck(); + } +}); From 652be3f5b089426e458a0d57d047ee32d2be9042 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Wed, 15 Feb 2023 13:22:37 -0300 Subject: [PATCH 71/92] add #796 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 7748657cb1..22d3b914f6 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2118,5 +2118,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-14" + }, + { + "filename": "plants_vs_zombies", + "title": "plants_vs_zombies", + "author": "jianmin-chen", + "img": "", + "tags": [], + "addedOn": "2023-02-15" } ] From a8266bd02c03bb7826a493b30160b5b4e522c291 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Wed, 15 Feb 2023 13:49:25 -0300 Subject: [PATCH 72/92] add #795 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 22d3b914f6..56cc7ba8fb 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2126,5 +2126,13 @@ "img": "", "tags": [], "addedOn": "2023-02-15" + }, + { + "filename": "pocket-piano", + "title": "pocket-piano", + "author": "Odysseus Kirikopoulos", + "img": "", + "tags": ["simulation"], + "addedOn": "2023-02-15" } ] From b9c11dd2461e32183d7eaeb85e8b04ab2392bdf1 Mon Sep 17 00:00:00 2001 From: Kai <109107855+KaiEtkin@users.noreply.github.com> Date: Wed, 15 Feb 2023 16:55:05 -0800 Subject: [PATCH 73/92] Delete the_hungry_mouse.js --- games/the_hungry_mouse.js | 268 -------------------------------------- 1 file changed, 268 deletions(-) delete mode 100644 games/the_hungry_mouse.js diff --git a/games/the_hungry_mouse.js b/games/the_hungry_mouse.js deleted file mode 100644 index a268c17a36..0000000000 --- a/games/the_hungry_mouse.js +++ /dev/null @@ -1,268 +0,0 @@ -/* -@title: the_hungry_mouse -@author: KaiEtkin -*/ - -const player = "p"; -const cheese = "c"; -const cheese2 = "v"; -const cheese3 = "b"; -const cheese4 = "n"; -const trap = "t"; -let gameOver = false; - -setLegend( - [ player, bitmap` -................ -................ -..........11.... -..........11.... -..........11.1.. -....LLLLLLLL.11. -8..LLLLLLLLL11.. -88.LLLLLLLLL1L.. -.88LLLLLLLLLLL.. -...LLLLLLLLLLL.. -...LLLLLLLLLLL.. -....LLLLLLLLL... -....LLLLLL...... -................ -................ -................`], - [ cheese, bitmap` -................ -................ -...............6 -..............66 -............6666 -..........666666 -........66666666 -.....66666666666 -...6666666666666 -.666666666666666 -666666666666FFFF -666666666FFFFFFF -66666FFFFFFFFFFF -FFFFFFFFFFFF.... -................ -................`], - [ cheese2, bitmap` -................ -................ -......666....... -.....666666..... -....666666666... -....666666666... -...66FF666666... -...66FF666666... -...66666666FF... -...666F6666FF... -...66FF66666F... -...66FF666666... -....6666666..... -................ -................ -................`], - [cheese3, bitmap` -................ -................ -................ -...6666......... -..666666........ -..6FF6666....... -..66F66666...... -..6666666666.... -...6666F66666... -...6666FF6666... -....666FF666666. -.....6666666666. -................ -................ -................ -................`], - [cheese4, bitmap` -....66.......... -....666......... -....6F66........ -....6FF66....... -.....FF6666..... -...66666666..... -...666666666.... -....6666666..... -....6FF6666..... -....6FF6FF6..... -....6666FF6..... -....6666666..... -....666666...... -......6......... -................ -................`], - [trap, bitmap` -................ -................ -................ -....CCCCCC...... -....C1CCC1...... -....C1CC11...... -....C11C1C...... -....CC1C1C...... -....CC111C...... -....CCCCCC...... -....CC66CC...... -....CC66CC...... -....CCCCCC...... -....CCCCCC...... -....CCCCCC...... -................`], -); - -setSolids([]); - -let level = 0; -let cheeses = 0; -let dead = false; -const levels = [ - map` -p...t.. -...t.v. -.t.t..t -.c...t. -...t.n. -.t.b... -.t..t.t`, - map` -v.t...c -.tt.t.t -...p... -.t.t.t. -...t... -.tt..t. -n.t.t.b`, - map` -.b.t..p -t..t.t. -.t..vt. -.....tt -.c.t..t -..t.n.t -tt.t.t.` - -]; - -setMap(levels[level]); - -setPushables({ - [ player ]: [], -}); - - -onInput("w", () => { - if(!gameOver){ - getFirst(player).y -= 1 - } -}); - -onInput("a", () => { - if(!gameOver){ - getFirst(player).x -= 1 - } -}); - -onInput("s", () => { - if(!gameOver){ - getFirst(player).y += 1 - } -}); - -onInput("d", () => { - if(!gameOver){ - getFirst(player).x += 1 - } -}); - - -const constantCheck = () => { - const { y: playerY, x: playerX } = getFirst(player); - - const gotCheese = tilesWith(cheese, player).length; - const gotTrapped = tilesWith(trap, player).length; - const gotCheese2 = tilesWith(cheese2, player).length; - const gotCheese3 = tilesWith(cheese3, player).length; - const gotCheese4 = tilesWith(cheese4, player).length; - - if (gotCheese) { - cheeses = cheeses +1; - addText(cheeses.toString(), { y: 1, color: color`7` }); - getFirst(cheese).remove() - } - if (gotTrapped) { - dead = true; - setMap(map` -tttttttt -tttttttt -tt....tt -tttttttt -tttttttt -tttttttt -tttttttt -tttttttt`); - clearText(); - addText('You Lost!', {y: 4, color: color`7`}); - gameOver = true; - } - - if(gotCheese2){ - cheeses = cheeses +1; - addText(cheeses.toString(), { y: 1, color: color`7` }); - - getFirst(cheese2).remove() - - } - if(gotCheese3){ - cheeses = cheeses +1; - addText(cheeses.toString(), { y: 1, color: color`7` }); - - getFirst(cheese3).remove() - - } - if(gotCheese4){ - cheeses = cheeses +1; - addText(cheeses.toString(), { y: 1, color: color`7` }); - - getFirst(cheese4).remove() - - } - -if(cheeses == 4){ - level = level + 1; - - const currentLevel = levels[level]; - if (currentLevel !== undefined) { - setMap(currentLevel); - clearText() - cheeses = 0; - addText(cheeses.toString(), { y: 1, color: color`7` }); - } else { - setMap(map` -bbbbbbb -bbbbbbb -bbbbbbb -bbbbbbb -bbbbbbb -bbbbbbb -bbbbbbb`); - clearText(); - addText("you win!", { y: 4, color: color`3` }); - gameOver=true; - - } - - - -} -}; -afterInput(() => { - if(gameOver == false){ - constantCheck(); - } -}); From ea305642a1a80c8ac978b50948e0787c9a206ad0 Mon Sep 17 00:00:00 2001 From: Kai <109107855+KaiEtkin@users.noreply.github.com> Date: Wed, 15 Feb 2023 16:55:34 -0800 Subject: [PATCH 74/92] Add files via upload --- games/the_hungry_mouse.js | 308 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) create mode 100644 games/the_hungry_mouse.js diff --git a/games/the_hungry_mouse.js b/games/the_hungry_mouse.js new file mode 100644 index 0000000000..62328ef87b --- /dev/null +++ b/games/the_hungry_mouse.js @@ -0,0 +1,308 @@ +/* +@title: the_hungry_mouse +@author: KaiEtkin +*/ + +const player = "p"; +const cheese = "c"; +const cheese2 = "v"; +const cheese3 = "b"; +const cheese4 = "n"; +const trap = "t"; +let gameOver = false; + +setLegend( + [ player, bitmap` +................ +................ +..........11.... +..........11.... +..........11.1.. +....LLLLLLLL.11. +8..LLLLLLLLL11.. +88.LLLLLLLLL1L.. +.88LLLLLLLLLLL.. +...LLLLLLLLLLL.. +...LLLLLLLLLLL.. +....LLLLLLLLL... +....LLLLLL...... +................ +................ +................`], + [ cheese, bitmap` +................ +................ +...............6 +..............66 +............6666 +..........666666 +........66666666 +.....66666666666 +...6666666666666 +.666666666666666 +666666666666FFFF +666666666FFFFFFF +66666FFFFFFFFFFF +FFFFFFFFFFFF.... +................ +................`], + [ cheese2, bitmap` +................ +................ +......666....... +.....666666..... +....666666666... +....666666666... +...66FF666666... +...66FF666666... +...66666666FF... +...666F6666FF... +...66FF66666F... +...66FF666666... +....6666666..... +................ +................ +................`], + [cheese3, bitmap` +................ +................ +................ +...6666......... +..666666........ +..6FF6666....... +..66F66666...... +..6666666666.... +...6666F66666... +...6666FF6666... +....666FF666666. +.....6666666666. +................ +................ +................ +................`], + [cheese4, bitmap` +....66.......... +....666......... +....6F66........ +....6FF66....... +.....FF6666..... +...66666666..... +...666666666.... +....6666666..... +....6FF6666..... +....6FF6FF6..... +....6666FF6..... +....6666666..... +....666666...... +......6......... +................ +................`], + [trap, bitmap` +................ +................ +................ +....CCCCCC...... +....C1CCC1...... +....C1CC11...... +....C11C1C...... +....CC1C1C...... +....CC111C...... +....CCCCCC...... +....CC66CC...... +....CC66CC...... +....CCCCCC...... +....CCCCCC...... +....CCCCCC...... +................`], +); + +setSolids([]); + +let level = 0; +let cheeses = 0; +let dead = false; +const levels = [ + map` +....... +p...t.. +...t.v. +.t.t..t +.c...t. +...t.n. +.t.b... +.t..t.t`, + map` +....... +v.t...c +.tt.t.t +...p... +.t.t.t. +...t... +.tt..t. +n.t.t.b`, + map` +....... +.b.t..p +t..t.t. +.t..vt. +.....tt +.c.t..t +..t.n.t +tt.t.t.`, + map` +....... +....... +.t.tttt +tc..tv. +ttt.t.. +.tb...t +.ttt.n. +t.tp.t.`, + map` +....... +.tc...t +.ttttn. +t..ptt. +t.ttt.. +..tv..t +t...t.. +.tttttb`, + map` +....... +c.....t +ttt.tt. +v.....p +tttttt. +b...... +tt.tttt +n...t..`, + map` +....... +cv....t +bn.tt.. +..tt... +tttt.t. +...t... +tt...tt +.tt...p`, + + +]; + +setMap(levels[level]); + +setPushables({ + [ player ]: [], +}); + + + addText('Level: '+ (level+1).toString(), {y: 1, color: color`4`}); + + +onInput("w", () => { + if(!gameOver){ + getFirst(player).y -= 1 + } +}); + +onInput("a", () => { + if(!gameOver){ + getFirst(player).x -= 1 + } +}); + +onInput("s", () => { + if(!gameOver){ + getFirst(player).y += 1 + } +}); + +onInput("d", () => { + if(!gameOver){ + getFirst(player).x += 1 + } +}); + + +const constantCheck = () => { + const { y: playerY, x: playerX } = getFirst(player); + + const gotCheese = tilesWith(cheese, player).length; + const gotTrapped = tilesWith(trap, player).length; + const gotCheese2 = tilesWith(cheese2, player).length; + const gotCheese3 = tilesWith(cheese3, player).length; + const gotCheese4 = tilesWith(cheese4, player).length; + if (gotCheese) { + cheeses = cheeses +1; + + getFirst(cheese).remove() + } + if (gotTrapped) { + dead = true; + setMap(map` +tttttttt +tttttttt +tt....tt +tttttttt +tttttttt +tttttttt +tttttttt +tttttttt`); + clearText(); + addText('You Lost!', {y: 4, color: color`7`}); + gameOver = true; + } + + if(gotCheese2){ + cheeses = cheeses +1; + + getFirst(cheese2).remove() + + } + if(gotCheese3){ + cheeses = cheeses +1; + + getFirst(cheese3).remove() + + } + if(gotCheese4){ + cheeses = cheeses +1; + + getFirst(cheese4).remove() + + } + +if(cheeses == 4){ + level = level + 1; + + const currentLevel = levels[level]; + if (currentLevel !== undefined) { + setMap(currentLevel); + clearText() + addText('Level: '+ (level+1).toString(), {y: 1, color: color`4`}); + + cheeses = 0; + } else { + setMap(map` +bbbbbbb +bbbbbbb +bbbbbbb +bbbbbbb +bbbbbbb +bbbbbbb +bbbbbbb`); + clearText(); + addText("you win!", { y: 4, color: color`3` }); + gameOver=true; + + } + + + +} +}; +afterInput(() => { + if(gameOver == false){ + constantCheck(); + } +}); \ No newline at end of file From df700e6f6c27a4f4fa62a8e5f3fc0561e67082bd Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Thu, 16 Feb 2023 18:38:07 -0300 Subject: [PATCH 75/92] add #793 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 56cc7ba8fb..b7417e7b7e 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2134,5 +2134,13 @@ "img": "", "tags": ["simulation"], "addedOn": "2023-02-15" + }, + { + "filename": "the_hungry_mouse", + "title": "the_hungry_mouse", + "author": "KaiEtkin", + "img": "", + "tags": ["puzzle"], + "addedOn": "2023-02-16" } ] From ee740c4aeab0de66bd8ff4b3b868922088e70b82 Mon Sep 17 00:00:00 2001 From: Kognise Date: Fri, 17 Feb 2023 13:43:05 -0500 Subject: [PATCH 76/92] Add migration iframe --- migration-iframe.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 migration-iframe.html diff --git a/migration-iframe.html b/migration-iframe.html new file mode 100644 index 0000000000..220ab85fa1 --- /dev/null +++ b/migration-iframe.html @@ -0,0 +1,23 @@ + + + + + Migration IFrame + + +

This is a hidden page for migrating old Sprig games to the new Sprig account system. You probably won't find anything here :)

+ + + + \ No newline at end of file From 5c776c68d73841cccd92bcb0db83700b4cb3bc35 Mon Sep 17 00:00:00 2001 From: Kognise Date: Fri, 17 Feb 2023 13:58:58 -0500 Subject: [PATCH 77/92] Multiple rollup entrypoints: --- vite.config.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index edea156d02..888a1618ac 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,3 +1,15 @@ +import { resolve, dirname } from "path"; +import { fileURLToPath } from "url"; +const _filename = fileURLToPath(import.meta.url); +const _dirname = dirname(_filename); export default { - publicDir: "games" + publicDir: "games", + build: { + rollupOptions: { + input: { + main: resolve(_dirname, "index.html"), + migration: resolve(_dirname, "migration-iframe.html") + } + } + } } From 391542e76bd53a7d83406e1ec8ea025ea998fa46 Mon Sep 17 00:00:00 2001 From: Literally Everything <111604998+OHIO-MAN@users.noreply.github.com> Date: Sat, 18 Feb 2023 13:56:38 +0500 Subject: [PATCH 78/92] Add files via upload --- games/Cave Quest.js | 434 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 434 insertions(+) create mode 100644 games/Cave Quest.js diff --git a/games/Cave Quest.js b/games/Cave Quest.js new file mode 100644 index 0000000000..1c67a0441e --- /dev/null +++ b/games/Cave Quest.js @@ -0,0 +1,434 @@ +/* +@title: Cave Quest +@author: OHIO-MAN +*/ +/* +Explore caves, watch out for traps, solve puzzles. +Get some spelunky vibes with this game. +Press WASD to move. +Press I to restart the level. +If you run out of hearts, you'll be sent back to level 1. +If want to play it again, just restart the game. +*/ + +const background = "b"; +const bar = "q"; +const heart = "h"; +const player = "p"; +const wall = "w"; +const push = "u"; +const exit = "e"; +const trap = "t"; +const trap2 = "y"; +const trap_square = "s"; + +let hp = 3; + +const melody = tune` +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: e5-184.04907975460122 + c5/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, +184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, +184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: f4-184.04907975460122 + d4/184.04907975460122, +184.04907975460122: g4-184.04907975460122 + e4/184.04907975460122, +184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, +184.04907975460122: g4-184.04907975460122 + e4/184.04907975460122, +184.04907975460122: f4-184.04907975460122 + d4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: e5-184.04907975460122 + c5/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122` +playTune(melody, Infinity) + +setLegend( + [background, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`], + [bar, bitmap` +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL`], + [heart, bitmap` +LLLLLLLLLLLLLLLL +LLL33LLLLLL33LLL +LL3333LLLL3333LL +LL33333LL33333LL +LL333333333333LL +LLL3333333333LLL +LLLL33333333LLLL +LLLLL333333LLLLL +LLLLLL3333LLLLLL +LLLLLLL33LLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL`], + [push, bitmap` +..LLLLLLLLLLLL.. +.L111111111111L. +L11111111111111L +L11LLLLLLLLLL11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11LLLLLLLLLL11L +L11111111111111L +.L111111111111L. +..LLLLLLLLLLLL..`], + [wall, bitmap` +CCCFFCCCCCCFCCCC +CCCFFCCCCCCFCCCC +CCCFFCCCCCCFCCCC +CCCFFFCCCCCFFCCC +CCFFFFFCCCCCFFFF +FFFFCCFCCCCCFFFF +CCFFCCFFCCFFFCCC +CCFFCCCFCCFCCCCC +CCFCCCCFCFFCCCCC +CCFCCCCFFFCCCCCC +CCFCCCCFCCCCCCCC +CCFCCCCFFCCCCCCC +CCFFCCCCFFCCCCCC +CCFFCCCCCFFCCCCC +CCCFFCCCCCFFCCCC +CCCFFCCCCCCFCCCC`], + [player, bitmap` +.....FFFFFF..... +.....112211..... +...FFFFFFFFFF... +.....666666..... +.....606606..... +.....666666..... +.....660066..... +..FFFFF22FFFFF.. +.FFFFFFC2FFFFFF. +.FF.FFF2CFFF.FF. +.66.FFF11FFF.66. +....FFCCCCFF.... +.....CC..CC..... +.....CC..CC..... +.....LL..LL..... +....LLL..LLL....`], + [exit, bitmap` +................ +................ +................ +...LLLLLLLLLL... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L...`], + [trap, bitmap` +LLLLLLLLLLLLLLLL +L11111111111111L +L111111LLL11111L +L1111LLL1111111L +L1111L111111111L +L111111L1111111L +L111111L1111111L +L11111111111111L +LLLL11111111111L +LLLLL1111111111L +LLLLL1111111111L +LLLLL1111111111L +LLLL11111111111L +L11111111111111L +L11111111111111L +LLLLLLLLLLLLLLLL`], + [trap2, bitmap` +LLLLLLLLLLLLLLLL +L11111111111111L +L11111LLL111111L +L1111111LLL1111L +L111111111L1111L +L1111111L111111L +L1111111L111111L +L11111111111111L +L11111111111LLLL +L1111111111LLLLL +L1111111111LLLLL +L1111111111LLLLL +L11111111111LLLL +L11111111111111L +L11111111111111L +LLLLLLLLLLLLLLLL`], + [trap_square, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`] +) + +setSolids([player, wall, push, bar, heart, trap, trap2]) + +setPushables({ + [player]: [push] +}) + +let level = 0; +const levels = [ + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wp..........ew +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww`, // Level 1 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wp...........w +wwwwwwwwwwww.w +we..ww.....w.w +www.w..www.w.w +ww..w.ww...w.w +ww.ww.w..www.w +ww..w.w.wwww.w +www...w......w +wwwwwwwwwwwwww`, // Level 2 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +ww...w...w...w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +we.w...w...wpw +wwwwwwwwwwwwww`, // Level 3 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +ww..w..w..wwww +wp.uu..u..ue.w +www.ww.ww.wwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww`, // Level 4 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwwww...wwwwww +wwwww.w.wwwwww +www.w.w.www.ww +wp.uu..uu..uew +w.w.www.w.w.ww +w...wwwww.w.ww +wwwwwwwww.w.ww +wwwwwwwww...ww +wwwwwwwwwwwwww`, // Level 5 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wp....ww....ww +www.wuwwu..uww +wew.u....u...w +w.www.wwwwww.w +w.wwwwww..ww.w +w.www.u....u.w +w.....u..wuw.w +wwwwww.www...w +wwwwwwwwwwwwww`, // Level 6 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwww..pwwwwwww +wwww.w.wwwwwww +wwww..stwwwwww +wwwww.wwwwwwww +wwww...wwwwwww +wwww.wstwwwwww +wwww...wwwwwww +wwwwwwewwwwwww +wwwwwwwwwwwwww`, // Level 7 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwwww.wwwwpwww +ww...u...w.stw +ww.ww.stew..ww +ww.....wwys.ww +wys.wwwwww..ww +wys.wwwwww.stw +wys.....ys.stw +wys..ys....stw +wwwwwwwwwwwwww`, // Level 8 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wpu..wwww....w +w..uu..ys.ww.w +w.u.uu....ww.w +wwwww.wwwwys.w +wys.stww.....w +wys.stww.wys.w +wwu.....u....w +wwe.stww.w.stw +wwwwwwwwwwwwww`, // Level 9 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwp..stwwwwwww +ww.u.stw...www +ww.u.ww...u.ww +wwuu.w..ww.www +ww.uww.www.stw +www.ww.www.stw +www....www.stw +www.ww..u...ew +wwwwwwwwwwwwww`, // Level 10 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +w............w +w..w.u..ww.u.w +w..wu........w +w..w..p.u....w +w..w.........w +w..w...wwwwu.w +w.u..........w +w............w +wwwwwwwwwwwwww` // YOU WIN +] +const currentlevel = levels[level]; +setBackground(background); +setMap(currentlevel); +addText(`${hp}`, { x: 2, y: 0, color: color`2` }); + +onInput("w", () => { + getFirst(player).y -= 1; +}) +onInput("a", () => { + getFirst(player).x -= 1; +}) +onInput("s", () => { + getFirst(player).y += 1; +}) +onInput("d", () => { + getFirst(player).x += 1; +}) +onInput("i", () => { + const currentLevel = levels[level]; + if (currentLevel !== undefined) { + clearText(); + setMap(currentLevel); + addText(`${hp}`, { x: 2, y: 0, color: color`2` }); + } +}); + +afterInput(() => { + const OnExit = tilesWith(exit, player).length + const OnTrap = tilesWith(trap_square, player).length + + if (OnExit !== 0) { + level = level + 1; + const currentlevel = levels[level]; + if (currentlevel !== undefined) { + setMap(currentlevel); + } + } + if (OnTrap !== 0) { + hp = hp - 1; + addText(`${hp}`, { x: 2, y: 0, color: color`2` }); + addText(" ", { x: 6, y: 0, color: color`L` }); + addText("Ouch !", { x: 6, y: 0, color: color`2` }); + }else{ + addText(" ", { x: 6, y: 0, color: color`L` }); + } + if (hp <= 0){ + hp = 3; + level = 0; + const currentlevel = levels[level]; + clearText(); + setMap(currentlevel); + addText(`${hp}`, { x: 2, y: 0, color: color`2` }); + addText("You died !", { x: 6, y: 0, color: color`2` }); + } + if (level >= 10){ + addText(" ", { x: 6, y: 0, color: color`L` }); + addText("You won !", { x: 6, y: 0, color: color`2` }); + } +}) \ No newline at end of file From ff7601515f3c7b48c8dd8d635d8812511fc57656 Mon Sep 17 00:00:00 2001 From: Literally Everything <111604998+OHIO-MAN@users.noreply.github.com> Date: Sat, 18 Feb 2023 20:56:48 +0500 Subject: [PATCH 79/92] Delete Cave Quest.js --- games/Cave Quest.js | 434 -------------------------------------------- 1 file changed, 434 deletions(-) delete mode 100644 games/Cave Quest.js diff --git a/games/Cave Quest.js b/games/Cave Quest.js deleted file mode 100644 index 1c67a0441e..0000000000 --- a/games/Cave Quest.js +++ /dev/null @@ -1,434 +0,0 @@ -/* -@title: Cave Quest -@author: OHIO-MAN -*/ -/* -Explore caves, watch out for traps, solve puzzles. -Get some spelunky vibes with this game. -Press WASD to move. -Press I to restart the level. -If you run out of hearts, you'll be sent back to level 1. -If want to play it again, just restart the game. -*/ - -const background = "b"; -const bar = "q"; -const heart = "h"; -const player = "p"; -const wall = "w"; -const push = "u"; -const exit = "e"; -const trap = "t"; -const trap2 = "y"; -const trap_square = "s"; - -let hp = 3; - -const melody = tune` -184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, -184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, -184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, -184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, -184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, -184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, -184.04907975460122: e5-184.04907975460122 + c5/184.04907975460122, -184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, -184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, -184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, -184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, -184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, -184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, -184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, -184.04907975460122: f4-184.04907975460122 + d4/184.04907975460122, -184.04907975460122: g4-184.04907975460122 + e4/184.04907975460122, -184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, -184.04907975460122: g4-184.04907975460122 + e4/184.04907975460122, -184.04907975460122: f4-184.04907975460122 + d4/184.04907975460122, -184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, -184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, -184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, -184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, -184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, -184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, -184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, -184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, -184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, -184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, -184.04907975460122: e5-184.04907975460122 + c5/184.04907975460122, -184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, -184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122` -playTune(melody, Infinity) - -setLegend( - [background, bitmap` -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000`], - [bar, bitmap` -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL`], - [heart, bitmap` -LLLLLLLLLLLLLLLL -LLL33LLLLLL33LLL -LL3333LLLL3333LL -LL33333LL33333LL -LL333333333333LL -LLL3333333333LLL -LLLL33333333LLLL -LLLLL333333LLLLL -LLLLLL3333LLLLLL -LLLLLLL33LLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL -LLLLLLLLLLLLLLLL`], - [push, bitmap` -..LLLLLLLLLLLL.. -.L111111111111L. -L11111111111111L -L11LLLLLLLLLL11L -L11L11111111L11L -L11L11111111L11L -L11L11111111L11L -L11L11111111L11L -L11L11111111L11L -L11L11111111L11L -L11L11111111L11L -L11L11111111L11L -L11LLLLLLLLLL11L -L11111111111111L -.L111111111111L. -..LLLLLLLLLLLL..`], - [wall, bitmap` -CCCFFCCCCCCFCCCC -CCCFFCCCCCCFCCCC -CCCFFCCCCCCFCCCC -CCCFFFCCCCCFFCCC -CCFFFFFCCCCCFFFF -FFFFCCFCCCCCFFFF -CCFFCCFFCCFFFCCC -CCFFCCCFCCFCCCCC -CCFCCCCFCFFCCCCC -CCFCCCCFFFCCCCCC -CCFCCCCFCCCCCCCC -CCFCCCCFFCCCCCCC -CCFFCCCCFFCCCCCC -CCFFCCCCCFFCCCCC -CCCFFCCCCCFFCCCC -CCCFFCCCCCCFCCCC`], - [player, bitmap` -.....FFFFFF..... -.....112211..... -...FFFFFFFFFF... -.....666666..... -.....606606..... -.....666666..... -.....660066..... -..FFFFF22FFFFF.. -.FFFFFFC2FFFFFF. -.FF.FFF2CFFF.FF. -.66.FFF11FFF.66. -....FFCCCCFF.... -.....CC..CC..... -.....CC..CC..... -.....LL..LL..... -....LLL..LLL....`], - [exit, bitmap` -................ -................ -................ -...LLLLLLLLLL... -...L55555555L... -...L55555555L... -...L55555555L... -...L55555555L... -...L55555555L... -...L55555555L... -...L55555555L... -...L55555555L... -...L55555555L... -...L55555555L... -...L55555555L... -...L55555555L...`], - [trap, bitmap` -LLLLLLLLLLLLLLLL -L11111111111111L -L111111LLL11111L -L1111LLL1111111L -L1111L111111111L -L111111L1111111L -L111111L1111111L -L11111111111111L -LLLL11111111111L -LLLLL1111111111L -LLLLL1111111111L -LLLLL1111111111L -LLLL11111111111L -L11111111111111L -L11111111111111L -LLLLLLLLLLLLLLLL`], - [trap2, bitmap` -LLLLLLLLLLLLLLLL -L11111111111111L -L11111LLL111111L -L1111111LLL1111L -L111111111L1111L -L1111111L111111L -L1111111L111111L -L11111111111111L -L11111111111LLLL -L1111111111LLLLL -L1111111111LLLLL -L1111111111LLLLL -L11111111111LLLL -L11111111111111L -L11111111111111L -LLLLLLLLLLLLLLLL`], - [trap_square, bitmap` -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000 -0000000000000000`] -) - -setSolids([player, wall, push, bar, heart, trap, trap2]) - -setPushables({ - [player]: [push] -}) - -let level = 0; -const levels = [ - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -wwwwwwwwwwwwww -wwwwwwwwwwwwww -wwwwwwwwwwwwww -wp..........ew -wwwwwwwwwwwwww -wwwwwwwwwwwwww -wwwwwwwwwwwwww -wwwwwwwwwwwwww -wwwwwwwwwwwwww`, // Level 1 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -wp...........w -wwwwwwwwwwww.w -we..ww.....w.w -www.w..www.w.w -ww..w.ww...w.w -ww.ww.w..www.w -ww..w.w.wwww.w -www...w......w -wwwwwwwwwwwwww`, // Level 2 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -ww...w...w...w -ww.w.w.w.w.w.w -ww.w.w.w.w.w.w -ww.w.w.w.w.w.w -ww.w.w.w.w.w.w -ww.w.w.w.w.w.w -ww.w.w.w.w.w.w -we.w...w...wpw -wwwwwwwwwwwwww`, // Level 3 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -wwwwwwwwwwwwww -wwwwwwwwwwwwww -ww..w..w..wwww -wp.uu..u..ue.w -www.ww.ww.wwww -wwwwwwwwwwwwww -wwwwwwwwwwwwww -wwwwwwwwwwwwww -wwwwwwwwwwwwww`, // Level 4 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -wwwww...wwwwww -wwwww.w.wwwwww -www.w.w.www.ww -wp.uu..uu..uew -w.w.www.w.w.ww -w...wwwww.w.ww -wwwwwwwww.w.ww -wwwwwwwww...ww -wwwwwwwwwwwwww`, // Level 5 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -wp....ww....ww -www.wuwwu..uww -wew.u....u...w -w.www.wwwwww.w -w.wwwwww..ww.w -w.www.u....u.w -w.....u..wuw.w -wwwwww.www...w -wwwwwwwwwwwwww`, // Level 6 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -wwww..pwwwwwww -wwww.w.wwwwwww -wwww..stwwwwww -wwwww.wwwwwwww -wwww...wwwwwww -wwww.wstwwwwww -wwww...wwwwwww -wwwwwwewwwwwww -wwwwwwwwwwwwww`, // Level 7 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -wwwww.wwwwpwww -ww...u...w.stw -ww.ww.stew..ww -ww.....wwys.ww -wys.wwwwww..ww -wys.wwwwww.stw -wys.....ys.stw -wys..ys....stw -wwwwwwwwwwwwww`, // Level 8 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -wpu..wwww....w -w..uu..ys.ww.w -w.u.uu....ww.w -wwwww.wwwwys.w -wys.stww.....w -wys.stww.wys.w -wwu.....u....w -wwe.stww.w.stw -wwwwwwwwwwwwww`, // Level 9 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -wwp..stwwwwwww -ww.u.stw...www -ww.u.ww...u.ww -wwuu.w..ww.www -ww.uww.www.stw -www.ww.www.stw -www....www.stw -www.ww..u...ew -wwwwwwwwwwwwww`, // Level 10 - map` -hqqqqqqqqqqqqq -wwwwwwwwwwwwww -w............w -w..w.u..ww.u.w -w..wu........w -w..w..p.u....w -w..w.........w -w..w...wwwwu.w -w.u..........w -w............w -wwwwwwwwwwwwww` // YOU WIN -] -const currentlevel = levels[level]; -setBackground(background); -setMap(currentlevel); -addText(`${hp}`, { x: 2, y: 0, color: color`2` }); - -onInput("w", () => { - getFirst(player).y -= 1; -}) -onInput("a", () => { - getFirst(player).x -= 1; -}) -onInput("s", () => { - getFirst(player).y += 1; -}) -onInput("d", () => { - getFirst(player).x += 1; -}) -onInput("i", () => { - const currentLevel = levels[level]; - if (currentLevel !== undefined) { - clearText(); - setMap(currentLevel); - addText(`${hp}`, { x: 2, y: 0, color: color`2` }); - } -}); - -afterInput(() => { - const OnExit = tilesWith(exit, player).length - const OnTrap = tilesWith(trap_square, player).length - - if (OnExit !== 0) { - level = level + 1; - const currentlevel = levels[level]; - if (currentlevel !== undefined) { - setMap(currentlevel); - } - } - if (OnTrap !== 0) { - hp = hp - 1; - addText(`${hp}`, { x: 2, y: 0, color: color`2` }); - addText(" ", { x: 6, y: 0, color: color`L` }); - addText("Ouch !", { x: 6, y: 0, color: color`2` }); - }else{ - addText(" ", { x: 6, y: 0, color: color`L` }); - } - if (hp <= 0){ - hp = 3; - level = 0; - const currentlevel = levels[level]; - clearText(); - setMap(currentlevel); - addText(`${hp}`, { x: 2, y: 0, color: color`2` }); - addText("You died !", { x: 6, y: 0, color: color`2` }); - } - if (level >= 10){ - addText(" ", { x: 6, y: 0, color: color`L` }); - addText("You won !", { x: 6, y: 0, color: color`2` }); - } -}) \ No newline at end of file From 1cd5fb31a653adf7433a1b8ddf387ba5959db724 Mon Sep 17 00:00:00 2001 From: Literally Everything <111604998+OHIO-MAN@users.noreply.github.com> Date: Sat, 18 Feb 2023 20:57:42 +0500 Subject: [PATCH 80/92] Add files via upload --- games/Cave-Quest.js | 452 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 452 insertions(+) create mode 100644 games/Cave-Quest.js diff --git a/games/Cave-Quest.js b/games/Cave-Quest.js new file mode 100644 index 0000000000..608238b082 --- /dev/null +++ b/games/Cave-Quest.js @@ -0,0 +1,452 @@ +/* +@title: Cave-Quest +@author: OHIO-MAN +*/ +/* +Explore caves, watch out for traps, solve puzzles. +Get some spelunky vibes with this game. +Press WASD to move. +Press I to restart the level. +If you run out of hearts, you'll be sent back to level 1. +If want to play it again, just restart the game. +*/ + +const background = "b"; +const bar = "q"; +const heart = "h"; +const player = "p"; +const wall = "w"; +const push = "u"; +const exit = "e"; +const trap = "t"; +const trap2 = "y"; +const trap_square = "s"; + +let hp = 3; +let time = 0; +let win = false; + +const melody = tune` +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: e5-184.04907975460122 + c5/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, +184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, +184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: f4-184.04907975460122 + d4/184.04907975460122, +184.04907975460122: g4-184.04907975460122 + e4/184.04907975460122, +184.04907975460122: a4-184.04907975460122 + f4/184.04907975460122, +184.04907975460122: g4-184.04907975460122 + e4/184.04907975460122, +184.04907975460122: f4-184.04907975460122 + d4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: e4-184.04907975460122 + c4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: b4-184.04907975460122 + g4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: e5-184.04907975460122 + c5/184.04907975460122, +184.04907975460122: d5-184.04907975460122 + b4/184.04907975460122, +184.04907975460122: c5-184.04907975460122 + a4/184.04907975460122` +playTune(melody, Infinity) + +setLegend( + [background, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`], + [bar, bitmap` +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL`], + [heart, bitmap` +LLLLLLLLLLLLLLLL +LLL33LLLLLL33LLL +LL3333LLLL3333LL +LL33333LL33333LL +LL333333333333LL +LLL3333333333LLL +LLLL33333333LLLL +LLLLL333333LLLLL +LLLLLL3333LLLLLL +LLLLLLL33LLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL +LLLLLLLLLLLLLLLL`], + [push, bitmap` +..LLLLLLLLLLLL.. +.L111111111111L. +L11111111111111L +L11LLLLLLLLLL11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11L11111111L11L +L11LLLLLLLLLL11L +L11111111111111L +.L111111111111L. +..LLLLLLLLLLLL..`], + [wall, bitmap` +CCCFFCCCCCCFCCCC +CCCFFCCCCCCFCCCC +CCCFFCCCCCCFCCCC +CCCFFFCCCCCFFCCC +CCFFFFFCCCCCFFFF +FFFFCCFCCCCCFFFF +CCFFCCFFCCFFFCCC +CCFFCCCFCCFCCCCC +CCFCCCCFCFFCCCCC +CCFCCCCFFFCCCCCC +CCFCCCCFCCCCCCCC +CCFCCCCFFCCCCCCC +CCFFCCCCFFCCCCCC +CCFFCCCCCFFCCCCC +CCCFFCCCCCFFCCCC +CCCFFCCCCCCFCCCC`], + [player, bitmap` +.....FFFFFF..... +.....112211..... +...FFFFFFFFFF... +.....666666..... +.....606606..... +.....666666..... +.....660066..... +..FFFFF22FFFFF.. +.FFFFFFC2FFFFFF. +.FF.FFF2CFFF.FF. +.66.FFF11FFF.66. +....FFCCCCFF.... +.....CC..CC..... +.....CC..CC..... +.....LL..LL..... +....LLL..LLL....`], + [exit, bitmap` +................ +................ +................ +...LLLLLLLLLL... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L... +...L55555555L...`], + [trap, bitmap` +LLLLLLLLLLLLLLLL +L11111111111111L +L111111LLL11111L +L1111LLL1111111L +L1111L111111111L +L111111L1111111L +L111111L1111111L +L11111111111111L +LLLL11111111111L +LLLLL1111111111L +LLLLL1111111111L +LLLLL1111111111L +LLLL11111111111L +L11111111111111L +L11111111111111L +LLLLLLLLLLLLLLLL`], + [trap2, bitmap` +LLLLLLLLLLLLLLLL +L11111111111111L +L11111LLL111111L +L1111111LLL1111L +L111111111L1111L +L1111111L111111L +L1111111L111111L +L11111111111111L +L11111111111LLLL +L1111111111LLLLL +L1111111111LLLLL +L1111111111LLLLL +L11111111111LLLL +L11111111111111L +L11111111111111L +LLLLLLLLLLLLLLLL`], + [trap_square, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`] +) + +setSolids([player, wall, push, bar, heart, trap, trap2]) + +setPushables({ + [player]: [push] +}) + +let level = 0; +const levels = [ + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wp..........ew +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww`, // Level 1 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wp...........w +wwwwwwwwwwww.w +we..ww.....w.w +www.w..www.w.w +ww..w.ww...w.w +ww.ww.w..www.w +ww..w.w.wwww.w +www...w......w +wwwwwwwwwwwwww`, // Level 2 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +ww...w...w...w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +ww.w.w.w.w.w.w +we.w...w...wpw +wwwwwwwwwwwwww`, // Level 3 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +ww..w..w..wwww +wp.uu..u..ue.w +www.ww.ww.wwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww +wwwwwwwwwwwwww`, // Level 4 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwwww...wwwwww +wwwww.w.wwwwww +www.w.w.www.ww +wp.uu..uu..uew +w.w.www.w.w.ww +w...wwwww.w.ww +wwwwwwwww.w.ww +wwwwwwwww...ww +wwwwwwwwwwwwww`, // Level 5 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wp....ww....ww +www.wuwwu..uww +wew.u....u...w +w.www.wwwwww.w +w.wwwwww..ww.w +w.www.u....u.w +w.....u..wuw.w +wwwwww.www...w +wwwwwwwwwwwwww`, // Level 6 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwww..pwwwwwww +wwww.w.wwwwwww +wwww..stwwwwww +wwwww.wwwwwwww +wwww...wwwwwww +wwww.wstwwwwww +wwww...wwwwwww +wwwwwwewwwwwww +wwwwwwwwwwwwww`, // Level 7 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwwww.wwwwpwww +ww...u...w.stw +ww.ww.stew..ww +ww.....wwys.ww +wys.wwwwww..ww +wys.wwwwww.stw +wys.....ys.stw +wys..ys....stw +wwwwwwwwwwwwww`, // Level 8 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wpu..wwww....w +w..uu..ys.ww.w +w.u.uu....ww.w +wwwww.wwwwys.w +wys.stww.....w +wys.stww.wys.w +wwu.....u....w +wwe.stww.w.stw +wwwwwwwwwwwwww`, // Level 9 + map` +hqqqqqqqqqqqqq +wwwwwwwwwwwwww +wwp..stwwwwwww +ww.u.stw...www +ww.u.ww...u.ww +wwuu.w..ww.www +ww.uww.www.stw +www.ww.www.stw +www....www.stw +www.ww..u...ew +wwwwwwwwwwwwww`, // Level 10 + map` +qqqqqqqqqqqqqq +qqqqqqqqqqqqqq +qqqqqqqqqqqqqq +qqqqqqqqqqqqqq +qqqqqqqqqqqqqq +qqqqqqqqqqqqqq +qqqqqqqqqqqqqq +qqqqqqqqqqqqqq +q.....p......q +q............q +qqqqqqqqqqqqqq` // YOU WIN +] +const currentlevel = levels[level]; +setBackground(background); +setMap(currentlevel); +addText(`${hp}`, { x: 2, y: 0, color: color`2` }); + +onInput("w", () => { + getFirst(player).y -= 1; +}) +onInput("a", () => { + getFirst(player).x -= 1; +}) +onInput("s", () => { + getFirst(player).y += 1; +}) +onInput("d", () => { + getFirst(player).x += 1; +}) +onInput("i", () => { + const currentLevel = levels[level]; + if (currentLevel !== undefined) { + clearText(); + setMap(currentLevel); + addText(`${hp}`, { x: 2, y: 0, color: color`2` }); + } +}); + +afterInput(() => { + const OnExit = tilesWith(exit, player).length + const OnTrap = tilesWith(trap_square, player).length + + if (OnExit !== 0) { + level = level + 1; + const currentlevel = levels[level]; + if (currentlevel !== undefined) { + setMap(currentlevel); + } + } + if (OnTrap !== 0) { + hp = hp - 1; + addText(`${hp}`, { x: 2, y: 0, color: color`2` }); + addText(" ", { x: 6, y: 0, color: color`L` }); + addText("Ouch !", { x: 6, y: 0, color: color`2` }); + }else{ + addText(" ", { x: 6, y: 0, color: color`L` }); + } + if (hp <= 0){ + hp = 3; + level = 0; + const currentlevel = levels[level]; + clearText(); + setMap(currentlevel); + addText(`${hp}`, { x: 2, y: 0, color: color`2` }); + addText("You died !", { x: 6, y: 0, color: color`2` }); + time = 0 + } + if (level >= 10){ + win = true; + addText(" ", { x: 0, y: 0, color: color`L` }); + addText(" ", { x: 0, y: 15, color: color`L` }); + addText("You won !", { x: 6, y: 2, color: color`2` }); + addText("Your final time", { x: 3, y: 4, color: color`2` }); + addText(`${Math.round(time * 10)/10}`, { x: 8, y: 6, color: color`2` }); + } +}) +const timer = setInterval(() => { + addText(" ", { x: 0, y: 15, color: color`L` }); + if (win === false){ + time +=0.1 + addText(Math.round(time * 10)/10 + "", { + x: 0, + y: 15, + color: color`2` + }); + } + }, 100); From 8ca3f064d7d426bf7f1311eb59eb9b4a5f0c2b4b Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sat, 18 Feb 2023 21:10:27 -0300 Subject: [PATCH 81/92] add #805 --- games/metadata.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/games/metadata.json b/games/metadata.json index b7417e7b7e..7dada4039c 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2136,11 +2136,11 @@ "addedOn": "2023-02-15" }, { - "filename": "the_hungry_mouse", - "title": "the_hungry_mouse", - "author": "KaiEtkin", + "filename": "Cave-Quest", + "title": "Cave-Quest", + "author": "OHIO-MAN", "img": "", "tags": ["puzzle"], - "addedOn": "2023-02-16" + "addedOn": "2023-02-18" } ] From 50ff632ae3f9ee9129945a6b87ce501dc0d683e5 Mon Sep 17 00:00:00 2001 From: Amin Date: Sun, 19 Feb 2023 16:06:09 +0100 Subject: [PATCH 82/92] add tunnel --- games/tunnel.js | 180 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 games/tunnel.js diff --git a/games/tunnel.js b/games/tunnel.js new file mode 100644 index 0000000000..87ba82f667 --- /dev/null +++ b/games/tunnel.js @@ -0,0 +1,180 @@ +/* +@title: tunnel +@author: amin + +*/ + +const HEIGHT = 20; +const WIDTH = 20; + +let WALL_WIDTH = 8; +let iteration = 1; + +let sound = tune` +127.11864406779661: f5~127.11864406779661 + e5~127.11864406779661 + d5~127.11864406779661, +127.11864406779661: d5~127.11864406779661 + c5~127.11864406779661 + b4~127.11864406779661 + a4~127.11864406779661 + g4~127.11864406779661, +127.11864406779661: g4-127.11864406779661 + f4-127.11864406779661, +3686.4406779661017`; + +let running = true; +const player = "p"; +const wall = "w"; + +setLegend( + [ + player, + bitmap` +................ +................ +................ +.......00....... +......0000...... +....00000000.... +....00333300.... +...0003223000... +...0003333000... +..000000000000.. +................ +................ +................ +................ +................ +................`, + ], + [ + wall, + bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`, + ] +); + +let level = generateLine() + "\n"; +let playerPosition = Math.floor(WIDTH / 2); + +for (let i = 0; i < HEIGHT - 1; i++) { + let lines = level.split("\n"); + lines.unshift(generateNewLine(lines[0])); + level = lines.join("\n"); +} + +setMap(level); + +addText("Tunnel", { + x: 6, + y: 5, + color: color`7`, +}); + +addText("Use A and D ", { + x: 4, + y: 6, + color: color`9`, +}); + +addText("to move ", { + x: 5, + y: 7, + color: color`9`, +}); + +function generateLine() { + let left = Math.floor(Math.random() * WALL_WIDTH); + + let line = wall.repeat(left) + ".".repeat(WIDTH - WALL_WIDTH) + wall.repeat(WALL_WIDTH - left); + + return line; +} + +function generateNewLine(previousLine) { + let i = 0; + while (previousLine[i] == "w") { + i += 1; + } + let left = Math.min(Math.max(0, i + Math.floor(Math.random() * 3 - 1)), WALL_WIDTH); + let line = wall.repeat(left) + ".".repeat(WIDTH - WALL_WIDTH) + wall.repeat(WALL_WIDTH - left); + + return line; +} + +onInput("a", () => { + if (running && getFirst(player)) { + getFirst(player).x -= 1; + if (playerPosition < WIDTH) playerPosition -= 1; + } +}); + +onInput("d", () => { + if (running && getFirst(player)) { + getFirst(player).x += 1; + if (playerPosition < WIDTH) playerPosition += 1; + } +}); + +afterInput(() => { + let lines = level.split("\n"); + let last = lines[lines.length - 1]; + if (last[playerPosition] == "w") { + running = false; + addText("You lose!", { + x: 5, + y: 6, + + color: color`3`, + }); + } +}); + +setTimeout(() => { + clearText(); + setInterval(() => { + if (running) { + if (iteration % 100 == 0) { + playTune(sound); + if (WALL_WIDTH < WIDTH) WALL_WIDTH += 1; + } + iteration++; + addText("Score: " + iteration, { + x: 4, + y: 0, + color: color`5`, + }); + + let lines = level.split("\n"); + + let newLines = lines.splice(0, lines.length - 1); + let last = newLines[newLines.length - 1]; + + newLines.unshift(generateNewLine(newLines[0])); + if (last[playerPosition] == "w") { + running = false; + addText("You lose!", { + x: 5, + y: 6, + + color: color`3`, + }); + } else { + newLines[newLines.length - 1] = last.substring(0, playerPosition) + player + last.substring(playerPosition + 1, last.length); + + level = newLines.join("\n"); + + setMap(map`${level}`); + } + } + }, 40); +}, 500); From c1562174ab1340f82d4077667dfc0bdb6d6e4734 Mon Sep 17 00:00:00 2001 From: Amin Date: Sun, 19 Feb 2023 18:01:19 +0100 Subject: [PATCH 83/92] additional movement keys --- games/tunnel.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/games/tunnel.js b/games/tunnel.js index 87ba82f667..cfa43417b5 100644 --- a/games/tunnel.js +++ b/games/tunnel.js @@ -111,19 +111,25 @@ function generateNewLine(previousLine) { return line; } -onInput("a", () => { +const handleLeft = () => { if (running && getFirst(player)) { getFirst(player).x -= 1; if (playerPosition < WIDTH) playerPosition -= 1; } -}); +}; -onInput("d", () => { +const handleRight = () => { if (running && getFirst(player)) { getFirst(player).x += 1; if (playerPosition < WIDTH) playerPosition += 1; } -}); +}; + +onInput("a", handleLeft); +onInput("d", handleRight); + +onInput("j", handleLeft); +onInput("k", handleRight); afterInput(() => { let lines = level.split("\n"); From eca053d3c9ea07ea48ba7370cfe7a532fc3b2991 Mon Sep 17 00:00:00 2001 From: Amin Date: Sun, 19 Feb 2023 18:03:45 +0100 Subject: [PATCH 84/92] update player sprite --- games/tunnel.js | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/games/tunnel.js b/games/tunnel.js index cfa43417b5..29be38cbb5 100644 --- a/games/tunnel.js +++ b/games/tunnel.js @@ -15,6 +15,15 @@ let sound = tune` 127.11864406779661: d5~127.11864406779661 + c5~127.11864406779661 + b4~127.11864406779661 + a4~127.11864406779661 + g4~127.11864406779661, 127.11864406779661: g4-127.11864406779661 + f4-127.11864406779661, 3686.4406779661017`; +let deathSound = tune` +57.915057915057915: f4~57.915057915057915 + e4~57.915057915057915, +57.915057915057915: d4/57.915057915057915 + f4~57.915057915057915 + e4~57.915057915057915, +57.915057915057915: d4-57.915057915057915 + c4-57.915057915057915 + f4~57.915057915057915 + e4~57.915057915057915, +57.915057915057915: d4-57.915057915057915 + c4-57.915057915057915 + e4~57.915057915057915 + f4~57.915057915057915, +57.915057915057915: d4/57.915057915057915 + e4~57.915057915057915 + f4~57.915057915057915, +57.915057915057915: e4~57.915057915057915, +57.915057915057915: e4~57.915057915057915 + d4~57.915057915057915, +1447.8764478764479`; let running = true; const player = "p"; @@ -26,20 +35,20 @@ setLegend( bitmap` ................ ................ -................ -.......00....... -......0000...... ....00000000.... -....00333300.... -...0003223000... -...0003333000... -..000000000000.. -................ -................ -................ -................ -................ -................`, +...0044444400... +..004444444400.. +.00444444444400. +0044443333444400 +0444443223444440 +0444443443444440 +0444444444444440 +0444444444444440 +0444444444444440 +0444444444444440 +0444444444444440 +0444444444444440 +0000000000000000`, ], [ wall, From 9b5668786afac910fafab893fb850bbf5f7a58b0 Mon Sep 17 00:00:00 2001 From: Amin Date: Sun, 19 Feb 2023 18:16:56 +0100 Subject: [PATCH 85/92] remove empty line --- games/tunnel.js | 1 - 1 file changed, 1 deletion(-) diff --git a/games/tunnel.js b/games/tunnel.js index 29be38cbb5..c70581c78e 100644 --- a/games/tunnel.js +++ b/games/tunnel.js @@ -1,7 +1,6 @@ /* @title: tunnel @author: amin - */ const HEIGHT = 20; From dc68c7f1d5cf57186aa366b2c75b82e453fdf1bd Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sun, 19 Feb 2023 14:55:35 -0300 Subject: [PATCH 86/92] add #807 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 7dada4039c..7f07b481a0 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2142,5 +2142,13 @@ "img": "", "tags": ["puzzle"], "addedOn": "2023-02-18" + }, + { + "filename": "tunnel", + "title": "tunnel", + "author": "amin", + "img": "", + "tags": ["endless"], + "addedOn": "2023-02-19" } ] From 6fd982dbe56701bffd68c235f666f5a42e4a597f Mon Sep 17 00:00:00 2001 From: Pfostierer Date: Sun, 19 Feb 2023 21:59:08 +0100 Subject: [PATCH 87/92] Dino --- games/dino.js | 274 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 274 insertions(+) create mode 100644 games/dino.js diff --git a/games/dino.js b/games/dino.js new file mode 100644 index 0000000000..40e97b85d2 --- /dev/null +++ b/games/dino.js @@ -0,0 +1,274 @@ +/* +@title: dino +@author: Pfostierer +*/ + +const h = 10; +const w = 20; +let running = true; +let score = 0; + +const player = "p"; +const player2 = "P" +const bird = "b"; +const bird2= "B" +const cloud = "c"; +const floor = "f"; + +setLegend( + [ + player, + bitmap` +................ +.........LLLLLL. +.........L.LLLL. +.........LLLLLL. +.........LLLLLL. +L.......LLL..... +LL.....LLLLLL... +LLL..LLLLL...... +LLLLLLLLLLLLLL.. +.LLLLLLLL....... +.LLLLLLLL....... +..LLLLLLL....... +...LL...L....... +...L....L....... +...L....L....... +...LL...LL......`, + ], + [ + player2, + bitmap` +................ +.........LLLLLL. +.........L.LLLL. +.........LLLLLL. +.........LLLLLL. +L.......LLL..... +LL.....LLLLLL... +LLL..LLLLL...... +LLLLLLLLLLLLLL.. +.LLLLLLLL....... +.LLLLLLLL....... +..LLLLLLL....... +...LL...L....... +...L....LLL..... +...LLL.......... +................` + ], + [ + bird, + bitmap` +......111111.... +.......11111.... +...1....1111.... +..111....111.... +.11111....11.... +1111111...11.... +......111111.... +.......111111111 +........11111... +................ +................ +................ +................ +................ +................ +................`, + ], + [ + bird2, + bitmap` +................ +................ +...1............ +..111........... +.11111.......... +1111111......... +......111111.... +.......111111111 +........11111... +.........111.... +.........111.... +.........111.... +........1111.... +.......11111.... +................ +................` + ], + + [ + floor, + bitmap` +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC +CCCCCCCCCCCCCCCC`, + ], + [ + cloud, + bitmap` +................ +................ +................ +......1111...... +...1111..11..... +.111......111... +.1.........11... +1...........111. +1....1111111111. +................ +................ +................ +................ +................ +................ +................`, + ] +); + +const ground = () => { + return floor.repeat(w); +}; + +const air = () => { + return ".".repeat(w) +} + +const airWithClouds = () => { + let layer = "" + for(let i = 0; i { + let layer = "." + player; + for (let i = layer.length; i < w; i++) { + + + layer += "."; + + } + return layer; +}; + +let layers = []; + +for (let i = 0; i < 3; i++) { + layers.push(airWithClouds()); +} +for (let i = 0; i < 4; i++) { + layers.push(air()); +} +layers.push(main()); +layers.push(ground()); +layers.push(ground()); + +setMap(layers.join("\n")); + +let jumping = false; +let jumpCount = 0; +let jumpDirection = 1; + +const playerSprite = () => { + return getFirst(player) ? getFirst(player): getFirst(player2) +} + +onInput("w", () => { + if(!jumping) + jumping = true; +}); + +setInterval(() => { + if (running) { + clearText(); + addText(score.toString(), { + x: 1, + y: 4, + color: color`0`, + }); + score++; + for (let i = 0; i < 3; i++) { + let l = layers[i].substring(1) + if(Math.floor(Math.random()*7)==1) { + l+=cloud + }else { + l+="." + } + layers[i] = l + } + + layers[7] = layers[7].substring(1); + if (Math.floor(Math.random() * 10) == 1) { + layers[7] = layers[7] + bird; + } else { + layers[7] = layers[7] + "."; + } + + for (let currentBird of getAll(bird)) { + if (currentBird.x == 2 && playerSprite().y == 7) { + running = false; + addText("dead", { + x: 7, + y: 4, + color: color`3`, + }); + } + } + + for (let currentBird of getAll(bird2)) { + if (currentBird.x == 2 && playerSprite().y == 7) { + running = false; + addText("dead", { + x: 7, + y: 4, + color: color`3`, + }); + } + } + + + if (jumping) { + jumpCount += jumpDirection; + if (jumpCount == 3) { + jumpDirection = -1; + } + if (jumpCount == -1) { + jumping = false; + jumpCount = 0; + jumpDirection = 1; + } + } + + for (let i = 4; i < 7; i++) { + layers[i] = air(); + } + + layers[7] = layers[7].replace(player, ".").replace(player2, ".") + if(score%2==1) { + layers[7] = layers[7].replace(bird, bird2) + }else { + layers[7] = layers[7].replace(bird2, bird) + } + layers[7 - jumpCount] = layers[7 - jumpCount].substring(0, 1) + (score%2==0 ? player : player2) + layers[7 - jumpCount].substring(2, layers[7 - jumpCount].length); + setMap(layers.join("\n")); + } +}, 50); From 8f3f8c0a27c267e38198cbe70063811f34d0b5b0 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sun, 19 Feb 2023 18:54:20 -0300 Subject: [PATCH 88/92] add #808 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 7f07b481a0..0f7cd502fb 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2150,5 +2150,13 @@ "img": "", "tags": ["endless"], "addedOn": "2023-02-19" + }, + { + "filename": "dino", + "title": "dino", + "author": "Pfostierer", + "img": "", + "tags": ["endless"], + "addedOn": "2023-02-19" } ] From ff3913e6f652f084a21d3d1914128b6752d00158 Mon Sep 17 00:00:00 2001 From: Bedoo Date: Sun, 19 Feb 2023 23:13:37 +0100 Subject: [PATCH 89/92] microwars --- games/microwars.js | 232 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 games/microwars.js diff --git a/games/microwars.js b/games/microwars.js new file mode 100644 index 0000000000..74a98579c2 --- /dev/null +++ b/games/microwars.js @@ -0,0 +1,232 @@ +/* +@title: microwars +@author: Bedo +*/ + +const rasp = "r" +const raspProjectile = "R" +const ardu = "a" +const arduProjectile = "A" +const heart = "h" +const emptyHeart = "H" +const bg = "b" + +let raspHealth = 3 +let arduHealth = 3 + +let raspCooldown = 1 +let arduCooldown = 1 + +let active = true + +setLegend( + [rasp, bitmap` +................ +................ +................ +................ +................ +................ +DFDFDFDFDFDFDFDF +1DD0D000DDDDDDDD +1DDDD000DDD33DDF +1DD2D000DDDDDDDD +DFDFDFDFDFDFDFDF +................ +................ +................ +................ +................`], + [raspProjectile, bitmap` +.4444......44... +.44444.444444... +.444444444444... +..444444444..... +....44444....... +..0000000000.... +.0330333303000.. +.0300000000330.. +.0000330030330.. +.003033303000000 +.033033303300330 +.033000303303330 +.003030000000330 +..00033033330330 +...0000033330000 +......0000000...`], + [ardu, bitmap` +................ +................ +................ +................ +................ +................ +7F7F7F7F7F7F7F7F +F70007777707777L +770007677707277L +F70007700777777L +7F7F7F7F7F7F7F7F +................ +................ +................ +................ +................`], + [arduProjectile, bitmap` +................ +................ +................ +77.............. +777............. +77777..77....... +777777.777...... +77777777777..... +727777777777.... +7222777777777... +77722277777777.. +.77772227777777. +...777777777777. +.....7777...7777 +.......77....... +................`], + [bg, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`], + [heart, bitmap` +....20000002.... +...2011111102... +...2011LL1102... +...2011111102... +...2900000092... +...2999099992... +...2990009992... +...2999099992... +...2099999902... +...2000000002... +...2000000002... +...2000000002... +...2009990002... +...2000000002... +...2000000002... +....22222222....`] +) + +let field = map` +hhh....hhh +.......... +.......... +a........r +.......... +.......... +..........` + +setBackground(bg) +setMap(field) + +onInput("w", () => { + getFirst(ardu).y -=1 +}) + +onInput("s", () => { + getFirst(ardu).y +=1 +}) + +onInput("a", () => { + if(!active) return + if(arduCooldown<1)return + const ino = getFirst(ardu) + addSprite(ino.x+1, ino.y, arduProjectile) + arduCooldown = 0 +}) + +onInput("i", () => { + getFirst(rasp).y -=1 +}) + +onInput("k", () => { + getFirst(rasp).y +=1 +}) + +onInput("l", () => { + if(!active) return + if(raspCooldown<1)return + const pi = getFirst(rasp) + addSprite(pi.x-1, pi.y, raspProjectile) + raspCooldown = 0 +}) + +const spawnHearts = () => { + for(const h of getAll(heart)) { + h.remove() + } + for(let i = 0; i { + arduCooldown+=0.08 + raspCooldown+=0.08 + spawnHearts() + if(active) { + for (const pi of getAll(raspProjectile)) { + if(pi.x==0) { + let x = pi.x + let y = pi.y + clearTile(pi.x, pi.y) + if(!getFirst(ardu)) { + arduHealth-=1 + addSprite(x, y,ardu) + } + } + pi.x-=1 + } + + for (const ino of getAll(arduProjectile)) { + if(ino.x==width()-1) { + let x = ino.x + let y = ino.y + clearTile(ino.x, ino.y) + if(!getFirst(rasp)) { + raspHealth-=1 + addSprite(x, y,rasp) + } + } + ino.x+=1 + } + } + + + if(raspHealth<=0) { + active = false + addText("ARDUINO WON!", { + x: 3, + y: 3, + color: color`7` + }) + }else if(arduHealth<=0) { + active = false + addText("RASPBERRY WON!", { + x: 3, + y: 3, + color: color`3` + }) + } + +}, 100) \ No newline at end of file From 25d8d4e29052c4f0f210763b3dd5069711d85536 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Sun, 19 Feb 2023 21:45:02 -0300 Subject: [PATCH 90/92] add #809 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 0f7cd502fb..ae21fdd804 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2158,5 +2158,13 @@ "img": "", "tags": ["endless"], "addedOn": "2023-02-19" + }, + { + "filename": "microwars", + "title": "microwars", + "author": "Bedo", + "img": "", + "tags": ["multiplayer"], + "addedOn": "2023-02-19" } ] From d54dc885ffbe3b5753f76a00dcbcdb0fae5b1e7a Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:18:13 -0300 Subject: [PATCH 91/92] add #1108 file --- games/Asteroid_Dodge.js | 362 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 games/Asteroid_Dodge.js diff --git a/games/Asteroid_Dodge.js b/games/Asteroid_Dodge.js new file mode 100644 index 0000000000..c572d83674 --- /dev/null +++ b/games/Asteroid_Dodge.js @@ -0,0 +1,362 @@ +/* +@title: Asteroid_Dodge! +@author: V205 +*/ +// Thanks to Hackclub and tutorials! +// Setup stuff! + +//Sprites! +const player = "p"; // Define Player +const coin = "c";// Define Coin +const obstacle = "o";// Define obstacle(asteroids) +const background = "b";// Define background. Only used to create space. +const wall = "w";// Used to create space for text. + +//Tunes! +const gamePlayTune = tune` +75, +37.5: D5^37.5, +37.5: D5^37.5, +37.5: C5^37.5, +37.5: C5^37.5, +37.5: C5^37.5, +37.5: G4^37.5, +37.5: G4^37.5, +37.5: G4^37.5, +37.5, +37.5: A5^37.5, +75, +37.5: B4^37.5, +150, +37.5: A5^37.5, +37.5: A5^37.5, +37.5, +37.5: C4^37.5, +37.5, +37.5: A5^37.5, +37.5: A5^37.5, +37.5, +37.5: A5^37.5, +37.5: A5^37.5, +112.5`// Game tune. +const gameEndTune = tune` +133.92857142857142, +133.92857142857142: B5^133.92857142857142, +133.92857142857142: A5^133.92857142857142, +133.92857142857142: G5^133.92857142857142, +133.92857142857142: F5^133.92857142857142, +133.92857142857142: E5^133.92857142857142, +133.92857142857142: D5^133.92857142857142, +133.92857142857142: C5^133.92857142857142, +133.92857142857142: B4^133.92857142857142, +133.92857142857142: A4^133.92857142857142, +133.92857142857142: G4^133.92857142857142, +133.92857142857142: F4^133.92857142857142, +133.92857142857142: E4^133.92857142857142, +133.92857142857142, +133.92857142857142: E4^133.92857142857142, +133.92857142857142: E4^133.92857142857142, +133.92857142857142, +133.92857142857142: E4^133.92857142857142, +133.92857142857142: E4^133.92857142857142, +133.92857142857142, +133.92857142857142: E4^133.92857142857142, +133.92857142857142: E4^133.92857142857142, +133.92857142857142, +133.92857142857142: D4^133.92857142857142, +133.92857142857142: D4^133.92857142857142, +133.92857142857142, +133.92857142857142: C4^133.92857142857142, +133.92857142857142: C4^133.92857142857142, +535.7142857142857`// Wa wa wa wa. You lost! + +//Variables! +var gameTime = 0;// How long have you been playing? +var coinsCollected = 0; // How many coins? +var difficulty = 1; // Difficulty increases every hundred. Might become impossible at 300 or less. +var changeDifficulty = false; //Change to true if you want the difficulty to increase by one every hundred seconds. +//Set bitmaps. +setLegend( + [obstacle, bitmap` +0000000000000000 +0000000000000000 +0000000LLL000000 +00000LLL11LL0000 +0000LLL11LLLL000 +000LLL11LLL0L000 +000LL11LLL11LL00 +000LL1LLL111L100 +00LLLLLLL100L100 +000LLLLLL111LL00 +000LLL11111LL000 +000LLL1111LLL000 +0000LLLLLLLL0000 +00000LLLL1100000 +0000000LL1000000 +0000000000000000`], // Obstacles(asteroids) + [player, bitmap` +................ +................ +..999........... +..9999.......... +..99999......... +.99999999....... +.999229999...... +39922229999..... +399222299999.... +3992222999999... +999922999999.... +99999999999..... +.9999999........ +.9999........... +.99............. +................`],// Spaceship + [background, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0002000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000200 +0000000000000000`],// Background + [coin, bitmap` +0000000000000000 +0000066666000000 +0000666666600000 +0006699996600000 +0066996666660000 +0066966666660000 +0666966666666000 +0669966666666600 +0669966666666660 +0066996666666660 +0066699666666600 +0006669999666000 +0006666666660000 +0000666666600000 +0000066660000000 +0000000000000000`],// coin. Very ugly. + [wall, bitmap` +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000 +0000000000000000`],// Black square. + +) + +setMap(map` +wwwwwwww +........ +........ +........ +........ +p....... +........ +........ +........ +........`);// set map. +setSolids([wall, player]);// Don't allow other things to go inside these things. +setBackground(background);// Set background. + + +var gameRunning = true; //This will go to false if you crash into a asteroid. + + +// End Setup stuff +// Controlls. +onInput("w", () => { + if (gameRunning) { + getFirst(player).y -= 1; + } +}); + +onInput("s", () => { + if (gameRunning) { + getFirst(player).y += 1; + } +}); +// Obstacle management.w +function increaseDifficulty() { + + if(gameTime >=101 && changeDifficulty == true){ + + difficulty = Math.floor(gameTime/100 +1 ); + } +} + + +function spawnObstacle() { + + for (let i = 0; i < difficulty; i++) { + let x = 7; + let y = getRandomNumber(1,9);//old way: Math.floor(Math.random() * 8.5); + + addSprite(x, y, obstacle); + } + +} + +function moveObstacles() { + let obstacles = getAll(obstacle); + + for (let i = 0; i < obstacles.length; i++) { + obstacles[i].x -= 1; + } +} + +function despawnObstacles() { + let obstacles = getAll(obstacle); + + for (let i = 0; i < obstacles.length; i++) { + if (obstacles[i].x == 0) { + obstacles[i].remove(); + } + } +} + +function checkHit() { + let obstacles = getAll(obstacle); + let p = getFirst(player); + + for (let i = 0; i < obstacles.length; i++) { + if (obstacles[i].x == p.x && obstacles[i].y == p.y) { + return true; + } + } + + return false; +} + +// End Obstacle management. + +// Coin management. + +function spawnCoins() { + + if ( getRandomNumber(1,3)== 1) { + let x = 7; + let y = getRandomNumber(1,9);//old way: Math.floor(Math.random() * 8.5); + + addSprite(x, y, coin); + } + +} + +function moveCoins() { + let coins = getAll(coin); + + for (let i = 0; i < coins.length; i++) { + coins[i].x -= 1; + } +} + +function despawnCoins() { + let coins = getAll(coin); + + for (let i = 0; i < coins.length; i++) { + if (coins[i].x == 0) { + coins[i].remove(); + } + } +} + + +function checkCoinHit() { + let coins = getAll(coin); + let p = getFirst(player); + + for (let i = 0; i < coins.length; i++) { + if (coins[i].x == p.x && coins[i].y == p.y) { + return true; + } + } + + return false; +} + + + + +// Function to make random numbers easier. +const getRandomNumber = (min, max) => { + return Math.floor(Math.random() * (max - min + 1)) + min; +}; + + +var gameLoop = setInterval(() => { + increaseDifficulty(); + despawnObstacles(); + moveObstacles(); + spawnObstacle(); + + despawnCoins(); + moveCoins(); + spawnCoins(); + + playTune(gamePlayTune); + gameTime += 1; + + + addText( String(gameTime) , { + x: 0, + y: 0, + color: color`3` + }); + + if(checkCoinHit()){ + + coinsCollected+=1; + addText("C: "+ String(coinsCollected), { + x: 5, + y: 0, + color: color`6` + }); + } + if (checkHit()) { + clearInterval(gameLoop); + gameRunning = false; + clearText(); + playTune(gameEndTune); + addText("Game Over!", { + x: 5, + y: 6, + color: color`3` + }); + addText("Time: "+ String(gameTime), { + x: 5, + y: 7, + color: color`3` + }); + + addText("Coins: "+ String(coinsCollected), { + x: 5, + y: 8, + color: color`6` + }); + } + + + +}, 1000) + From a5ce897dcad0540fdeaf17825e60d507b5ea7dc6 Mon Sep 17 00:00:00 2001 From: Lucas <88567622+LucasHT22@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:21:10 -0300 Subject: [PATCH 92/92] add #1108 --- games/metadata.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/games/metadata.json b/games/metadata.json index 5e67f309ed..d19778dad7 100644 --- a/games/metadata.json +++ b/games/metadata.json @@ -2838,5 +2838,13 @@ "img": "thunderball", "tags": [], "added on": "2023-08-03" + }, + { + "filename": "Asteroid_Dodge", + "title": "Asteroid_Dodge", + "author": "V205", + "img": "", + "tags": ["dodge"], + "added on": "2023-08-09" } ]