feat: big rooms with Isaac-style camera, extra-large and odd rooms

This commit is contained in:
Quintine committed 2026-08-11 08:51:43 +10:00
1 parent 5d5eb3d265
commit 063ace998f
8 files changed
+104 -21

No files matched your search

+6 -2
View File
@@ -298,8 +298,11 @@ function draw() {
if (G.mode === 'menu') { drawMenu(ctx); return; }
// world (with screen shake)
updateCamera();
// world (with camera + screen shake)
ctx.save();
ctx.translate(-G.cam.x, -G.cam.y);
if (G.shake > 0) ctx.translate(rand(-G.shake, G.shake) * 0.5, rand(-G.shake, G.shake) * 0.5);
drawRoom(ctx);
drawCorpses(ctx);
@@ -309,6 +312,7 @@ function draw() {
drawBullets(ctx);
drawParticles(ctx);
drawTelegraphs(ctx);
if (G.devMode) drawDebugOverlays(ctx);
ctx.restore();
if (G.atmosphereLayer) ctx.drawImage(G.atmosphereLayer, 0, 0);
@@ -340,7 +344,7 @@ function draw() {
else if (G.mode === 'pause') { drawPause(ctx); if (G.pauseHelp) drawPauseHelp(ctx); }
else if (G.mode === 'gameover') drawGameOver(ctx);
else if (G.mode === 'debug') drawDebug(ctx);
if (G.devMode) { drawDebugOverlays(ctx); if (G.debugPin && G.mode !== 'debug') drawDebugPin(ctx); }
if (G.devMode) { if (G.debugPin && G.mode !== 'debug') drawDebugPin(ctx); }
}
function drawMenu(ctx) {