summaryrefslogtreecommitdiff
path: root/2026/games_submissions/peetseater
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-08-26 23:47:59 -0400
committerLLLL Colonq <llll@colonq>2026-08-26 23:47:59 -0400
commit0d2d8cd897e94bd94e0b3ae7c6ce9aa580a44a0a (patch)
treee9039d1c3aedca515d6cb499451d4b73aca4f5fd /2026/games_submissions/peetseater
parent242943e5b023ce40eb3be826c418a478d4672f78 (diff)
Add a_tension_span
Diffstat (limited to '2026/games_submissions/peetseater')
-rw-r--r--2026/games_submissions/peetseater/MikuWantsPizza1.pngbin0 -> 28662 bytes
-rw-r--r--2026/games_submissions/peetseater/deliverit.mp3bin0 -> 13396 bytes
-rw-r--r--2026/games_submissions/peetseater/explosion.mp3bin0 -> 16761 bytes
-rw-r--r--2026/games_submissions/peetseater/failure.mp3bin0 -> 34524 bytes
-rw-r--r--2026/games_submissions/peetseater/harness.html31
-rw-r--r--2026/games_submissions/peetseater/index.html262
-rw-r--r--2026/games_submissions/peetseater/jump.mp3bin0 -> 16761 bytes
-rw-r--r--2026/games_submissions/peetseater/mikuscream.mp3bin0 -> 35464 bytes
-rw-r--r--2026/games_submissions/peetseater/pasta.mp3bin0 -> 8212 bytes
-rw-r--r--2026/games_submissions/peetseater/pizza.mp3bin0 -> 7060 bytes
-rw-r--r--2026/games_submissions/peetseater/pizza.pngbin0 -> 372042 bytes
-rw-r--r--2026/games_submissions/peetseater/weeee.mp3bin0 -> 41306 bytes
12 files changed, 293 insertions, 0 deletions
diff --git a/2026/games_submissions/peetseater/MikuWantsPizza1.png b/2026/games_submissions/peetseater/MikuWantsPizza1.png
new file mode 100644
index 0000000..c8ea1cb
--- /dev/null
+++ b/2026/games_submissions/peetseater/MikuWantsPizza1.png
Binary files differ
diff --git a/2026/games_submissions/peetseater/deliverit.mp3 b/2026/games_submissions/peetseater/deliverit.mp3
new file mode 100644
index 0000000..bc0a46b
--- /dev/null
+++ b/2026/games_submissions/peetseater/deliverit.mp3
Binary files differ
diff --git a/2026/games_submissions/peetseater/explosion.mp3 b/2026/games_submissions/peetseater/explosion.mp3
new file mode 100644
index 0000000..90ba5b5
--- /dev/null
+++ b/2026/games_submissions/peetseater/explosion.mp3
Binary files differ
diff --git a/2026/games_submissions/peetseater/failure.mp3 b/2026/games_submissions/peetseater/failure.mp3
new file mode 100644
index 0000000..b7f8661
--- /dev/null
+++ b/2026/games_submissions/peetseater/failure.mp3
Binary files differ
diff --git a/2026/games_submissions/peetseater/harness.html b/2026/games_submissions/peetseater/harness.html
new file mode 100644
index 0000000..be1eac3
--- /dev/null
+++ b/2026/games_submissions/peetseater/harness.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>LCOLONQ Game Jam 2026 Testing Harnass</title>
+</head>
+<body>
+ <iframe width="480px" height="320px" src="/games/micro2026/index.html" allow="*" sandbox="allow-scripts allow-same-origin"></iframe>
+ <button id="send_start">Send Start</button>
+ <label>Difficulty
+ <input id="difficulty" type="number" value="0" />
+ </label>
+ <p id="child-messages"><p>
+ <script>
+ const iframe = document.querySelector("iframe");
+ const difficulty = document.getElementById('difficulty');
+ iframe.onload = function() {
+ const start = document.getElementById("send_start");
+ start.onclick = () => {
+ iframe.contentWindow.postMessage({op: "start", difficulty: parseInt(difficulty.value,10)}, '*');
+ }
+ };
+
+ const childMessages = document.getElementById('child-messages');
+ window.addEventListener("message", (ev) => {
+ childMessages.textContent = childMessages.textContent + JSON.stringify(ev.data) + '\n';
+ });
+ </script>
+</body>
+</html> \ No newline at end of file
diff --git a/2026/games_submissions/peetseater/index.html b/2026/games_submissions/peetseater/index.html
new file mode 100644
index 0000000..2927992
--- /dev/null
+++ b/2026/games_submissions/peetseater/index.html
@@ -0,0 +1,262 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Microgame 2026</title>
+ <style>
+ html, body, canvas {
+ margin: 0;
+ padding: 0;
+ text-align: center;
+ }
+ canvas {
+ margin: 1px;
+ background-color: darkcyan;
+ min-width: 240px;
+ min-height: 160px;
+ width: 97%;
+ height: 97%;
+ image-rendering: pixelated;
+ }
+ </style>
+</head>
+<body>
+ <canvas id="game" width="240" height="160"></canvas>
+ <img
+ id="MikuWantsPizza"
+ src="MikuWantsPizza1.png"
+ style="display: none;"
+ />
+ <img
+ id="pizza"
+ src="pizza.png"
+ style="display: none; "
+ />
+ <script type="application/javascript">
+
+ // Click handling
+ const canvas = document.getElementById("game");
+ const miku_sprite = document.getElementById("MikuWantsPizza");
+ const pizza_sprite = document.getElementById("pizza");
+ const ctx = canvas.getContext("2d");
+ ctx.save();
+
+ // Audio assuming the iframe parent situation works out:
+ class Sound {
+ constructor(path) {
+ this.audio = new Audio(path);
+ this.canPlay = false;
+ const ref = this;
+ this.audio.addEventListener("canplaythrough", (event) => {
+ ref.canPlay = true;
+ });
+ }
+
+ play() {
+ if (this.canPlay) {
+ this.audio.muted = false;
+ this.audio.play();
+ }
+ }
+
+ mute() {
+ this.audio.muted = true;
+ }
+ }
+ const pizza_sound = new Sound('pizza.mp3');
+ const pasta_sound = new Sound('pasta.mp3');
+ const deliverit_sound = new Sound('deliverit.mp3');
+ const failure_sound = new Sound('failure.mp3');
+ const win_sound = new Sound('jump.mp3');
+ const mad_sound = new Sound('explosion.mp3');
+ const scream = new Sound('mikuscream.mp3');
+ const weeee = new Sound('weeee.mp3');
+ const frame_to_sound = {
+ 0: pizza_sound,
+ 1: pasta_sound,
+ 2: deliverit_sound,
+ 10: failure_sound,
+ 12: mad_sound,
+ 13: mad_sound,
+ 14: mad_sound,
+ 15: scream,
+ 7: win_sound,
+ 8: weeee,
+ };
+
+ const game_state = {
+ game_step: 0,
+ game_steps: [0, 1, 2, 3],
+ time_between_steps_ms: 2000,
+ delivery_attempt: false,
+ pizza_delivered: false,
+ play_ending: false,
+ ok_to_give: [2, 3],
+ win_frames: [4,5,6,7,8],
+ time_between_ending_frames_ms: 300,
+ fail_frames: [9, 10, 11, 12, 13, 14, 15],
+ state: 'idle',
+ difficulty: 0,
+ audio_played: false,
+ };
+
+ function reset_game_state() {
+ game_state.state = 'game';
+ game_state.game_step = 0;
+ game_state.delivery_attempt = false;
+ game_state.pizza_delivered = false;
+ game_state.play_ending = false;
+ game_state.audio_played = false;
+
+ const difficulty_selection = Math.floor(game_state.difficulty / 5);
+ switch (difficulty_selection) {
+ case 0: game_state.time_between_steps_ms = 2000; break;
+ case 1: game_state.time_between_steps_ms = 1800; break;
+ case 2: game_state.time_between_steps_ms = 1600; break;
+ case 3: game_state.time_between_steps_ms = 1400; break;
+ case 4: game_state.time_between_steps_ms = 1200; break;
+ case 5: game_state.time_between_steps_ms = 1000; break;
+ case 6: game_state.time_between_steps_ms = 800; break;
+ case 7: game_state.time_between_steps_ms = 600; break;
+ default:
+ game_state.time_between_steps_ms = 400;
+ break;
+ }
+ }
+
+ canvas.addEventListener('click', () => {
+ game_state.delivery_attempt = true;
+ });
+
+ // Actual game code.
+ let start;
+ const last_frame_win = game_state.win_frames[game_state.win_frames.length - 1];
+ const last_frame_fail = game_state.fail_frames[game_state.fail_frames.length - 1];
+ const last_frame_game = game_state.game_steps[game_state.game_steps.length - 1];
+ function game_loop(timestamp) {
+ if (!ctx) {
+ console.log('No canvas found?');
+ // you win, i'm not going to take a life from you
+ send_game_done(true);
+ return;
+ }
+
+ if (start === undefined) {
+ start = timestamp;
+ }
+ const elapsed = timestamp - start;
+
+ let idx = game_state.game_step;
+ if (elapsed > game_state.time_between_steps_ms) {
+ game_state.game_step += 1;
+ game_state.audio_played = false;
+ start = timestamp;
+ }
+
+ if (!game_state.audio_played) {
+ game_state.audio_played = true;
+ const sound = frame_to_sound[game_state.game_step];
+ if (sound) {
+ frame_to_sound[game_state.game_step - 1]?.mute();
+ sound.play();
+ }
+ }
+
+ switch (game_state.state) {
+ case 'game':
+ draw_pizza = true;
+
+ if (last_frame_game < game_state.game_step) {
+ // they failed due to time out
+ game_state.state = 'failed';
+ game_state.game_step = game_state.fail_frames[0];
+ game_state.pizza_delivered = false;
+ game_state.time_between_steps_ms = game_state.time_between_ending_frames_ms;
+ draw_pizza = false;
+ }
+
+ if (game_state.delivery_attempt) {
+ draw_pizza = false;
+ game_state.time_between_steps_ms = game_state.time_between_ending_frames_ms;
+ if (game_state.ok_to_give.includes(game_state.game_step)) {
+ game_state.pizza_delivered = true;
+ game_state.state = 'victory';
+ game_state.game_step = game_state.win_frames[0];
+ } else {
+ game_state.state = 'failed';
+ game_state.game_step = game_state.fail_frames[0];
+ }
+ }
+
+ break;
+ case 'failed':
+ if (last_frame_fail - 1 < game_state.game_step) {
+ game_state.time_between_steps_ms = 2000;
+ }
+ if (last_frame_fail < game_state.game_step) {
+ game_state.game_step = last_frame_fail;
+ send_game_done(false);
+ }
+ break;
+ case 'victory':
+ if (last_frame_win - 1 < game_state.game_step) {
+ game_state.time_between_steps_ms = 2000;
+ }
+ if (last_frame_win < game_state.game_step) {
+ game_state.game_step = last_frame_win;
+ send_game_done(true);
+ }
+ break;
+ case 'idle':
+ start = undefined;
+ return;
+ }
+
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ ctx.drawImage(miku_sprite, idx * 240, 0, 240, 160, 0, 0, 240, 160);
+ if (draw_pizza) {
+ ctx.drawImage(pizza_sprite, 0, 0, 700, 300, idx * 60, 130, 70, 30);
+ }
+ requestAnimationFrame(game_loop);
+ }
+
+
+ // CLONQ PROTOCOL AND BOOTSTRAP
+ function game_ready() {
+ window.parent.postMessage({op: "ready"});
+ }
+
+ function ack_start_event() {
+ reset_game_state();
+ window.parent.postMessage({op: "started", verb: "DELIVER"});
+ }
+
+ function is_game_start_event(event) {
+ return event?.op === 'start' && event?.difficulty > -1;
+ }
+
+ function send_game_done(player_won) {
+ window.parent.postMessage({op: "done", win: !!player_won});
+ reset_game_state();
+ game_state.state = 'idle';
+ }
+
+ function message_handler(event) {
+ if (is_game_start_event(event.data)) {
+ game_state.difficulty = event?.data?.difficulty || 0;
+ ack_start_event();
+ game_loop();
+ }
+ }
+
+ window.addEventListener("message", message_handler);
+ window.onload = function() {
+ game_ready();
+ };
+
+
+
+ </script>
+</body>
+</html> \ No newline at end of file
diff --git a/2026/games_submissions/peetseater/jump.mp3 b/2026/games_submissions/peetseater/jump.mp3
new file mode 100644
index 0000000..6c0510e
--- /dev/null
+++ b/2026/games_submissions/peetseater/jump.mp3
Binary files differ
diff --git a/2026/games_submissions/peetseater/mikuscream.mp3 b/2026/games_submissions/peetseater/mikuscream.mp3
new file mode 100644
index 0000000..efa9178
--- /dev/null
+++ b/2026/games_submissions/peetseater/mikuscream.mp3
Binary files differ
diff --git a/2026/games_submissions/peetseater/pasta.mp3 b/2026/games_submissions/peetseater/pasta.mp3
new file mode 100644
index 0000000..8967aae
--- /dev/null
+++ b/2026/games_submissions/peetseater/pasta.mp3
Binary files differ
diff --git a/2026/games_submissions/peetseater/pizza.mp3 b/2026/games_submissions/peetseater/pizza.mp3
new file mode 100644
index 0000000..be4c32a
--- /dev/null
+++ b/2026/games_submissions/peetseater/pizza.mp3
Binary files differ
diff --git a/2026/games_submissions/peetseater/pizza.png b/2026/games_submissions/peetseater/pizza.png
new file mode 100644
index 0000000..43569e0
--- /dev/null
+++ b/2026/games_submissions/peetseater/pizza.png
Binary files differ
diff --git a/2026/games_submissions/peetseater/weeee.mp3 b/2026/games_submissions/peetseater/weeee.mp3
new file mode 100644
index 0000000..022e30e
--- /dev/null
+++ b/2026/games_submissions/peetseater/weeee.mp3
Binary files differ