14 KiB
| title | chunk | source | category | tags | date_saved | instance |
|---|---|---|---|---|---|---|
| Introduction to game development for the Web - Game development | MDN | 2/2 | https://developer.mozilla.org/en-US/docs/Games/Introduction | reference | web, html, css, javascript, documentation | 2026-05-05T05:20:53.363835+00:00 | kb-cron |
Web technologies for game developers
For the tech folks, let's dig into the APIs the Web brings to the table that cater to game developers. Here's a thorough list to give you a taste of what the Web can do for you:
Send and receive any kind of data you want from a Web server like downloading new game levels and artwork to transmitting non-real-time game status information back and forth.
This simple API lets your game take over the entire screen, thereby immersing the player in action.
If you want your users to be able to use gamepads or other game controllers to work your game, you'll need this API.
Together, these two technologies let you build, style, and lay out your game's user interface. Part of HTML is the <canvas> element, which provides one way to do 2D graphics.
The <audio> element lets you easily play simple sound effects and music. If your needs are more involved, check out the Web Audio API for real audio processing power!
A powerful data storage API for maintaining user data on their own computer or device. A great way to save game state and other information locally so it doesn't have to be downloaded every time it's needed. Also useful to help make your game playable even when the user isn't connected to the Web (such as when they're stuck on an airplane for hours on end).
JavaScript, the programming language used on the Web, is blazing fast in modern browsers and getting faster all the time. Use its power to write the code for your game, or look at using technologies like Emscripten or Asm.js to easily port your existing games.
The Pointer Lock API lets you lock the mouse or other pointing device within your game's interface so that instead of absolute cursor positioning you receive coordinate deltas that give you more precise measurements of what the user is doing, and prevent the user from accidentally sending their input somewhere else, thereby missing important action.
SVG (Scalable Vector Graphics)
Lets you build vector graphics that scale smoothly regardless of the size or resolution of the user's display.
JavaScript typed arrays give you access to raw binary data from within JavaScript; this lets you manipulate GL textures, game data, or anything else, even if it's not in a native JavaScript format.
This API for controlling the playback, synthesis, and manipulation of audio from JavaScript code lets you create awesome sound effects as well as play and manipulate music in real time.
Lets you create high-performance, hardware-accelerated 3D (and 2D) graphics from Web content. This is a Web-supported implementation of OpenGL ES 2.0.
The WebRTC (Real-Time Communications) API gives you the power to control audio and video data, including teleconferencing and transmitting other application data back and forth between two users. Want your players to be able to talk to each other while blowing up monsters? This is the API for you.
The WebSocket API lets you connect your app or site to a server to transmit data back and forth in real-time. Perfect for multiplayer gaming action, chat services, and so forth.
Workers give you the ability to spawn background threads running their own JavaScript code, to take advantage of modern, multicore processors.
Help improve MDN
Learn how to contribute This page was last modified on Jul 11, 2025 by MDN contributors. View this page on GitHub • Report a problem with this content
- Games
- Introduction 1. Introduction 2. Anatomy
- APIs for game development 1. asm.js 2. Canvas 3. CSS 4. Full screen 5. Gamepad 6. IndexedDB 7. JavaScript 8. Pointer Lock 9. SVG 10. Typed Arrays 11. Web Audio 12. WebGL 13. WebRTC 14. WebSockets 15. WebVR 16. Web Workers 17. XMLHttpRequest
- Techniques 1. Using async scripts for asm.js 2. Optimizing startup performance 3. Using WebRTC peer-to-peer data channels 4. Audio for Web Games 5. 2D collision detection 6. Tiles and tilemaps overview 7. Using the Gamepad API 8. Image rendering for pixel art
- 3D games on the Web 1. Explaining basic 3D theory 2. Building up a basic demo with A-Frame 3. Building up a basic demo with Babylon.js 4. Building up a basic demo with PlayCanvas 5. Building up a basic demo with Three.js 6. GLSL shaders 7. WebXR 8. 3D collision detection 9. Bounding volume collision detection with THREE.js
- Implementing game control mechanisms 1. Mobile touch 2. Desktop with mouse and keyboard 3. Desktop with gamepad 4. Other
- Tutorials 1. 2D breakout game using pure JavaScript 2. 2D breakout game using Phaser 3. 2D maze_game with device orientation 4. 2D platform game using Phaser
- Publishing games 1. Game distribution 2. Game promotion 3. Game monetization
MDN Your blueprint for a better internet.
MDN
Contribute
Developers
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.