Add platform-specific implementations for assets, audio, WebSocket, and rendering on Desktop and WebAssembly platforms. Introduce embedded assets for WebAssembly and native file handling for Desktop. Add platform-specific chunk loading and game state synchronization.
This commit is contained in:
147
cmd/client/web/index.html
Normal file
147
cmd/client/web/index.html
Normal file
@@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>Escape From Teacher</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<button id="mute-btn" onclick="toggleAudio()">🔊</button>
|
||||
|
||||
<div id="rotate-overlay">
|
||||
<div class="icon">📱↻</div>
|
||||
<p>Bitte Gerät drehen!</p>
|
||||
<small>Querformat benötigt</small>
|
||||
</div>
|
||||
|
||||
<div id="game-container">
|
||||
<!-- MAIN MENU -->
|
||||
<div id="menu" class="overlay-screen">
|
||||
<div id="startScreen">
|
||||
<div class="start-left">
|
||||
<h1>ESCAPE FROM<br>TEACHER</h1>
|
||||
|
||||
<p style="font-size: 12px; color: #aaa;">Dein Rekord: <span id="localHighscore" style="color:yellow">0</span></p>
|
||||
|
||||
<input type="text" id="playerName" placeholder="NAME (4 ZEICHEN)" maxlength="15" style="text-transform:uppercase;">
|
||||
|
||||
<button id="startBtn" onclick="startSoloGame()">SOLO STARTEN</button>
|
||||
<button id="coopBtn" onclick="showCoopMenu()">CO-OP SPIELEN</button>
|
||||
|
||||
<div class="info-box">
|
||||
<div class="info-title">SCHUL-NEWS</div>
|
||||
<p>
|
||||
• Der Lehrer ist hinter dir her!<br>
|
||||
• Spring über Hindernisse.<br>
|
||||
• Sammle Power-Ups für Vorteile!
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="info-box">
|
||||
<div class="info-title">STEUERUNG</div>
|
||||
<p>
|
||||
PC: <strong>Leertaste</strong> (Springen), <strong>WASD/Pfeile</strong> (Bewegen)<br>
|
||||
Handy: <strong>Bildschirm-Buttons</strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="legal-bar">
|
||||
<button class="legal-btn" onclick="showLeaderboard()">🏆 TOP 10</button>
|
||||
<button class="legal-btn" onclick="showSettings()">⚙️ EINSTELLUNGEN</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="start-right">
|
||||
<div class="hall-of-fame-box">
|
||||
<h3>🏆 TOP SCHÜLER</h3>
|
||||
<div id="startLeaderboardList">Lade...</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CO-OP MENU -->
|
||||
<div id="coopMenu" class="overlay-screen hidden">
|
||||
<div class="center-box">
|
||||
<h1>CO-OP MODUS</h1>
|
||||
|
||||
<button class="big-btn" onclick="createRoom()">RAUM ERSTELLEN</button>
|
||||
|
||||
<div style="margin: 20px 0;">- ODER -</div>
|
||||
|
||||
<input type="text" id="joinRoomCode" placeholder="RAUM-CODE" maxlength="6" style="text-transform:uppercase;">
|
||||
<input type="text" id="teamNameJoin" placeholder="TEAM-NAME" maxlength="15">
|
||||
<button onclick="joinRoom()">RAUM BEITRETEN</button>
|
||||
|
||||
<button class="back-btn" onclick="showMainMenu()">← ZURÜCK</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SETTINGS MENU -->
|
||||
<div id="settingsMenu" class="overlay-screen hidden">
|
||||
<div class="center-box">
|
||||
<h1>EINSTELLUNGEN</h1>
|
||||
|
||||
<div class="settings-group">
|
||||
<div class="setting-item">
|
||||
<label>MUSIK LAUTSTÄRKE:</label>
|
||||
<input type="range" id="musicVolume" min="0" max="100" value="70">
|
||||
<span id="musicValue">70%</span>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<label>SFX LAUTSTÄRKE:</label>
|
||||
<input type="range" id="sfxVolume" min="0" max="100" value="70">
|
||||
<span id="sfxValue">70%</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="back-btn" onclick="showMainMenu()">← ZURÜCK</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LEADERBOARD MENU -->
|
||||
<div id="leaderboardMenu" class="overlay-screen hidden">
|
||||
<div class="center-box">
|
||||
<h1>🏆 TOP 10 LEADERBOARD</h1>
|
||||
|
||||
<div id="leaderboardList" class="leaderboard-box">
|
||||
Lade Leaderboard...
|
||||
</div>
|
||||
|
||||
<button class="back-btn" onclick="showMainMenu()">← ZURÜCK</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- GAME OVER SCREEN -->
|
||||
<div id="gameOverScreen" class="overlay-screen hidden">
|
||||
<div class="center-box">
|
||||
<h1>ERWISCHT!</h1>
|
||||
|
||||
<p style="font-size: 18px; margin: 20px 0;">
|
||||
Dein Score: <span id="finalScore" style="color:yellow; font-size: 24px;">0</span>
|
||||
</p>
|
||||
|
||||
<div id="leaderboardList" class="leaderboard-box" style="margin: 20px 0;">
|
||||
Lade Leaderboard...
|
||||
</div>
|
||||
|
||||
<button class="big-btn" onclick="location.reload()" style="background: #ff4444; margin-top: 20px;">NOCHMAL SPIELEN</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LOADING SCREEN -->
|
||||
<div id="loading" class="loading-screen">
|
||||
<div class="spinner"></div>
|
||||
<p>Lade Escape From Teacher...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- WASM Execution -->
|
||||
<script src="wasm_exec.js"></script>
|
||||
<script src="game.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user