Phase 0: Project setup for agent-driven development
- Phaser 3 + bitECS 0.4 + TypeScript + Vite stack - BootScene with title screen - 6 cursor rules (project context, agent workflow, ECS, chemistry, Phaser, data) - Vitest configured with happy-dom - GDD, engine analysis, implementation plan, progress tracking Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
29
src/config.ts
Normal file
29
src/config.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import Phaser from 'phaser';
|
||||
import { BootScene } from './scenes/BootScene';
|
||||
|
||||
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],
|
||||
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,
|
||||
},
|
||||
};
|
||||
4
src/main.ts
Normal file
4
src/main.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import Phaser from 'phaser';
|
||||
import { gameConfig } from './config';
|
||||
|
||||
new Phaser.Game(gameConfig);
|
||||
58
src/scenes/BootScene.ts
Normal file
58
src/scenes/BootScene.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import Phaser from 'phaser';
|
||||
|
||||
export class BootScene extends Phaser.Scene {
|
||||
constructor() {
|
||||
super({ key: 'BootScene' });
|
||||
}
|
||||
|
||||
create(): void {
|
||||
const cx = this.cameras.main.centerX;
|
||||
const cy = this.cameras.main.centerY;
|
||||
|
||||
// Title
|
||||
this.add
|
||||
.text(cx, cy - 40, 'СИНТЕЗ', {
|
||||
fontSize: '64px',
|
||||
color: '#00ff88',
|
||||
fontFamily: 'monospace',
|
||||
fontStyle: 'bold',
|
||||
})
|
||||
.setOrigin(0.5);
|
||||
|
||||
// Subtitle
|
||||
this.add
|
||||
.text(cx, cy + 30, 'Наука — это магия, которая работает', {
|
||||
fontSize: '16px',
|
||||
color: '#557755',
|
||||
fontFamily: 'monospace',
|
||||
})
|
||||
.setOrigin(0.5);
|
||||
|
||||
// Version
|
||||
this.add
|
||||
.text(cx, cy + 80, 'v0.1.0 — Phase 0: Project Setup', {
|
||||
fontSize: '12px',
|
||||
color: '#333333',
|
||||
fontFamily: 'monospace',
|
||||
})
|
||||
.setOrigin(0.5);
|
||||
|
||||
// Pulsing indicator
|
||||
const dot = this.add
|
||||
.text(cx, cy + 120, '◉', {
|
||||
fontSize: '24px',
|
||||
color: '#00ff88',
|
||||
fontFamily: 'monospace',
|
||||
})
|
||||
.setOrigin(0.5);
|
||||
|
||||
this.tweens.add({
|
||||
targets: dot,
|
||||
alpha: 0.2,
|
||||
duration: 1500,
|
||||
yoyo: true,
|
||||
repeat: -1,
|
||||
ease: 'Sine.easeInOut',
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user