about summary refs log tree commit diff stats
path: root/js/mountain
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-07-06 15:17:34 -0400
committerelioat <elioat@tilde.institute>2024-07-06 15:17:34 -0400
commit082b90451a7637bcf2c34d59f58bb0b3d2ed57d7 (patch)
treee6564d4abbe8a0bcef2963eb4ce50010511492b6 /js/mountain
parentc8dab2d52ec65d636e23894f7bab66264d1bc9d7 (diff)
downloadtour-082b90451a7637bcf2c34d59f58bb0b3d2ed57d7.tar.gz
*
Diffstat (limited to 'js/mountain')
-rw-r--r--js/mountain/game.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/js/mountain/game.js b/js/mountain/game.js
index 5601d94..1b4d96e 100644
--- a/js/mountain/game.js
+++ b/js/mountain/game.js
@@ -6,14 +6,23 @@ const ctx = canvas.getContext('2d');
 canvas.width = 800;
 canvas.height = 600;
 
-const GRAVITY = 0.5;
-const JUMP_STRENGTH = -12;
-const MOVE_SPEED = 5;
+const GRAVITY = 4;
+const JUMP_STRENGTH = -33;
+const MOVE_SPEED = 7;
 
 let keys = { left: false, right: false, up: false, down: false, space: false };
 
 let levels = [
     [
+        // Next level example
+        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+        [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5],
+        [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+    ],
+    [
         [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5],
         [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
         [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
@@ -34,11 +43,6 @@ let levels = [
         [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
         [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
         [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
-    ],
-    [
-        // Next level example
-        [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5],
-        [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
     ]
     // Add more levels as needed
 ];