Major rewrite, better organization with split up files. Need to redo/make hitbox detection for entities. Also now using request animation instead of set interval. Need to update platform detection to match entire platform top to bottom instead of just the top

This commit is contained in:
rain
2023-11-15 01:48:21 -06:00
parent c28a0cb87f
commit 839d6c2c20
10 changed files with 461 additions and 516 deletions
+21 -19
View File
@@ -5,33 +5,35 @@
<link rel="icon" type="image/png" href="img/pip.png">
<link rel="stylesheet" href="css/game.css">
</head>
<body onload="startGame()">
<body>
<h1>The Spooky Adventures of Pip</h1>
<div id="game">
<script type="text/javascript" src="js/game.js"></script>
<div id="game-container">
<canvas id="game"></canvas>
</div>
<!--<button id="start" onclick="startGame();">Restart Game</button>-->
<img class="sprite" id="exclaimation" src="img/exclaimation.png">
<div class="sprites">
<img id="exclaimation" src="img/exclaimation.png">
<img class="sprite" id="heart" src="img/heart.png">
<img class="sprite" id="player" src="img/pip.png">
<img class="sprite" id="down_player" src="img/pip_down.png">
<img class="sprite" id="up_player" src="img/pip_up.png">
<img class="sprite" id="right_player" src="img/pip_right.png">
<img class="sprite" id="left_player" src="img/pip_left.png">
<img id="heart" src="img/heart.png">
<img id="player" src="img/pip.png">
<img id="down_player" src="img/pip_down.png">
<img id="up_player" src="img/pip_up.png">
<img id="right_player" src="img/pip_right.png">
<img id="left_player" src="img/pip_left.png">
<img class="sprite" id="ghost" src="img/ghost.png">
<img class="sprite" id="down_ghost" src="img/ghost_down.png">
<img class="sprite" id="up_ghost" src="img/ghost_up.png">
<img class="sprite" id="right_ghost" src="img/ghost_right.png">
<img class="sprite" id="left_ghost" src="img/ghost_left.png">
<img id="ghost" src="img/ghost.png">
<img id="down_ghost" src="img/ghost_down.png">
<img id="up_ghost" src="img/ghost_up.png">
<img id="right_ghost" src="img/ghost_right.png">
<img id="left_ghost" src="img/ghost_left.png">
<img class="sprite" id="right_zombie" src="img/zombie_right.png">
<img class="sprite" id="left_zombie" src="img/zombie_left.png">
<img id="right_zombie" src="img/zombie_right.png">
<img id="left_zombie" src="img/zombie_left.png">
<img class="sprite" id="mushroom01" src="img/mushroom-01.png">
<img id="mushroom01" src="img/mushroom-01.png">
</div>
<script type="module" src="js/game.js"></script>
</body>
</html>