4 ms·
I still have to try wasm, but I see the main focus seems to be on cloud and edge deployments. What I'd really like would be to program a game in C (or classic
by luismedel 3y ago
I still have to try wasm, but I see the main focus seems to be on cloud and edge deployments.
What I'd really like would be to program a game in C (or classic Turbo Pascal) and have a way to run it "hosted" in a iOS, Android or <whatever platform> native app. Is that possible nowadays?
- nilslice 3y agoyou may want to take a look at https://github.com/extism/extism https://github.com/extism/extism
- kvdveer 3y agoSomeone would need to implement a library to abstract away the differences between all of these platforms, like Spin does for server software. I'm not aware of a tech stack that does that.
- trealira 3y agoI also replied to OP, but SDL is popular for this. https://www.libsdl.org/ https://www.libsdl.org/
- syrusakbary 3y agoWASIX might come in handy for that! https://wasix.org https://wasix.org
- rockwotj 3y agoAppreciate your hustle! ABC
- trealira 3y agoYou could write it using SDL2, a popular C library. They say the support iOS and Android: https://wiki.libsdl.org/SDL2/Installation https://wiki.libsdl.org/SDL2/Installation
- azakai 3y agoYou can compile the game to wasm and run it in a web environment. That can be a wrapper around a system webview, so you don't need to actually bundle a web engine in your app. The web environment would provide all the API support for your game: graphics, audio, networking, etc. in a cross platform way. This works today - many game engines compile to wasm, from Unity to Godot - but it is more popular to ship a native build of the engine on each platform rather than use a web environment. But that's because those engines take the time to port to each of those platforms; instead, you can use wasm + the web to get portability in a much simpler way (but with some limitations, of course).
- vivegi 3y agoNot WASM-related, but just a few days ago we had a Cosmopolitan libc announcement on HN. https://news.ycombinator.com/item?id=38101613 https://news.ycombinator.com/item?id=38101613 This promises a single C code base and portable executable generation for Linux MacOS Windows FreeBSD OpenBSD NetBSD
- born-jre 3y agohttps://wasm4.org/ https://wasm4.org/
- parasti 3y agoI ported Neverball, a game written in C, to WASM (https://play.neverball.org/ https://play.neverball.org/). It requires a browser to run, meaning it runs on any device that has a browser. That is superior to native in my eyes.