Page 1 of 2

Sandbox on the Web?

Posted: September 10th, 2012, 6:09 pm
by kripken
Hi everyone,

I've been working on porting Sauerbraten to the web, translating the C++ and OpenGL into something that runs in web browsers directly, without plugins. You can see it run here.

Would the Sandbox project be interested in this? If so I'd be happy to help get it working. Shouldn't be hard at all since all the difficult problems have already been solved.

The benefit of running on the web of course is that people just click on a link, and the game starts - they don't need to download and install anything. You can reach far more people that way in most cases (which is why mozilla let me work on this port as part of my job). Imagine if someone using Sandbox created a game and can then press a button that generates a web version of it, and they just give the link to their friends.

Re: Sandbox on the Web?

Posted: September 12th, 2012, 3:22 pm
by Mike
Kripken that'd be awesome! Thank you for offering to help add that to the project! It's just a plugin too right? So people could DL Sandbox and use it that way or play it through the browser, correct? Thanks and take care!
-mike

Re: Sandbox on the Web?

Posted: September 12th, 2012, 7:23 pm
by kripken
Mike wrote:It's just a plugin too right? So people could DL Sandbox and use it that way or play it through the browser, correct? Thanks and take care!
-mike
It's actually not a plugin, so it works in browsers without them needing to download and install anything (which plugins do require). It's just a website that you visit like any other (except that it happens to contain code from a complete game engine ;) )

But yes, people could either download sandbox the current normal way, or they could play Sandbox games right in their browser, whichever is more convenient. Probably for people that already have Sandbox and know how to use it the normal way is easier, but for new users just having them click on a link in their browser should be simpler.

Re: Sandbox on the Web?

Posted: September 13th, 2012, 10:46 am
by kddekadenz
Looks amazing!
Unfortunately I do have Firefox 15 and Linux, so it does not work for me. Have to wait for Firefox 16 :cry:
Oh and I did recognize the music played in the back: it is 'Out There' from yd and avaible on opengameart :)

Re: Sandbox on the Web?

Posted: September 13th, 2012, 2:18 pm
by Mike
Wow you really improved it since I last checked it out!! It seems pretty awesome :) So what do I have to do on my end to make this happen? Take care :)
-mike

Re: Sandbox on the Web?

Posted: September 13th, 2012, 5:49 pm
by kripken
Mike wrote:Wow you really improved it since I last checked it out!! It seems pretty awesome :) So what do I have to do on my end to make this happen? Take care :)
-mike
Kid_Matthew was on the emscripten IRC and we talked for a bit. Basically to get started, it would be good to see that you can build BananaBread itself. That means setting up emscripten and LLVM, seeing that the emscripten tutorial stuff all works for you, then build BananaBread according to the instructions there. Of course, feel free to ask me for help for anything during this, there are some rough edges - we just got this project to work now.

After you can build BananaBread, the next step is for me to make a patch set out of the changes to Cube 2 that we made to get it to build in JS. This is a pretty small set of changes, basically just making the main loop async. You would then apply that to Sandbox. After making sure it builds ok natively, you would use a Makefile like in BananaBread to build Sandbox into JS.

So there is some work to be done here, but it should not be too hard, and again I'll help however I can - I really want to see this work!

Relevant links:

https://github.com/kripken/emscripten
https://github.com/kripken/BananaBread/

Re: Sandbox on the Web?

Posted: September 18th, 2012, 12:09 am
by chocolatepie33
2 things -

1: are you the kripken from syntensity?
and
2: even though it's a browser application now, the Cube 2 engine still relies on a computer's hardware, e.g. graphics card, gpu, the like, right? I realize that the Cube 2 engine was built for older computers, but that's still an important point.

Re: Sandbox on the Web?

Posted: September 18th, 2012, 5:05 pm
by kripken
chocolatepie33 wrote:2 things -

1: are you the kripken from syntensity?
Yeah, same person :)
and
2: even though it's a browser application now, the Cube 2 engine still relies on a computer's hardware, e.g. graphics card, gpu, the like, right? I realize that the Cube 2 engine was built for older computers, but that's still an important point.
Yeah, it's running on the user's machine. Instead of running as native code, it's JavaScript, but otherwise it's the same. So it will be faster with a faster graphics card and so forth.

Re: Sandbox on the Web?

Posted: September 21st, 2012, 1:26 pm
by Mike
Thanks so much Kripken for your info and willingness to help. Sorry for the delay I've been kind of overloaded mentally lately with trying to decide if I'm moving or not. Once I get that set though I definitely plan to give this a go :)

Re: Sandbox on the Web?

Posted: March 21st, 2017, 3:07 pm
by Mike
I'm sooo sorry it has been so long but there has been a renewed interest from me in Sandbox. Would you still be willing to help with this? Thank you!