|
|
|
|
|
by flohofwoe
3791 days ago
|
|
In short, portability, better performance than manually written Javascript and simple distribution: These demos run in the browser, and natively on iOS, Android, Windows, Linux, OSX with the smallest size and best performance on each platform compiled from the same C++ code: http://floooh.github.io/oryol/, http://floooh.github.io/voxel-test/, http://floooh.github.io/virtualkc/ The better performance then manually written JS comes from the use of asm.js, LLVM's optimizer passes, and a simple linear memory model which 'preserves' spatial locality also present in the natively-compiled C/C++ code (if the programmer paid attention to this) Passing an URL along from which the code directly runs is the simplest distribution model imaginable, both for the 'publisher' and for the user. PS: the performance part applies to emscripten and asm.js, not necessarily to Cheerp which uses a different approach |
|
I'm still deciding on which libraries to use, and Oryol suddenly seems like a great option, though what I'm making is not a game and is not 3D (basically a score editor). Other options considered were SDL(2) or something more basic like GLFW. But Oryol's killer feature here is that it's specifically designed to result in a lightweight web version. (Though SDL1 also results in small sizes, but that's because the emscripten team put a lot of work into converting SDL calls into browser API calls)