diff --git a/games/Grass-Run.js b/games/Grass-Run.js new file mode 100644 index 0000000000..5b49ed7999 --- /dev/null +++ b/games/Grass-Run.js @@ -0,0 +1,71 @@ +/*@title: Grass Run +@description: Help the player run through a grassy field +@tags: [game, grass, running] +@addedOn: 2024-00-00 +*/ + +const player = "p" + +setLegend( + [ player, bitmap` +................ +................ +.......000...... +.......0.0...... +......0..0...... +......0...0.0... +....0003.30.0... +....0.0...000... +....0.05550..... +......0...0..... +.....0....0..... +.....0...0...... +......000....... +......0.0....... +.....00.00...... +................` ] +) + +setSolids([]) + +let level = 0 +const levels = [ + map` +................. +................. +................. +................. +................. +................. +................. +................. +................. +................. +................. +................. +................. +................. +................. +.................` // Grass field level +] + +setMap(levels[level]) + +setPushables({ + [ player ]: [] +}) + +onInput("s", () => { + getFirst(player).y += 1 +}) + +onInput("w", () => { + getFirst(player).y -= 1 +}) + +onInput("a", () => { + getFirst(player).x -= 1 +}) + +onInput("d", () => { + getFirst(player).x += 1 \ No newline at end of file