- bitECS world with time tracking (delta, elapsed, tick) - 5 components: Position, Velocity, SpriteRef, Health, ChemicalComposition - Movement system (velocity * delta) + bounce system (boundary reflection) - Health system with damage, healing, death detection - Entity factory (createGameEntity/removeGameEntity) - Phaser bridge: polling sync creates/destroys/updates circle sprites - GameScene: 20 colored circles bouncing at 60fps - BootScene: click-to-start transition, version bump to v0.2.0 - 39 ECS unit tests passing (74 total) Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
663 B
TypeScript
31 lines
663 B
TypeScript
import Phaser from 'phaser';
|
|
import { BootScene } from './scenes/BootScene';
|
|
import { GameScene } from './scenes/GameScene';
|
|
|
|
export const GAME_WIDTH = 1280;
|
|
export const GAME_HEIGHT = 720;
|
|
|
|
export const gameConfig: Phaser.Types.Core.GameConfig = {
|
|
type: Phaser.AUTO,
|
|
width: GAME_WIDTH,
|
|
height: GAME_HEIGHT,
|
|
backgroundColor: '#0a0a0a',
|
|
parent: document.body,
|
|
scene: [BootScene, GameScene],
|
|
physics: {
|
|
default: 'arcade',
|
|
arcade: {
|
|
gravity: { x: 0, y: 0 },
|
|
debug: false,
|
|
},
|
|
},
|
|
scale: {
|
|
mode: Phaser.Scale.FIT,
|
|
autoCenter: Phaser.Scale.CENTER_BOTH,
|
|
},
|
|
render: {
|
|
pixelArt: true,
|
|
antialias: false,
|
|
},
|
|
};
|