emscripten & BananaBread (3D tech... not the food)
emscripten & BananaBread (3D tech... not the food)
This looks pretty interesting, someone compiled a (test-)game using Sauerbraten (a c++ engine) into JavaScript using emscripten. I'm not 100% certain yet how that works exactly. Somehow the game is compiled into the llvm intermediate language (using clang, but maybe other llvm compiler not running on OsX can also do that). llvm bitcode is then compiled to Javascript. I get that part, but not really certain yet how the API-calls get translated by this (for example OpenGL ES->WebGL, or all the other system-api calls). But maybe emscripten can do all that.
https://developer.cdn.mozilla.net/media ... index.html
Guess it's time testing Irrlicht compiles on LLVM as well - anyone tried that already?
https://developer.cdn.mozilla.net/media ... index.html
Guess it's time testing Irrlicht compiles on LLVM as well - anyone tried that already?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: BananaBread (3D tech... not the food)
I saw that demo, but with this (lame) computer i can't run it smooth exactly... Suposedly the WebGL interface is exposed to JavaScript and most of the web languages, so it really doesn't matter how you write your stuff.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: BananaBread (3D tech... not the food)
Sure, the WebGL interface is mainly there for Javascript. The question that still puzzles me is how for example the OpenGL function calls get switched to WebGL calls... as the translation step seems to be on the level of the LLVM bitcode.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: BananaBread (3D tech... not the food)
Now that is something odd... maybe it works because the function calls have the same name? or some specific conversion for OpenGL to WebGL?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: BananaBread (3D tech... not the food)
From wikipedia "WebGL is based on OpenGL ES 2.0". Probably the same names.
Binary translaton isn't a new trick MIDLet Pascal, MoSync and cibyl compile c++, pascal and respectively c code to j2me bytecode. The latter two use an IL (kinda like MSIL) that gets recompiled to target platform bytecode.
What's new about this is that you basically get to play 3d games on standard tech available in the 2 most popular desktop browsers.
No I don't know how irrlicht's smart pointer arch would translate in such a scenario.
IIRC nobody will know unless someone does the same thing with a basic irrlicht demo (put it through emscripten).
Binary translaton isn't a new trick MIDLet Pascal, MoSync and cibyl compile c++, pascal and respectively c code to j2me bytecode. The latter two use an IL (kinda like MSIL) that gets recompiled to target platform bytecode.
What's new about this is that you basically get to play 3d games on standard tech available in the 2 most popular desktop browsers.
No I don't know how irrlicht's smart pointer arch would translate in such a scenario.
IIRC nobody will know unless someone does the same thing with a basic irrlicht demo (put it through emscripten).
Re: BananaBread (3D tech... not the food)
Well the website states it works with the sauerbraten engine....last time i checked saubraten hides any direct opengl calls. So they just had to write a saubraten wrapper in javascript.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Re: BananaBread (3D tech... not the food)
i tested the demos, my result:
half-life 2 runs 100 times faster, looks much better, is from 2004. What a waste of energy, its just melting our planet faster.
half-life 2 runs 100 times faster, looks much better, is from 2004. What a waste of energy, its just melting our planet faster.
Re: BananaBread (3D tech... not the food)
lol, found best two things to comparegerdb wrote:i tested the demos, my result:
half-life 2 runs 100 times faster, looks much better, is from 2004. What a waste of energy, its just melting our planet faster.
Working on game: Marrbles (Currently stopped).
Re: BananaBread (3D tech... not the food)
It was a new technology and so development didn't stop. Today it was announced that Firefox (nightly build) comes now with an optimization module (called asm.js) that makes sure the kind of js code produced by emscripten will run much faster in Firefox: https://blog.mozilla.org/luke/2013/03/2 ... x-nightly/
So it's now possible to have code that's only around 50% slower than native c++ code running in a webbrowser. And even more important - this kind of code runs without gc causing undeterministic time behaviour - so it's way nicer for games than js was so far. I wouldn't be too surprised seeing other browser doing further optimizations to their js engines as well certainly.
So it's now possible to have code that's only around 50% slower than native c++ code running in a webbrowser. And even more important - this kind of code runs without gc causing undeterministic time behaviour - so it's way nicer for games than js was so far. I wouldn't be too surprised seeing other browser doing further optimizations to their js engines as well certainly.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: emscripten & BananaBread (3D tech... not the food)
Next cool thing done with emscripten - the Unreal 3 Engine now runs on the web: https://blog.mozilla.org/blog/2013/03/2 ... or-gaming/
Did a quick check yesterday and seems Irrlicht trunk at least compiles with clang++ already. Unfortunately I only got clang 3.0 in my repositories and emscripten needs 3.2 (will try installing clang manually). Seems to get WebGL support we need to use OpenGL ES2.0 (https://github.com/kripken/emscripten/w ... GL-support). So I guess to get Irrlicht running in a browser we should start with the ogl-es branch.
Did a quick check yesterday and seems Irrlicht trunk at least compiles with clang++ already. Unfortunately I only got clang 3.0 in my repositories and emscripten needs 3.2 (will try installing clang manually). Seems to get WebGL support we need to use OpenGL ES2.0 (https://github.com/kripken/emscripten/w ... GL-support). So I guess to get Irrlicht running in a browser we should start with the ogl-es branch.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: emscripten & BananaBread (3D tech... not the food)
The only thing that they still can't do is load content faster over the net... I don't think it is very practical to have a web load hundreds upon hundreds of megs just to show it can run the Unreal Engine 3, not that it isn't a great achievement, but that i see it very little practical.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: emscripten & BananaBread (3D tech... not the food)
Yeah, that is pretty good point, for large games having more local storage than html offers so far would be better (or huge bandwidth costs and constantly downloads... I think Runescape for example is doing that).
Maybe this motivates people to use more procedural content...
Maybe this motivates people to use more procedural content...
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: emscripten & BananaBread (3D tech... not the food)
I think that not only Flash has a way to store things locally, so it should be possible to cache these things and reload from disk later on.
Re: emscripten & BananaBread (3D tech... not the food)
You can store around 5 MB per with html 5 local storage (browsers might allow more, but 5MB are pretty much guaranteed). 5 MB are unfortunately not much for games.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: emscripten & BananaBread (3D tech... not the food)
I already saw a bunch of 3D games before that stored their contents locally, but that was at least 5 years ago.
Working on game: Marrbles (Currently stopped).