about summary refs log tree commit diff stats
path: root/html/rogue/js/rogue.js
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-12-24 15:58:33 -0500
committerelioat <elioat@tilde.institute>2024-12-24 15:58:33 -0500
commit645c988da93b92dcddda87a314f64cd1b5ae1cd7 (patch)
tree8016ffb3f0cef32a397c73d16d518f475a8e3d2d /html/rogue/js/rogue.js
parent8d4ebce0ef9eb7495e2b27a9a4df5f6001f7e65f (diff)
downloadtour-645c988da93b92dcddda87a314f64cd1b5ae1cd7.tar.gz
*
Diffstat (limited to 'html/rogue/js/rogue.js')
-rw-r--r--html/rogue/js/rogue.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/html/rogue/js/rogue.js b/html/rogue/js/rogue.js
index 75a4c86..64716a4 100644
--- a/html/rogue/js/rogue.js
+++ b/html/rogue/js/rogue.js
@@ -22,10 +22,14 @@ const initGame = () => {
     window.addEventListener('resize', resizeCanvas);
     resizeCanvas();
 
+    // Calculate initial player position at ground level
+    const groundY = canvas.height - CONFIG.world.groundHeight;
+    const initialPlayerY = groundY - CONFIG.player.height;
+
     // Game state
     let gameState = {
         time: 0,
-        player: createPlayer(100, 100),
+        player: createPlayer(100, initialPlayerY),
         camera: createCamera(0, 0),
         world: createWorld(),
         debug: {