mirror of
https://github.com/tiennm99/nntv.git
synced 2026-07-19 06:18:57 +00:00
Replace Phaser 3 game engine (~1MB) with Svelte 5 + Vite. Bundle size: 77KB JS (28KB gzip) vs ~1MB with Phaser. Architecture: - src/lib/game/ — Pure JS game logic (guards, grid, player, turns) - src/components/ — Svelte UI components (GameBoard, sprites, HUD) - src/scenes/ — Scene components with fade transitions - src/App.svelte — Scene router - CSS Grid for game board, CSS transitions for movement - svelte/transition for scene switching All game logic preserved: 12 levels, 4 guard types, turn system, detection, lives, progress persistence, bilingual localization, level 12 special mechanic. Removed: Phaser, terser, canvas rendering, physics engine, custom vite configs, log.js telemetry.
14 lines
355 B
HTML
14 lines
355 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Night Ninja: Twilight Voyage</title>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script type="module" src="./src/main.js"></script>
|
|
</body>
|
|
</html>
|