Asteroids Arcade Game
About this app
A fun and interactive web version of the classic arcade game Asteroids. Players can navigate a spaceship, dodge and shoot asteroids, and score points. Designed to be playable on both web and mobile browsers.
Asteroids Game ◀ ▶ ▲ 💥
Put this on your site
Source
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Asteroids Game</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<canvas id="gameCanvas" ontouchstart="event.preventDefault()"></canvas>
<div id="mobileControls">
<button id="leftBtn" class="control-btn">◀</button> <!-- Left arrow icon -->
<button id="rightBtn" class="control-btn">▶</button> <!-- Right arrow icon -->
<button id="thrustBtn" class="control-btn">▲</button> <!-- Up arrow icon -->
<button id="fireBtn" class="control-btn">💥</button> <!-- Fire icon (represented by a collision symbol) -->
</div>
<script type="module">
import Game from './Game.js';
window.addEventListener('DOMContentLoaded', (event) => {
const canvas = document.getElementById('gameCanvas');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const game = new Game(canvas);
game.init();
});
</script>
</body>
</html>
NEW APPS
These are apps made by the community!