hey make 2 more maps to these and add power ups in this to make this fun and add 20 more…
- User
hey make 2 more maps to these and add power ups in this to make this fun and add 20 more features and list them to make this fun and character selection add some characters.
const CHARACTER = { BOTTOM: "▗", TOP: "▝", OVER: "▞", UNDER: "▚", CRASH: "⭒", }; const BOX = { BOTTOM: "▖", TOP: "▘", }; const MISC = { FLAG_DARK: "⚑", FLAG_LIGHT: "⚐", PLAY: "▸", STAR_DARK: "★", STAR_LIGHT: "⭒", }; const COLLISION = "collision";
const JUMP_TIMEOUT = -1; const JUMP_LENGTH = 3; const DELAY_LOOP = 210; const DELAY_INITIAL = 1000;
const MAPS = { 1: " ▖ ▖ ▘ ▖ ▖ ▘ ▖ ⚑", 2: " ▖ ▖ ▘ ▖ ▘ ▖ ▖ ▘ ▖ ▖ ▖ ▘ ▖ ▖ ▘ ▖ ⚑", 3: " ▖ ▖ ▘ ▖ ▖ ▘ ▖ ▖ ▖ ▘ ▖ ▖ ▘ ▖ ⚑", };
const GAME_URL = new URL(window.location.href); const MAP = GAME_URL.searchParams.get("map") in MAPS ? GAME_URL.searchParams.get("map") : 1; const DEBUG = !!GAME_URL.searchParams.get("debug") != undefined;
let map = loadMap(MAP); let jump = JUMP_TIMEOUT; let ticks = 0; let playing = false; let win = true;
const commands = { ArrowUp: () => { if (!playing) return commands.s(); if (jump <= JUMP_TIMEOUT) jump = JUMP_LENGTH; }, s: async () => { if (playing) return;
faviconize("", 0); loopGame();}, " ": () => commands.ArrowUp(), r: async () => { playing = false; await dotDotDot("Restarting"); location.reload(); }, m: async () => { playing = false; clearStorage(); await dotDotDot("Clearing"); location.reload(); }, };
document.addEventListener("keydown", (event) => { if (event.isComposing || event.keyCode === 229) { return; } log(event.key); if (event.key in commands) { event.preventDefault(); return commandsevent.key; } if (event.key in MAPS) { event.preventDefault(); return (location.href =
${location.origin}${location.pathname}?map=${event.key}); } });// todo: add onblur message and favicon
// main loopPreGame();
async function loopPreGame() { const welcomeMessage = MAP == 1 ? "Hit S to play!" :
MAP ${MAP};faviconize(MISC.PLAY, 102);
await sleep(DELAY_INITIAL); while (!playing) { render(
${MISC.FLAG_DARK} ${welcomeMessage}); await sleep(DELAY_LOOP); render(${MISC.FLAG_LIGHT} ${welcomeMessage}); await sleep(DELAY_LOOP); } }async function loopGame() { playing = true; while (playing && map.length > 0) { const character = getCharacter(jump, map[0]);
if (character == COLLISION) { faviconize(MISC.STAR_LIGHT, 101); render(CHARACTER.CRASH, map, `SCORE ${ticks}`); win = false; break; } map = map.slice(1, map.length); render(character, map); ticks++; if (jump > JUMP_TIMEOUT) jump--; await sleep(DELAY_LOOP); - Assistant
- User
- Assistant
- User
remove characters and add the original back. also adda endless mode with power ups and fun
- Assistant
- User
add 40 features to make this funf ull script
- Assistant
- User
add all the functions in there and a menu system to access all of this make the full script 1000 lines
- Assistant