Phase 2: ECS foundation — world, components, systems, bridge
- 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>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Phaser from 'phaser';
|
||||
import { BootScene } from './scenes/BootScene';
|
||||
import { GameScene } from './scenes/GameScene';
|
||||
|
||||
export const GAME_WIDTH = 1280;
|
||||
export const GAME_HEIGHT = 720;
|
||||
@@ -10,7 +11,7 @@ export const gameConfig: Phaser.Types.Core.GameConfig = {
|
||||
height: GAME_HEIGHT,
|
||||
backgroundColor: '#0a0a0a',
|
||||
parent: document.body,
|
||||
scene: [BootScene],
|
||||
scene: [BootScene, GameScene],
|
||||
physics: {
|
||||
default: 'arcade',
|
||||
arcade: {
|
||||
|
||||
Reference in New Issue
Block a user