.
Skip to live previewA free addictive arcade game built with pure HTML5, CSS3, and vanilla JavaScript Canvas. Catch glowing stars ⭐ for points, dodge bombs 💀 to survive. Mouse, touch & keyboard controls. Zero libraries. Full source code — download free.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Catch the Star!</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="ui">
Score: <span id="s">0</span> | Lives: ❤️❤️❤️ <span id="l">3</span>
</div>
<canvas id="c"></canvas>
<div id="start">
<h1>Catch the Star!</h1>
<p style="font-size:24px">Mouse over canvas → basket follows!<br>
Touch/drag → basket follows!<br>← → A/D keys too!</p>
<button onclick="startGame()">PLAY ⭐</button>
</div>
<div id="over" style="display:none">
<h1 id="title">Game Over!</h1>
<p style="font-size:32px">Score: <span id="final">0</span></p>
<button onclick="startGame()">Play Again</button>
</div>
<script src="script.js"></script>
</body>
</html>
Everything about the game and its source code.
Click PLAY to start. Move the glowing basket using mouse (move over canvas), drag finger on touchscreen, or Arrow/A-D keyboard keys. Catch yellow stars ⭐ for +10 points each. Dodge skull bombs 💀 — each costs 1 life. You have 3 lives. Stars fall faster as your score rises. Game ends when all lives are gone.
Pure HTML5, CSS3, and vanilla JavaScript — zero external libraries or frameworks. Uses the HTML5 Canvas 2D API for all rendering, requestAnimationFrame for the game loop, and native browser event listeners for mouse, touch, and keyboard input. The canvas resizes responsively. Complete JavaScript is about 100 lines.
Yes. Click Download Project at the top of this page. You get a ZIP with separate HTML, CSS, and JavaScript files ready to open in any browser. No account or sign-up required. Coodeverse provides 540+ free downloadable coding projects — all free, no account needed.
Yes. Catch the Star is excellent for beginners and intermediate JavaScript developers. It teaches the HTML5 Canvas API, requestAnimationFrame game loops, mouse/touch/keyboard event handling, bounding-box collision detection, responsive canvas resizing, progressive difficulty, and game state management — all in clean readable code with no framework complexity.
Yes. Fully responsive on all devices. On mobile and tablet, drag your finger to move the basket. On desktop, use mouse or Arrow/WASD keys. The canvas auto-resizes to fit any screen. Works in all modern browsers including Chrome, Firefox, Safari, and Edge.
Coodeverse offers 540+ free downloadable HTML/CSS/JavaScript projects including arcade games, animations (Cosmos Star Animation, Particle Fireworks), UI components (Holographic Login, Neon Toggle Switch), and more. All free, no account needed. Browse at coodeverse.com/projects.
Free courses in Python, SQL, JavaScript, Kotlin, HTML, CSS, DSA. No account needed.