Trilarion / opensourcegames

Technical infos of open source games.
https://trilarion.github.io/opensourcegames/
Creative Commons Zero v1.0 Universal
631 stars 78 forks source link

Experience using Emscripten to convert C/C++ projects to Web #230

Open Trilarion opened 4 years ago

Trilarion commented 4 years ago

In a recent conversation, the idea of converting C/C++ projects to the Web platform using Emscripten (https://en.wikipedia.org/wiki/Emscripten, https://emscripten.org/) was mentioned. This sounds like it could be a very useful approach of distributing such projects.

Questions:

lm8 commented 4 years ago

Some examples of SDL based programs ported to emscripten: https://github.com/humu2009/tinygl.js?files=1 Another example of SDL based programs ported to webassembly (aka emscripten): https://medium.com/@robaboukhalil/porting-games-to-the-web-with-webassembly-70d598e1a3ec Some info on porting from C/C++ to emscripten: https://emscripten.org/docs/porting/guidelines/portability_guidelines.html

Trilarion commented 4 years ago

Thanks for the links. It seems to be possible but not right out of the box and for every game yet. It's interesting though and if somebody does more with open source games, I would be happy to hear about it.