Join MDN and developers like you at Mozilla's View Source conference, November 2-4 in Portland, Oregon. Learn more at


by 2 contributors:

Webfighter is an R-Type- and Tyrian-inspired game where you must hunt down an alien bug and destroy it, pick up new weapons as you go along, and get the high score!

View on the Firefox Marketplace.
Read the full developer walkthrough.

Difficulty: Medium

Code Breakdown:

  • 2% HTML
  • 6% CSS
  • 92% JavaScript


Web API Usage

Used to generate the game graphics.
Allows the game to be played in fullscreen mode.
In-app Payments
The player can purchase items in a store that will aid their quest. This shows the workflow for in-app payments.

Note: If you view this app on the Firefox Marketplace, you may be told that you can't view it because this app is not available for your region. This is due to the in-app payments, and the fact that payments are not enabled in many countries yet. If you set your region to Spain, for example, you will see the app. The in-app payments only work on Firefox OS, and do NOT actually charge you anything. They are just examples, to show how to implement in-app payments.


Document Tags and Contributors

Contributors to this page: cvan, chrisdavidmills
Last updated by: cvan,