- 19 TypeScript modules under src/ (constants, entities, room, game, render) - Canvas 2D rendering with dark fantasy palette - Room-based navigation, random 7x7 map generation - Two combat modes: ranged (pistol) and melee (knife) - Wall collision with door opening support - Minimap, HP bar, enemy AI - Bun build pipeline: src/main.ts -> dist/main.js + dist/index.html
16 lines
509 B
HTML
16 lines
509 B
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Dungeon Crawl — Ranged / Melee</title>
|
|
<style>
|
|
*{margin:0;padding:0;box-sizing:border-box}
|
|
body{background:#0a0a0a;display:flex;justify-content:center;align-items:center;height:100vh;font-family:monospace;overflow:hidden;user-select:none}
|
|
canvas{display:block;border:1px solid #222;border-radius:2px;cursor:none}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas id="game" width="880" height="660"></canvas>
|
|
<script src="main.js"></script>
|
|
</body>
|
|
</html> |