AYOUB.*[ARCADE]

Moon Patrol

Score0
Best0
Lives3

ENGINE SPECIFICATION // ARCHITECTURAL GUIDE

How to play Moon Patrol

Controls for Moon Patrol
KeysAction
← → / A DSteer
↑ / W / SpaceJump
↓ / SFire
Click / TapJump, fire on release
PPause

On phones and tablets, use the on-screen tactile D-pad under the viewport.

About Moon Patrol

Moon Patrol is a side-scrolling driving game. Craters, rocks, ground enemies and UFOs scroll toward your lunar rover from the right. You can shift the rover left or right, jump and fire a blaster. You have three lives: running into a rock, an enemy or a UFO costs one, and the run ends when none are left.

Obstacles are generated at random just past the right edge, roughly 90 to 120 units apart: about 45% craters, 25% rocks, 15% ground enemies and 15% UFOs flying higher up. The scroll speed is fixed, so the challenge comes from the mix and spacing of obstacles rather than from acceleration.

Scoring, levels and tips

  • Every shot fired adds 1 point. Shooting a rock or a ground enemy scores 10, and a UFO scores 110.
  • Craters don't cost a life in this version. Passing just above one during a jump adds 5 points.
  • A crash costs a life, puts the rover back at its start position and gives about one second of protection.
  • A run ends when all three lives are gone. Your best score is saved in this browser.
  • The blaster has a cooldown of about 0.13 seconds, and each shot travels roughly three quarters of the screen in the direction the rover last moved.
  • Tip: shots fly level from the height the rover was at when you fired, so fire mid-jump to reach higher targets such as UFOs.
  • Tip: moving also turns the rover. If you last moved left, tap right before firing at something ahead.
  • Tip: every shot is worth a point even when it misses, so keep firing.

How it's built

The game is written from scratch in TypeScript on an HTML canvas, with no game framework. The simulation lives in its own module with no DOM code, and a small shared engine steps it at a fixed 60 updates per second and pauses it when you switch tabs. Collisions are axis-aligned box overlap tests, the lunar skyline is a sine-wave line, and sound effects are synthesized with the Web Audio API. On phones you can use the on-screen buttons, drag to move, or swipe up to jump and down to fire. Touching the game jumps on press and fires on release.

This is an unofficial tribute written from scratch for the browser. It is not affiliated with or endorsed by the owners of the original game.