Davidobot / love.js

LÖVE ported to the web using Emscripten, updated to the latest Emscripten and LÖVE (v11.5)
MIT License
605 stars 27 forks source link

SharedArrayBuffer error for davidobot.net examples on Chrome #44

Open HTV04 opened 3 years ago

HTV04 commented 3 years ago

It seems that davidobot.net does not return the COOP and COEP response headers shown in the README, which throws this error unless love.js is running in compatibility mode: Screenshot_20210905_215708

Sending the response headers from the README fixes this error on my local server, so applying them to davidobot.net should fix this issue.

Davidobot commented 2 years ago

It's hosted on GitHub pages, but I might try this: https://github.com/gzuidhof/coi-serviceworker if I get a chance

mvolkmann commented 1 year ago

I was able to get past this with the following.

Generate a web application from a LÖVE project in the current directory with the following steps:

Create a web server that sets the appropriate HTTP headers to enable use of SharedArrayBuffer with the following steps:

Start the web server and run the game with the following steps:

While this resolves the SharedArrayBuffer issue, it hit the new error below.

Uncaught RangeError: offset is out of bounds at Uint8Array.set () at processPackageData (game.js:234:26)

Davidobot commented 1 year ago

@mvolkmann

Uncaught RangeError: offset is out of bounds
at Uint8Array.set ()
at processPackageData (game.js:234:26)

Try increasing the memory via the --memory flag.