Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Browser version of Tilengine
#5
(01-11-2023, 12:52 AM)megamarc Wrote: Hi!

Sorry for the delay, I've been out offline on Christmas holidays.

I don't quite know emscripten to answer this question right now. The setup I have first compiles a static library libTilengine.a composed of webassembly (wasm) objects, and then builds a final wasm bundling the library, the compiled sample and packaged assets.

I know that emscripten can compile to plain asm.js instead of wasm. So in theory this intermediate library in asm.js should be usable inside a native javascript application. But as I mentioned, I don't know enough the toolchain and its possible output paths. I just learned how to build the original samples written in C. But it'ssomething that should be explored.

This documentation page talks about calling C code in a library (i.e Tilengine) from javascript code:
https://emscripten.org/docs/porting/conn...call-cwrap

Hi!
I hope your Christmas holidays were good.
being able to call C code from JS sounds interesting. Modern web technologies are powerful today, so I think there are many options.
I can eventually try to compile and test on my side too, but I should figure out how to compile to WASM first (I often struggle to compile C / C++, I often have many errors. Hello to the "Undefined Reference to SDL2_..." errors)
Reply


Messages In This Thread
Browser version of Tilengine - by System64 - 12-22-2022, 10:01 AM
RE: Browser version of Tilengine - by megamarc - 12-31-2022, 08:28 PM
RE: Browser version of Tilengine - by System64 - 12-31-2022, 11:23 PM
RE: Browser version of Tilengine - by megamarc - 01-11-2023, 12:52 AM
RE: Browser version of Tilengine - by System64 - 01-11-2023, 01:46 AM
RE: Browser version of Tilengine - by megamarc - 01-14-2023, 04:54 PM
RE: Browser version of Tilengine - by System64 - 01-15-2023, 02:36 AM
RE: Browser version of Tilengine - by megamarc - 01-15-2023, 04:09 AM
RE: Browser version of Tilengine - by System64 - 01-15-2023, 06:09 AM
RE: Browser version of Tilengine - by megamarc - 01-16-2023, 03:59 AM
RE: Browser version of Tilengine - by System64 - 01-16-2023, 10:20 PM
RE: Browser version of Tilengine - by megamarc - 01-19-2023, 04:30 AM
RE: Browser version of Tilengine - by System64 - 11-13-2023, 05:27 AM
RE: Browser version of Tilengine - by megamarc - 12-03-2023, 06:26 PM
RE: Browser version of Tilengine - by System64 - 12-04-2023, 12:08 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)