Path: blob/main/files/en-us/games/introduction_to_html5_game_development/index.md
6556 views
------{{GamesSidebar}}
Advantages
Games built with HTML work on smartphones, tablets, PCs and Smart TVs.
Advertise and promote your game all over the Web as well as other media.
Payments. Charge what you want and use whatever payment processing service you like.
Update your game whenever you want.
Collect your own analytics!
Connect with your customers more closely,
Players can play the game anywhere, anytime.
Web Technologies
| Function | Technology |
|---|---|
| Audio | Web Audio API |
| Graphics | WebGL (OpenGL ES 2.0) |
| Input | Touch events, Gamepad API, device sensors, WebRTC, Full Screen API, Pointer Lock API |
| Language | JavaScript (or C/C++ using Emscripten to compile to JavaScript) |
| Networking | WebRTC and/or WebSockets |
| Storage | IndexedDB or the "cloud" |
| Web | HTML, CSS, SVG, Social API (and much more!) |
: Full screen gameplay.
: Use gamepads or other game controllers.
: Build, style, and lay out your game's user interface.
: Easily play simple sound effects and music.
: Store user data on their own computer or device.
: Fast web programming language to write the code for your game. To easily port your existing games Emscripten or Asm.js
: Lock the mouse or other pointing device within your game's interface.
SVG (Scalable Vector Graphics)
: Build vector graphics that scale smoothly regardless of the size or resolution of the user's display.
: Access raw binary data from within JavaScript; Manipulate GL textures, game data, or anything else.
: Control the playback, synthesis, and manipulation of audio in real time.
: Create high-performance, hardware-accelerated 3D (and 2D) graphics. OpenGL ES 2.0.
: Real-Time Communications to control audio and video data, including teleconferencing and transmitting other application data back and forth between two users like chat.
: 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.
: Spawn background threads running their own JavaScript code for multicore processors.
: 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.