export interface Vec2 {
    x: number;
    y: number;
}
export interface Vec3 {
    x: number;
    y: number;
    z: number;
}
export interface Rect {
    x: number;
    y: number;
    width: number;
    height: number;
}
export interface Color {
    r: number;
    g: number;
    b: number;
    a: number;
}
export type GameState = 'idle' | 'loading' | 'running' | 'paused' | 'menu' | 'gameover';
/** Unique entity identifier */
export type EntityId = number;
/** Component type tag */
export type ComponentType = string;
/**
 * Base component — all components extend this.
 * Every component records its entity owner and type.
 */
export interface Component {
    readonly type: ComponentType;
    entityId: EntityId;
    enabled: boolean;
}
/** Callback for system update */
export type UpdateFn = (dt: number) => void;
export type InputDevice = 'keyboard' | 'mouse' | 'gamepad' | 'touch';
export interface InputAction {
    name: string;
    pressed: boolean;
    justPressed: boolean;
    justReleased: boolean;
    value: number;
}
export type AudioChannel = 'master' | 'music' | 'sfx' | 'voice' | 'ui';
export interface SceneData {
    id: string;
    name: string;
    entities: SerializedEntity[];
    settings: Record<string, unknown>;
}
export interface SerializedEntity {
    id: EntityId;
    name: string;
    tags: string[];
    components: SerializedComponent[];
    children: EntityId[];
}
export interface SerializedComponent {
    type: ComponentType;
    data: Record<string, unknown>;
}
export interface GameProject {
    /** .ndg format version */
    formatVersion: number;
    name: string;
    version: string;
    author: string;
    description: string;
    settings: GameSettings;
    scenes: SceneData[];
    startSceneId: string;
    assets: AssetManifest;
}
export interface GameSettings {
    width: number;
    height: number;
    targetFps: number;
    maxPlayers: number;
    physics: PhysicsSettings;
    audio: AudioSettings;
    rendering: RenderingSettings;
}
export interface PhysicsSettings {
    gravity: Vec2;
    fixedTimestep: number;
    velocityIterations: number;
    positionIterations: number;
}
export interface AudioSettings {
    masterVolume: number;
    musicVolume: number;
    sfxVolume: number;
    voiceVolume: number;
}
export interface RenderingSettings {
    pixelPerfect: boolean;
    antiAlias: boolean;
    backgroundColor: Color;
}
export type AssetType = 'sprite' | 'spritesheet' | 'audio' | 'tilemap' | 'scene' | 'prefab' | 'script' | 'font';
export interface AssetEntry {
    id: string;
    name: string;
    type: AssetType;
    path: string;
    meta?: Record<string, unknown>;
}
export interface AssetManifest {
    assets: AssetEntry[];
}
export type GameEventType = string;
export interface GameEvent<T = unknown> {
    type: GameEventType;
    data: T;
    timestamp: number;
}
export type ScreenMode = 'shared' | 'split-horizontal' | 'split-vertical' | 'split-quad' | 'split-6' | 'split-9' | 'split-12';
export interface PlayerConfig {
    index: number;
    name: string;
    color: Color;
    inputDevice: InputDevice;
    gamepadIndex?: number;
}
export type DeepPartial<T> = {
    [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
export type Constructor<T = unknown> = new (...args: unknown[]) => T;
