threejs-test/src/main.js
Juan Sebastian Montoya 7dd7477a3b feat: implement ECS architecture with game entity management
- Introduced a new Entity-Component-System (ECS) architecture for the game.
- Created foundational components such as Transform, Velocity, Health, and Collidable.
- Developed systems for handling input, movement, collision detection, and rendering.
- Added game logic for player control, coin collection, and obstacle interactions.
- Implemented a performance monitor for real-time metrics display.
- Enhanced game initialization and entity creation processes.

This update significantly refactors the game structure, improving maintainability and scalability.
2025-11-26 15:38:11 -05:00

18 lines
541 B
JavaScript

import { Game } from './game/Game.js';
// Start the game immediately (script is at end of body, DOM is ready)
console.log('Starting 3D Coin Collector Game with ECS Architecture');
console.log('Press "T" to toggle performance monitor (or shake device on mobile)');
// Wait a tick to ensure everything is loaded
setTimeout(() => {
try {
const game = new Game();
// Make game accessible from console for debugging
window.game = game;
} catch (error) {
console.error('Game initialization failed:', error);
}
}, 0);