Platform/Games

From MozillaWiki
Jump to: navigation, search

Platform Games

The platform games initiative is made up of a core team whose work is primarily focused on making the Gecko platform, Firefox Desktop, and Firefox for Android the best it can possibly be at running games. The core team is ready to help coordinate with other groups in the community who are working on features or optimization that are important to game developers and provide assistance when needed. Platform development continues to focus on games and we hope you are as excited as we are to make HTML5 rock on the web!

Mozilla Games Technology MVP Requirements

Allow developers to better exploit hardware parallelism

Developers are struggling to get multi-threaded games running efficiently on the Web:

  • Standardize, implement and ship SharedArrayBuffer 1,2
  • DONE - Add pthreads support to Emscripten 1,2
  • Expose performance-sensitive Web APIs to Web Workers: WebGL, WebSockets, IndexedDB, WebAudio, WebRTC, WebVR
  • Share compiled code (asm.js and WebAssembly) between workers 1
  • Developers want to take advantage of SIMD hardware to optimize their code:
    • Standardize, implement and ship SIMD.js 1,2.
    • Include SIMD in WebAssembly 1,2.
    • DONE - Add SIMD support to Emscripten 1.
ID Summary Status Component Assigned to Target milestone
894105 Add SIMD support for JavaScript NEW JavaScript Engine ---
1036600 Add VR rendering and sensing support to platform NEW DOM Vladimir Vukicevic [:vlad] [:vladv] ---
1062849 Implement AudioWorklets for Web Audio API NEW Web Audio ---
922363 Add support for WebRTC (DataChannels) on WebWorkers (SharedWorkers and ServiceWorkers) NEW WebRTC: Networking ---
1054841 [meta] Shared memory for web workers NEW JavaScript Engine Lars T Hansen [:lth] ---
709490 Run WebGL on Web Worker with commit() RESOLVED Graphics Morris Tseng [:mtseng] [:Morris] FxOS-S8 (02Oct)
1121406 Enable WebSocket-in-Workers by default in release builds RESOLVED DOM Andrea Marchesini (:baku) mozilla38
701634 IndexedDB: Support database access from worker threads RESOLVED DOM: IndexedDB Ben Turner (not reading bugmail, use the needinfo flag!) mozilla37

8 Total; 5 Open (62.5%); 3 Resolved (37.5%); 0 Verified (0%);

Improve cold load time of large compiled codebases

Developers want to see reduced download, compilation and startup time for multi-million line compiled codebases.

  • WebAssembly will provide significant download size reductions (even before native support, through the polyfill) 1.
  • Natively decoding WebAssembly will be significantly faster than parsing JavaScript/asm.js 1.
  • Add a fast WebAssembly/asm.js compiler that allows an app to start quickly while a fully-optimizing compilation proceeds in a background thread 1.
  • Off-main-thread, streaming parsing/compilation 1.
  • Developers want to avoid depending on HTTP Content-Encoding:gzip for generic compression.
    • Add Emscripten support to perform decompression in asm.js / WebAssembly while downloading (allowing more aggressive algorithms than gzip).
ID Summary Status Component Assigned to Target milestone
1277562 Wasm: tiered compilation NEW JavaScript Engine: JIT ---
1249480 Ensure that the order of signature definitions is preserved in WASM text files. NEW JavaScript Engine: JIT Michael Bebenita [:mbx] ---
1286816 Wasm baseline: Optimize boolean evaluation for control NEW JavaScript Engine: JIT ---
1232011 binary to text transform for wasm view source NEW JavaScript Engine: JIT ---
1283121 wasm: implement signal handlers for unaligned floating-point accesses on ARM NEW JavaScript Engine: JIT ---
1275442 Optimize imul by small constants. NEW JavaScript Engine: JIT Dan Gohman [:sunfish] ---
1287220 wasm: explicit drop et al NEW JavaScript Engine: JIT Dan Gohman [:sunfish] ---
1277973 Baldr: set Activation::fp in GenerateTrapStub so faults have backtraces NEW JavaScript Engine ---
1253544 Baldr: Take away an indirection in loop backedges NEW JavaScript Engine: JIT ---
1232009 [meta] WebAssembly Debugging NEW Developer Tools ---
1282063 Wasm baseline: signal too-large-stack-frame in a less mysterious way NEW JavaScript Engine: JIT ---
1267053 wasm: register operators NEW JavaScript Engine: JIT Douglas Crosher [:dougc] ---
1286948 [wasm] Add debug traps handling to the WebAssembly baseline compiler NEW JavaScript Engine: JIT ---
1242803 [meta] add all the v.1 WebAssembly operators NEW JavaScript Engine ---
1283126 wasm: Take alignment hints into account when compiling load/store NEW JavaScript Engine: JIT ---
1288778 Baldr: collect telemetry about usage of asm.js vs WebAssembly NEW JavaScript Engine: JIT ---
1246648 wasm: support int64 in the JIT backend ASSIGNED JavaScript Engine: JIT Jan de Mooij [:jandem] (PTO until July 31) ---
1284155 Baldr: add WebAssembly.(Memory, Table) ASSIGNED JavaScript Engine Luke Wagner [:luke] ---
1284414 Wasm baseline: MIPS support ASSIGNED JavaScript Engine: JIT Heiher [:hev] ---
1279876 Wasm baseline: Correct truncate-to-int32 semantics ASSIGNED JavaScript Engine: JIT Lars T Hansen [:lth] ---
1265461 Import and pass the test suite from WebAssembly/spec ASSIGNED JavaScript Engine: JIT Benjamin Bouvier [:bbouvier] ---
1243372 [Security Review][Fuzzing] Test WebAssembly (wasm) with various tools ASSIGNED Security Assurance: Review Request Christian Holler (:decoder) ---
1283924 Baldr: implement async WebAssembly.compile ASSIGNED JavaScript Engine Luke Wagner [:luke] ---
1277011 Wasm baseline: ARM-32 support ASSIGNED JavaScript Engine: JIT Lars T Hansen [:lth] ---
1248555 wasm: support uncanonicalized double constants ASSIGNED JavaScript Engine: JIT Benjamin Bouvier [:bbouvier] ---
1284156 Baldr: add Memory/Table resizing (and grow_memory) ASSIGNED JavaScript Engine Luke Wagner [:luke] ---
1286517 wasm: Implement Global section ASSIGNED JavaScript Engine: JIT Benjamin Bouvier [:bbouvier] ---
1276029 Baldr: make WebAssembly.Module structured cloneable ASSIGNED JavaScript Engine Luke Wagner [:luke] ---

28 Total; 28 Open (100%); 0 Resolved (0%); 0 Verified (0%);

Improve browser storage capabilities

  • Developers seeking to avoid the permission prompt associated with persistent storage hit limitations of temporary storage as currently implemented in browsers.
  • Improve temporary quota limits to take into account factors like frecency.
  • Provide more information on quota usage and allowance 1.
  • Propose, standardize and implement finer-granularity units of evictable storage 1.
  • Allow cross-origin storage usage 1.
  • Developers that need persistent storage guarantees hit limitations of persistent storage as currently implemented in browsers.
    • Standardize persistent storage so that other browsers implement 1.
    • Reduce UI friction associated with the persistent permission prompt 1.
    • Improve storage management/eviction UI for browser users.
ID Summary Status Component Assigned to Target milestone
1212882 Implement foreign fetch NEW DOM: Service Workers ---
933398 avoid full copies when loading/storing large objects NEW DOM: IndexedDB ---
1202072 Crash when reading too much using FileReaderSync NEW DOM: IndexedDB ---
1202067 Size limit on IndexedDB Blob storing NEW DOM: IndexedDB ---
1182987 IndexedDB ends with onabort(event.target.error === QuotaExceededError) while processing deletion requests RESOLVED DOM: IndexedDB Jan Varga [:janv] mozilla48
1147821 Only disable IndexedDB in third-party windows when the third-party cookie preference is set RESOLVED DOM: IndexedDB Michael Layzell [:mystor] mozilla43

6 Total; 4 Open (66.67%); 2 Resolved (33.33%); 0 Verified (0%);

Improve browser graphics capabilities

  • Ship WebGL2 1.
  • Standardize and implement streaming WebGL canvas via WebRTC 1,2.
  • Run WebGL on discrete hardware for systems with integrated+discrete (e.g. nVidia Optimus).
ID Summary Status Component Assigned to Target milestone
1281250 [meta] WebGL 2 blockers NEW Canvas: WebGL Jeff Gilbert [:jgilbert] ---
1136734 Bypass compositor for WebGL canvas elements in fullscreen mode. NEW Canvas: WebGL ---
1169000 Render, Composite, and Present within 1 vsync interval NEW Graphics ---
863316 ANGLE should call D3DCompile off the main thread NEW Canvas: WebGL ---
1184283 support multiple vsync sources (for different rates and special situations) NEW Graphics Vladimir Vukicevic [:vlad] [:vladv] ---
1271478 Implement webglcontextcreationerror RESOLVED Canvas: WebGL Jeff Gilbert [:jgilbert] mozilla49
1161913 Handle preserveDrawingBuffer: false when capturing to a stream RESOLVED Canvas: WebGL Andreas Pehrson [:pehrsons] (Telenor) (PTO until Aug 1st) mozilla43

7 Total; 5 Open (71.43%); 2 Resolved (28.57%); 0 Verified (0%);


Allow developers to better avoid 32-bit browser Out-of-Memory conditions.

  • Ship 64-bit Firefox on 64-bit Windows.
  • Avoid Emscripten in-memory Virtual File System for asset storage by leveraging pthreads and FileReaderSync to provide synchronous file I/O in workers.

Continue investment in performance across the platform

  • Significantly optimize WebAudio performance 1.
  • Reduce WebGL shader compile times 1,2.
  • Reduce latency and jitter in the browser’s rendering pipeline 1,2,3,4.
  • Continue investments in the performance of JS, DOM, WebGL, WebRTC, codec, layout, rendering, compositing, animation, etc.
ID Summary Status Component Assigned to Target milestone
1169293 [meta] Improve overall Web Audio API performance NEW Web Audio ---
918941 cache results of shader compilation NEW Canvas: WebGL ---
1169000 Render, Composite, and Present within 1 vsync interval NEW Graphics ---
863316 ANGLE should call D3DCompile off the main thread NEW Canvas: WebGL ---
1136734 Bypass compositor for WebGL canvas elements in fullscreen mode. NEW Canvas: WebGL ---
1057530 [meta] Reduce our GC max-pause ASSIGNED JavaScript: GC Terrence Cole [:terrence] ---
1071275 [meta] Enable Silk on Other platforms RESOLVED Performance Mason Chang [:mchang] 2.2 S11 (1may)

7 Total; 6 Open (85.71%); 1 Resolved (14.29%); 0 Verified (0%);

Continue investment in Emscripten

  • Add support for pthreads, SIMD, and WebAssembly, as mentioned above.
  • Further improve compilation speed.

Continue investment in Firefox developer tooling to better support game developers

  • Improve Web Worker support 1.
  • Allow developers to break on various asm.js/WebAssembly error conditions 1.
ID Summary Status Component Assigned to Target milestone
1003097 [meta] Worker debugging NEW Developer Tools: Debugger ---
912562 Add UI that allows user to browse, change prefs for all IndexedDB databases in their profile NEW Developer Tools: Storage Inspector ---
1088655 OdinMonkey: add a pref that throws (with stack trace) on unaligned or null heap access ASSIGNED JavaScript Engine: JIT Luke Wagner [:luke] ---
1008453 support for navigator.hardwareConcurrency RESOLVED DOM: Core & HTML Boris Zbarsky [:bz] mozilla48
1241485 Increase the limit for workers per-origin RESOLVED DOM: Workers Olli Pettay [:smaug] mozilla47

5 Total; 3 Open (60%); 2 Resolved (40%); 0 Verified (0%);


Continue implementation of Service Workers to support offline

  • Ship Service Workers and dependent features 1.
ID Summary Status Component Assigned to Target milestone
1173500 Service Workers follow-on work NEW DOM: Service Workers ---
1131322 Service Workers for Gaia NEW DOM: Service Workers ---
1109680 Support multiple scopes in service workers REOPENED DOM ---

3 Total; 3 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Under Consideration

  • Developers are having trouble identifying how many Web Workers they should create to distribute their workload. Benchmarking methods often prove unreliable.
  • Developers are hitting the 20-per-origin limit on web workers in Firefox and are requesting a much higher limit.
  • Leverage multi-process browser architecture to guarantee a fresh address space for games with large contiguous heaps allocated early in process startup.
  • Investigate Out-of-Memory error reporting mechanism to send safe/sanitized triage information back to Web app developers.
  • Collaborate on new standards to improve IME capabilities [1],2.
  • Add hardware cursor API 1.
  • Improve Gamepad API 1.
  • Add Pointer Clipping extension to Pointer Lock API 1.
  • Add Emscripten tooling for memory use/leak debugging.
  • Standardize (as part of WebAssembly or more generally) a more scalable form of source maps suitable for large compiled codes.

Related Projects

Helpful Links

Tracking

Bugzilla Queries

Priority

Communication

Project Team Meeting Thursdays at 9:00 AM Pacific for 60 mins
  • Vidyo Room: Games's Vidyo Room
  • Invitation: Contact avaughn@mozilla.com (:avaughn) to get added to the meeting invite list.
IRC
  • Server: irc.mozilla.org
  • Channel: #games

People

Games Platform & Research

  • Martin Best - <mbest@mozilla.com>
  • Andre Vrignaud - <avrignaud@mozilla.com>
  • Alon Zakai - <azakai@mozilla.com>
  • Jeffrey Gilbert - <jgilbert@mozilla.com>
  • Jukka Jylänki - <jjylanki@mozilla.com>
  • Luke Wagner" <lwagner@mozilla.com>
  • Naveed Ihsanullah - <nihsanullah@mozilla.com>
  • Milan Sreckovic - <msreckovic@mozilla.com>
  • Vladimir Vukicevic - <vladimir@mozilla.com>
  • Maire Reavy - <mreavy@mozilla.com>
  • Peter Chang - <pchang@mozilla.com>
  • Anthony Vaughn - <avaughn@mozilla.com>

References