javascript port of bullet?

Post Reply
bert
Posts: 3
Joined: Tue May 11, 2010 10:16 pm

javascript port of bullet?

Post by bert »

do you think a javascript port of bullet would be feasible performance-wise? it looks like in a few months webgl will be final and then there will be the need for nice physics in webgl games. :)
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York
Contact:

Re: javascript port of bullet?

Post by sparkprime »

haha you're a funny guy

Seriously i think a 'from scratch' implementation of the same algorithms makes more sense. And obviously scale down your expectations a lot (50x less performance or something probably). But for small phone-style games I guess it could work.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: javascript port of bullet?

Post by Erwin Coumans »

There is currently no such thing, but it would definately be cool and useful to have a Javascript port/implementation. Others asked for it too, with WebGL in mind.
Alternatively, Google is working on NativeClient (NaCl) that can run C++ sandboxed in a browser: http://code.google.com/p/nativeclient/

There are some related ports:
Box2D ported to Javascript: http://box2d-js.sourceforge.net/
Someone ported Bullet to Java, JBullet: http://jbullet.advel.cz/
Jiglib 3D ported to Flash / Actionscript 3: http://www.jiglibflash.com

Note that only a small subset of Bullet classes need to be ported to have a functional physics engine.
Thanks,
Erwin
razer
Posts: 82
Joined: Sun Apr 04, 2010 10:08 pm

Re: javascript port of bullet?

Post by razer »

GWT compiles Java to JavaScript. You could probably compile Java bullet port to javascript.

There is JavaScript port of Quake II already made by google

Quake -> Jake (java port) -> gwt compilation with WeGL -> Chrome with WebGL
http://code.google.com/p/quake2-gwt-port/
bert
Posts: 3
Joined: Tue May 11, 2010 10:16 pm

Re: javascript port of bullet?

Post by bert »

http://www.glge.org/jiglib-in-glge/

someone ported jiglib to javascript. it doesn't seem to be very optimized yet but performance-wise it already seems to be useable for small things with few objects.

i have no experience with jiglib. how does it compare to bullet?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: javascript port of bullet?

Post by Erwin Coumans »

jiglib is a nice compact physics engine, the original author (Danny Chapman) visits those Bullet forums sometimes. Jiglib seems similar but less feature complete than Bullet.

The javascript version of jiglib could be used as a starting point for a Bullet port, if someone has the time.
Thanks,
Erwin
Pl4n3
Posts: 1
Joined: Sun Jan 15, 2012 11:10 pm

Re: javascript port of bullet?

Post by Pl4n3 »

Hi, I ported parts of jbullet to javascript -> bullet.js

http://code.google.com/p/bulletjs/

Its with 3 canvas and webgl demos.
Post Reply