Platform/Games: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Added tracking for "Allow developers..." user story.)
Line 11: Line 11:
Developers are struggling to get multi-threaded games running efficiently on the Web:<br>
Developers are struggling to get multi-threaded games running efficiently on the Web:<br>
*Standardize, implement and ship SharedArrayBuffer [https://blog.mozilla.org/javascript/2015/02/26/the-path-to-parallel-javascript/ 1],[https://bugzilla.mozilla.org/show_bug.cgi?id=1054841 2]<br>
*Standardize, implement and ship SharedArrayBuffer [https://blog.mozilla.org/javascript/2015/02/26/the-path-to-parallel-javascript/ 1],[https://bugzilla.mozilla.org/show_bug.cgi?id=1054841 2]<br>
*Add pthreads support to Emscripten [https://groups.google.com/forum/#!msg/emscripten-discuss/gQQRjajQ6iY/DcYQpQyPQmIJ 1],[https://github.com/kripken/emscripten/blob/incoming/site/source/docs/porting/pthreads.rst 2]<br>
*DONE - Add pthreads support to Emscripten [https://groups.google.com/forum/#!msg/emscripten-discuss/gQQRjajQ6iY/DcYQpQyPQmIJ 1],[https://github.com/kripken/emscripten/blob/incoming/site/source/docs/porting/pthreads.rst 2]<br>
*Expose performance-sensitive Web APIs to Web Workers: [https://bugzilla.mozilla.org/show_bug.cgi?id=709490 WebGL], [https://bugzilla.mozilla.org/show_bug.cgi?id=1121406 WebSockets], [https://bugzilla.mozilla.org/show_bug.cgi?id=701634 IndexedDB], [https://bugzilla.mozilla.org/show_bug.cgi?id=1062849 WebAudio], [https://bugzilla.mozilla.org/show_bug.cgi?id=922363 WebRTC], [https://bugzilla.mozilla.org/show_bug.cgi?id=WebVR WebVR]<br>
*Expose performance-sensitive Web APIs to Web Workers: [https://bugzilla.mozilla.org/show_bug.cgi?id=709490 WebGL], [https://bugzilla.mozilla.org/show_bug.cgi?id=1121406 WebSockets], [https://bugzilla.mozilla.org/show_bug.cgi?id=701634 IndexedDB], [https://bugzilla.mozilla.org/show_bug.cgi?id=1062849 WebAudio], [https://bugzilla.mozilla.org/show_bug.cgi?id=922363 WebRTC], [https://bugzilla.mozilla.org/show_bug.cgi?id=1036600 WebVR]<br>
*Share compiled code (asm.js and WebAssembly) between workers [https://bugzilla.mozilla.org/show_bug.cgi?id=1168981 1] <br>
*Share compiled code (asm.js and WebAssembly) between workers [https://bugzilla.mozilla.org/show_bug.cgi?id=1168981 1] <br>
*Developers want to take advantage of SIMD hardware to optimize their code:<br>
*Developers want to take advantage of SIMD hardware to optimize their code:<br>
**Standardize, implement and ship SIMD.js [https://hacks.mozilla.org/2014/10/introducing-simd-js/ 1],[https://bugzilla.mozilla.org/show_bug.cgi?id=894105 2].<br>
**Standardize, implement and ship SIMD.js [https://hacks.mozilla.org/2014/10/introducing-simd-js/ 1],[https://bugzilla.mozilla.org/show_bug.cgi?id=894105 2].<br>
**Include SIMD in WebAssembly [https://github.com/WebAssembly/design/blob/master/PostMVP.md#fixed-width-simd 1].<br>
**Include SIMD in WebAssembly [https://github.com/WebAssembly/design/blob/master/PostMVP.md#fixed-width-simd 1],[https://bugzilla.mozilla.org/show_bug.cgi?id=1188259 2].<br>
**Add SIMD support to Emscripten [https://github.com/kripken/emscripten/labels/SIMD 1].
**Add SIMD support to Emscripten [https://github.com/kripken/emscripten/labels/SIMD 1].
====Tracking====
<bugzilla>
{
    "bug_id": "1054841,709490,1121406,701634,1062849,922363,1036600,1168981,894105,1188259",
    "include_fields":"id, summary, priority, status, assigned_to"
}
</bugzilla>


===Improve cold load time of large compiled codebases.===
===Improve cold load time of large compiled codebases.===

Revision as of 03:06, 18 May 2016

Platform Games

The platform games initiative is made up of a core team whose works is primarily focused on making the Gecko platform, Firefox Desktop, Firefox OS, 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 Roadmap

There are two levels to this document. The first is the Roadmap section which contains areas that are currently in development and we have a reasonable level of confidence we can address in the next year. For the topics that are listed in the Under Consideration section, we are actively investigating the best way to address them.

Roadmap

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.
    • Add SIMD support to Emscripten 1.

Tracking

Full Query
ID Summary Priority Status Assigned to
701634 IndexedDB: Support database access from worker threads -- RESOLVED Ben Turner (not reading bugmail, use the needinfo flag!)
709490 Run WebGL on Web Worker with commit() -- RESOLVED Morris Tseng [:mtseng] [:Morris] (Inactive)
894105 Add SIMD support for JavaScript -- RESOLVED
922363 Add support for WebRTC (DataChannels) on WebWorkers (SharedWorkers and ServiceWorkers) P4 NEW
1036600 Add VR rendering and sensing support to platform -- RESOLVED Vladimir Vukicevic [:vlad] [:vladv] (needinfo me, slow to respond)
1054841 [meta] Shared memory for web workers P3 NEW
1062849 Implement AudioWorklets for Web Audio API P2 RESOLVED Karl Tomlinson (:karlt)
1121406 Enable WebSocket-in-Workers by default in release builds -- RESOLVED Andrea Marchesini [:baku]
1168981 OdinMonkey: share asm.js code between workers -- RESOLVED
1188259 [meta] WebAssembly P3 RESOLVED

10 Total; 2 Open (20%); 8 Resolved (80%); 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).

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.

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).

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.

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.

Continue implementation of Service Workers to support offline.

  • Ship Service Workers and dependent features 1.

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

Release Targets

Communication

Project Team Meeting Wednesdays at 10:00 AM (PST)/1:00 PM (EST) for 60 mins
  • Vidyo Room: Games's Vidyo Room
  • Invitation: Contact elancaster@mozilla.com (:elan) to get added to the meeting invite list.
  • Meeting Notes: Meeting Notes Etherpad
IRC
  • Server: irc.mozilla.org
  • Channel: #games

People

Games Platform & Research

  • Vladimir Vukicevic - <vladimir@mozilla.com>
  • Martin Best - <mbest@mozill.com>
  • Alan Kligman - <akligman@mozilla.com>
  • Alon Zakai - <azakai@mozilla.com>
  • Jeffrey Gilbert - <jgilbert@mozilla.com>
  • Jukka Jylänki - <jjylanki@mozilla.com>
  • Luke Wagner" <lwagner@mozilla.com>
  • Marco Mucci - <mmucci@mozilla.com>
  • Milan Sreckovic - <msreckovic@mozilla.com>
  • Naveed Ihsanullah - <nihsanullah@mozilla.com>
  • Maire Reavy - <mreavy@mozilla.com>
  • Paul Adenot - <padenot@mozilla.com>
  • Ted Mielczarek - <ted@mozilla.com>
  • Kannan Vijayan - <kvijayan@mozilla.com>
  • Peter Chang - <pchang@mozilla.com>

Games Documentation

  • Christopher Mills - <cmills@mozilla.com>
  • Eric Shepherd - <eshepherd@mozilla.com>

Games Partner Support

  • Bill Walker - <bwalker@mozilla.com>
  • Harald Kirschner - <hkirschner@mozilla.com>
  • Louis Stowasser - <lstowasser@mozilla.com>
  • Nick Desaulniers - <nick@mozilla.com>

Games Public Relationship Team

  • Paul Jarratt - <pjarratt@mozilla.com>


Games QA

  • Anthony Hughes - <ahughes@mozilla.com>
  • Marc Schifer - <mschifer@mozilla.com>

To Be Kept Informed

  • Chloe Varelidi - <chloe@mozillafoundation.org>
  • Dave Herman - <dherman@mozilla.com>
  • Sean Stangl - <sstangl@mozilla.com>
  • Jeff Muizelaar - <jmuizelaar@mozilla.com>
  • Benoit Jacob - <bjacob@mozilla.com>

References