squirrel-labs / ratatosk

Rask is a platformer game built with WASM and Rust
https://rask.rocks
MIT License
15 stars 1 forks source link

Support more browsers #105

Open konsumlamm opened 3 years ago

konsumlamm commented 3 years ago

Currently, only Chromium-based browsers are supported, since OffscreenCanvas is used to render the game. It would be nice to have an alternate renderer in order to make it possible to run Rask in non-Chromium browsers (e.g. Firefox).

nat-rix commented 3 years ago
Are we other browsers yet?
TrueDoctor commented 3 years ago

Path towards offscreen canvas fallback implementation: Add the required Content Security Policy (CSP) headers required to work under firefox: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/Planned_changes (this can for testing purposes be disabled by setting a flag in about:config) Fetch the worker.js to make it accessible from the main thread execute the script directly from the main thread in case of the offscreen canvas not working