Move player and NPC higher on screen for better vertical centering

This commit is contained in:
Justin Oros
2026-05-20 22:20:29 -07:00
parent 1975a5af99
commit 5dff27ae12
+3 -3
View File
@@ -405,7 +405,7 @@ class Game {
const bub = document.getElementById('player-bubble'); const bub = document.getElementById('player-bubble');
if (p) { if (p) {
const cx = viewW / 2 - 16; const cx = viewW / 2 - 16;
const bot = viewH * 0.35; const bot = viewH * 0.45;
p.style.left = cx + 'px'; p.style.left = cx + 'px';
p.style.bottom = bot + 'px'; p.style.bottom = bot + 'px';
p.className = `map-player walk-${dir}`; p.className = `map-player walk-${dir}`;
@@ -437,7 +437,7 @@ class Game {
_playerScreenOffset() { _playerScreenOffset() {
const {viewW, viewH} = this._getViewport(); const {viewW, viewH} = this._getViewport();
return { px: viewW / 2, py: viewH - (viewH * 0.35) - 32 }; return { px: viewW / 2, py: viewH - (viewH * 0.45) - 32 };
} }
_npcScreenDist() { _npcScreenDist() {
@@ -534,7 +534,7 @@ class Game {
const bub = document.getElementById('player-bubble'); const bub = document.getElementById('player-bubble');
if (p) { if (p) {
const cx = viewW / 2 - 16; const cx = viewW / 2 - 16;
const bot = viewH * 0.35; const bot = viewH * 0.45;
p.style.left = cx + 'px'; p.style.left = cx + 'px';
p.style.bottom = bot + 'px'; p.style.bottom = bot + 'px';
p.className = 'map-player idle'; p.className = 'map-player idle';