summaryrefslogtreecommitdiff
path: root/2026/games_submissions/crm148/game.js
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-08-18 00:08:28 -0400
committerLLLL Colonq <llll@colonq>2026-08-18 00:08:28 -0400
commit32a62cfcb925225359a5c90761b795f2f737ebd2 (patch)
tree95c2261964803b19f2d39cb35d8d514ed6e5a6f4 /2026/games_submissions/crm148/game.js
parentde99c5f7636a952025ea13de02bafd25bcb6bdec (diff)
Re-populate games
Diffstat (limited to '2026/games_submissions/crm148/game.js')
-rw-r--r--2026/games_submissions/crm148/game.js101
1 files changed, 0 insertions, 101 deletions
diff --git a/2026/games_submissions/crm148/game.js b/2026/games_submissions/crm148/game.js
deleted file mode 100644
index 00f1cc6..0000000
--- a/2026/games_submissions/crm148/game.js
+++ /dev/null
@@ -1,101 +0,0 @@
-
-import { View, globalView } from './view.js';
-import { getCosmos } from './cosmos.js';
-import Vec2 from './vec2.js';
-
-import { victory, death, initInput, getDebugInfo } from './control.js';
-
-startButton.onclick = function (ev) {
- window.postMessage({op:"start", difficulty: 1});
-}
-
-plusButton.onclick = function(ev) {
- window.testAngle += 0.1;
-}
-
-minusButton.onclick = function(ev) {
- window.testAngle -= 0.1;
-}
-
-testButton.onclick = function (ev) {
- if (!cosmos) {
- cosmos = getCosmos();
- cosmos.init(1);
- initInput(cosmos);
- }
-
- cosmos.running = false;
- cosmos.player.state = 'start_testing';
-
- cosmos.pulses = [
- new Pulse(Math.PI / 4, Math.PI, 70, 0, 30),
- ];
-
- cosmos.update(0);
- cosmos.render();
-
- // if (!cosmos.running) {
- // if (lasttime === undefined) {
- // render(0);
- // lasttime = undefined;
- // starttime = undefined;
- // } else {
- // render(lasttime);
- // }
- // }
-}
-
-var cosmos;
-
-function start(difficulty) {
- cosmos = getCosmos();
- cosmos.init(difficulty);
- initInput(cosmos);
-
- window.requestAnimationFrame(render);
- // TODO: set up mouse input listener, remove it on game over
- window.parent.postMessage({op: "started", verb: "dodge!"});
-}
-
-// input - mouse click
-// point the ship and thrust
-// add particle (time, position, velocity)
-// expire the particles - maybe wait until all of them are over time limit so
-// new ones keep the old ones alive
-// fade to black and keep it there
-// smoke on the grey background of space
-
-// TODO: game is over after some amount of energy (increases with difficulty) is
-// expelled from the star
-function nop() {
- ;
-}
-
-var starttime;
-var lasttime;
-// var start = startGame;
-
-function render(timestamp) {
- if (starttime === undefined) {
- starttime = timestamp;
- lasttime = starttime;
- } else {
- nop();
- }
- // const elapsed = timestamp - starttime;
- const dt = (timestamp - lasttime) / 1000.0;
- cosmos.update(dt);
- cosmos.render();
- lasttime = timestamp;
- if (cosmos.running) {
- window.requestAnimationFrame(render);
- } else {
- // console.log('over');
- }
-}
-
-
-export {
- start,
-}
-