mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-22 09:37:09 +00:00
73 lines
1.7 KiB
HTML
Vendored
73 lines
1.7 KiB
HTML
Vendored
<html>
|
|
|
|
<style>
|
|
textarea {
|
|
width: 60%;
|
|
height: 50px;
|
|
}
|
|
</style>
|
|
|
|
<select id="gameOp">
|
|
</select>
|
|
|
|
<button id="play" onclick="window.startGame()">Play</button><br/><br/>
|
|
Your current room: <b><label id="currentRoomID" style="color:white"></b> <br />
|
|
You can join a remote game by roomID.<br />
|
|
Room ID: <input type="text" id="roomID">
|
|
Play as player(1,2): <select id="playerIndex">
|
|
<option value="1">1</option>
|
|
<option value="2">2</option>
|
|
</select>
|
|
|
|
<br/><br/>
|
|
|
|
<body scroll="no" style="overflow: hidden">
|
|
<div id="remoteVideos">
|
|
<video id="game-screen" autoplay=true width=400 height=300 poster="https://orig00.deviantart.net/cdcd/f/2017/276/a/a/october_2nd___gameboy_poltergeist_by_wanyo-dbpdmnd.gif" style="display: none">
|
|
</div> <br />
|
|
|
|
<h3>Instruction</h3>
|
|
<div>
|
|
C is start button. Use it to start game<br />
|
|
V is select button <br />
|
|
|
|
Player 1
|
|
Use Up, Down, Left, Right to Move <br />
|
|
Z to jump (A) <br />
|
|
X to sprint (B) <br />
|
|
S to save <br />
|
|
L to load <br />
|
|
<!--Fullscreen media for better gaming experience<br /-->
|
|
</div><br>
|
|
|
|
<h3>Log:</h3>
|
|
<pre id="div"></pre>
|
|
|
|
<div>
|
|
🎮<u><i>Refresh to retry when checking is too long</i></u>
|
|
</div>
|
|
|
|
<script>
|
|
DEBUG = true;
|
|
</script>
|
|
|
|
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
|
<script src="/static/js/const.js"></script>
|
|
<script src="/static/js/global.js"></script>
|
|
<script src="/static/js/gameboy_controller.js"></script>
|
|
<script src="/static/js/ws.js"></script>
|
|
|
|
<script>
|
|
GAME_LIST.forEach(e => {
|
|
ee = document.createElement("option");
|
|
ee.value = e.nes;
|
|
ee.innerHTML = e.name;
|
|
gameOp.append(ee);
|
|
});
|
|
|
|
$("#gameOp").on("change", function() {
|
|
gameIdx = gameOp.selectedIndex;
|
|
});
|
|
</script>
|
|
|
|
</html>
|