import Phaser from 'phaser'; import { MenuScene } from './scenes/MenuScene.js'; import { BootScene } from './scenes/BootScene.js'; import { GameScene } from './scenes/GameScene.js'; import { HudScene } from './scenes/HudScene.js'; /** On-screen canvas size. The raycast view is rendered internally at * RENDER_WIDTH x RENDER_HEIGHT (currently 1:1 with this) and drawn into this * space; the HUD is layered on top. Lower the RENDER_* constants for a * chunkier retro look — this display size stays the same. */ export const GAME_WIDTH = 960; export const GAME_HEIGHT = 600; const config = { type: Phaser.AUTO, parent: 'game', width: GAME_WIDTH, height: GAME_HEIGHT, backgroundColor: '#000000', pixelArt: true, // nearest-neighbor upscaling of the view texture scale: { mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_BOTH, }, scene: [MenuScene, BootScene, GameScene, HudScene], }; // Exposed for debugging / automated smoke tests. window.game = new Phaser.Game(config);