cloud-game/static/index_ws.html
2019-04-25 02:18:32 +08:00

80 lines
1.9 KiB
HTML
Vendored

<html>
<style>
textarea {
width: 60%;
height: 50px;
}
</style>
<select id="gameOp">
</select>
<button id="play" onclick="window.startGame()">Play</button>
<button id="play" onclick="pc.close()">Stop</button>
Your current room: <b><label id="currentRoomID" style="color:blue"></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">
</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 (A) <br />
X to (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>
<!-- https://rawgit.com/Rillke/opus.js-sample/master/index.xhtml -->
<script src="/static/js/libopus.js"></script>
<script src="/static/js/opus.js"></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;
});
gameIdx = 1;
</script>
</html>