#1
May 4, 2022, 8:29 pm
Hide
#4
May 7, 2022, 11:34 pm
Hide
Sweet! The 'g'o command doesn't seem to work for me in Firefox
#5
May 8, 2022, 11:33 pm
Hide
capristo wrote
Sweet! The 'g'o command doesn't seem to work for me in Firefox
Hmm, works for me on Firefox, though I'm on Windows. You're on MacOS right? Could be an emscripten bug.
There are still a few little unported things, such as the fullscreen option.
You can also upload files to the browser's IDBFS database file system, although IVAN-wasm won't load savefiles from the original build of vanilla IVAN. I think this is because it was compiled so long ago with an older generation compiler, some of the data types might be assumed to be of a different size (in bytes). When these old data types are read into IVAN-wasm, there must be some sort of numerical under/overflow. I think it would take some serious CS expertise to patch it up.
There's also all the old bugs... 0.o All the same, it's progress towards porting Attnam/ivan to the web.
I think one of the potential possibilities would be to run this on node.js, and then the server could verify a playthrough and maintain a global scoreboard of "legit" hi-scores.
#6
May 9, 2022, 1:02 pm
Hide
I was actually testing that on Windows, but the same thing happens in Firefox for macos.
Actually it works with my arrow keys, but not the numpad (tried with num lock both on and off)
By the by, is it possible to have the latest IVAN in WebAssembly, too, or is there too much difference in codebase?
The port of 0.50 was relatively straightforward because there were fewer libraries. Had to port it to SDL2 first though, which wouldn't be needed with latest IVAN as that's already done. I never got up to porting latest IVAN because I ran out of free time. I don't know if it will be more or less complicated than 0.50, but in all likelihood there'll be more obstacles to code around. Maybe the sound and audio might give a little static, but on the whole the other additional features are just straight cpp, and it's still single-threaded SDL2 so should port to emscripten easily enough. We won't know what the danger level is until someone ventures into that dungeon.
Here's the diff:
https://github.com/Attnam/ivan-050-wasm/compare/383ffef...ma...
Emscripten should build just fine on linux using pretty much the same steps.