Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player web does not load non-lcf files properly #3241

Open
elsemieni opened this issue Jun 23, 2024 · 1 comment
Open

Player web does not load non-lcf files properly #3241

elsemieni opened this issue Jun 23, 2024 · 1 comment
Labels
Emscripten WebAssembly/JavaScript port for web browsers

Comments

@elsemieni
Copy link
Member

Tested on player-web-master.

There is an issue related with player-web and projects mixed with LCF and XML (generated with lcf2xml - emu, edb, etc) files.

Let's put a minimal project with a Map0001.emu as inital scenario (with Map0001.lmu deleted).
In a normal-nonweb-executable Player is able to load Map0001.emu normally (and if Map0001.lmu exists, it will load Map0001.emu first).
However, that's not the scenario at player-web.

For reference this is an extract from the output of gencache regarding Map0001.emu:

"map0001.emu":"Map0001.emu",

Right, if you load the game, the game freezes with the following log on console:

index.js:1 Loading of Map Map0001.lmu failed.
The map was not found.
(Stack trace ommited as it was compilled and seems nonsense, plus the error is quite understandable).

index.js:1 Uncaught 
ErrnoError {name: 'ErrnoError', node: undefined, errno: 44, message: 'FS error', setErrno: ƒ, …} 

This happens in both cases when this is the start map and when you want to transfer player to that map.

If I put Map0001.lmu and Map0001.emu together, gencache generate the following output:

"map0001.emu":"Map0001.emu","map0001.lmu":"Map0001.lmu"

And player-web loads Map0001.lmu instead emu.

The following combination in gencache makes emu maps working, but that's not the ideal scenario:

"map0001.lmu":"Map0001.emu"

@jetrotal and @Ghabry 's told in chat, told that the inverting order of apperance on gencache makes emu map work when both files exist, however, tried that and Player insist to load lmu file instead.

@elsemieni elsemieni changed the title Player web does not load non-lcf files Player web does not load non-lcf files properly Jun 23, 2024
@Ghabry Ghabry added the Emscripten WebAssembly/JavaScript port for web browsers label Jul 1, 2024
@Ghabry
Copy link
Member

Ghabry commented Jul 2, 2024

Right I think the web player does not fetch the other file extension because this added delay (waiting for the request to fail) but we stopped doing requests for files that are not in the index so could be enabled now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Emscripten WebAssembly/JavaScript port for web browsers
Development

No branches or pull requests

2 participants