← All posts

How Star Collector works (for kids)

Sun Sep 06 2026 Β· threejs, tutorial

A Three.js game is just 3 things repeating:

  1. Scene β€” the world (lights, ground grid, camera).
  2. Things β€” ship (cone + wings), stars (spinning octahedrons), rocks (red icosahedrons).
  3. Loop β€” every frame: move ship, spin stars, check distances.
if (star.position.distanceTo(ship.position) < 1.1) {
  score += 10; // collect!
}

That’s the whole trick! Distance checks = collisions. Next we’ll learn about requestAnimationFrame and why we use dt (delta time) so the game runs the same speed on any computer.