Game review

HTML5 Asteroids

4 / 10

Developer
Doug McInnes
Publisher
Doug McInnes (open source)
Released
1 January 2010
Platforms
Web browser (desktop and mobile)
Genre
Arcade / Shooter
Monetisation
Free, open source, no ads and no in-game purchases
Players
Single-player only

The short version

HTML5 Asteroids is a competent, faithful port of Atari's 1979 original built in plain canvas and jQuery, and on a keyboard it plays exactly the way you remember: thrust, rotate, fire, wrap around the screen, watch the rocks split. It is also, on every device that matters for a touchscreen shelf, completely unplayable. The on-screen thrust, turn, and fire buttons exist in the code, but they are wrapped in a check for the literal substring "iPad" in the browser's user agent — a gate that misses Android outright and increasingly misses real iPads too, since iPadOS has defaulted to a desktop-style user agent since 2019. Tapping the screen does nothing. There is no fallback. This is not a game with awkward touch controls; it is a game with no touch controls for almost anyone who would load it on a phone.

Biggest strengths

  • The core loop is a clean, accurate translation of Asteroids' physics — inertia carries through rotation, shots have a lifespan, rocks split into two smaller ones on a hit, and wraparound at the screen edges works exactly as it should
  • Zero console errors, zero failed requests, and zero third-party analytics across two full playtest passes
  • The vector-outline rendering and the bundled `vector_battle_regular` typeface reproduce the original's stroked-line look convincingly for a canvas rewrite

Biggest weaknesses

  • The on-screen touch buttons for thrust, turn, and fire only render and only bind their touch handlers when `navigator.userAgent.match(/iPad/i)` returns true — verified by reading `ipad.js` line by line, not inferred from a grep hit
  • Confirmed by playtesting on a simulated 390x844 touch phone — the standard emulation for this shelf's checks — the game loads, the canvas sits fixed at 780x540 regardless of viewport size, and tapping anywhere, including where the control buttons would be, produces no response at all; only the keyboard moved the ship
  • Even on an actual iPad, this check is unreliable in 2026: iPadOS has requested desktop sites by default since iPadOS 13 (2019), which reports as a Macintosh user agent, not one containing "iPad"

Who it's for: Desktop players who want an accurate, no-frills Asteroids clone with a keyboard handy

Our recommendation: Skip it on this shelf — the mobile build the code claims to have does not actually run on a modern phone

4 / 10

Doug McInnes built HTML5 Asteroids in 2010, in the narrow window when "does this even work in a browser" was still a legitimate question for canvas games, and it answers that question well: this is Atari's 1979 vector shooter reproduced with real inertial physics, real screen-wrap, and real fragmenting asteroids, running in plain JavaScript with jQuery for event handling and no build step. Judged purely as a keyboard game, it holds up. Judged as a candidate for a shelf whose entire premise is that Flash games finally get to work on a phone, it fails on the one thing that matters most.

The keyboard build is exactly what it claims to be

Arrow keys rotate and thrust, space fires, and game.js implements the physics the way the arcade original did: your ship carries momentum through a turn rather than snapping to a new heading, bullets have a fixed lifetime rather than travelling forever, and a large asteroid splits into two smaller ones when it takes a hit, exactly as it should. Playing it through a playtest.js desktop pass — repeated ArrowUp and Space presses — spawns the ship, applies visible thrust, and fires a bullet that appears on screen and travels independently of the ship. None of this is a surprise for a 2010 reference implementation that has been forked 335 times, but it means the fundamentals are solid: this is a real Asteroids clone, not a tech demo with a score counter.

The touch layer does not survive contact with a real phone

ipad.js is a 34-line file, and its entire content — showing the four on-screen buttons, sizing the canvas for a tablet, and binding touchstart/touchmove/touchend to the same KEY_STATUS object the keyboard handler writes to — sits inside a single if (ipad) block, where ipad is set once at the top of the file:

var ipad = navigator.userAgent.match(/iPad/i) != null;

If that regex does not match, the buttons never get their display: block, never bind a touch listener, and the canvas never gets resized off its default 780x540. Running the game through playtest.js on the shelf's standard phone profile (390x844, real touch emulation via CDP) confirms exactly that: the canvas loads at its fixed desktop size in the corner of the viewport, PRESS SPACE TO START renders correctly, and tapping the exact screen positions where the thrust, turn, and fire buttons would sit — because they never appeared — does nothing. Only the keyboard steps in the same script moved the ship. Zero console errors were thrown; the code simply never attempted to run the touch path at all, because Chromium's default user agent, on a real Android phone or an iPhone or a simulated touch device, does not contain "iPad."

The deeper problem is that this check would fail on a growing share of real iPads too. Apple changed iPadOS's default browser identification to a desktop Safari string back in iPadOS 13, in 2019 — a year after this repository's last substantial gameplay change — specifically so sites would stop serving iPads a cut-down mobile layout. An iPad running a default, unmodified Safari install today reports itself as a Macintosh, not something matching /iPad/i. This is not a niche edge case; it means the on-screen controls this code was written for are now unreachable on the exact device family they targeted, in addition to every device they never supported at all.

This shelf exists specifically because Flash's death broke phone access to an entire generation of games, and the fix is supposed to be "these have real touch controls now." A game with touch handlers that never activate on almost any real touch device is a harder failure than a game with clumsy touch handlers — Space Huggers, rejected earlier for this shelf, at least let a thumb aim and shoot even though it couldn't move or jump. HTML5 Asteroids lets a thumb do nothing.

Where that leaves the score

There's no case for padding this. The physics and the presentation are honestly good — visuals and gameplay both land in the middle of the scale on their own terms — but originality is essentially absent for an intentionally unmodified clone, and controls, the category this shelf weighs hardest, has to reflect that touch input does not function for the audience the section exists to serve. A 4.0 sits it firmly at "some worthwhile ideas, but major weaknesses dominate": the ideas are Atari's from 1979, faithfully carried over, and the major weakness is that nobody holding a phone can actually play it.

GitHub shows 355 stars and 335 forks on the canonical repository as of this writing, with the last commit in April 2024 and five open issues sitting unaddressed — a widely reused reference implementation, but not an actively maintained one, and not one that would be improved by Dave's team fixing the user-agent check on its behalf.

Pros and cons

Pros

  • The core loop is a clean, accurate translation of Asteroids' physics — inertia carries through rotation, shots have a lifespan, rocks split into two smaller ones on a hit, and wraparound at the screen edges works exactly as it should
  • Zero console errors, zero failed requests, and zero third-party analytics across two full playtest passes
  • The vector-outline rendering and the bundled `vector_battle_regular` typeface reproduce the original's stroked-line look convincingly for a canvas rewrite

Cons

  • The on-screen touch buttons for thrust, turn, and fire only render and only bind their touch handlers when `navigator.userAgent.match(/iPad/i)` returns true — verified by reading `ipad.js` line by line, not inferred from a grep hit
  • Confirmed by playtesting on a simulated 390x844 touch phone — the standard emulation for this shelf's checks — the game loads, the canvas sits fixed at 780x540 regardless of viewport size, and tapping anywhere, including where the control buttons would be, produces no response at all; only the keyboard moved the ship
  • Even on an actual iPad, this check is unreliable in 2026: iPadOS has requested desktop sites by default since iPadOS 13 (2019), which reports as a Macintosh user agent, not one containing "iPad"
  • The canvas has no responsive sizing of any kind — it is a fixed 780x540 element with no CSS media query and no resize handler, so it does not adapt to the viewport it is dropped into on any device
  • It is an unmodified clone of a 46-year-old design with no new mechanic, mode, or twist — the entire pitch is nostalgia for a game most browsers can already run through emulation
  • The GitHub repository has had no commits since April 2024 and its five open issues are unaddressed

Category scores

Category scores are the reviewer's read on each area. They inform the overall score but do not average into it — the number at the top of the page is a judgement, not a calculation.

  • Gameplay 6 / 10
  • Visuals 6 / 10
  • Performance 7.5 / 10
  • Originality 2.5 / 10
  • Replayability 4.5 / 10