Box2d PHP

I want to be be to able to call box2d from PHP. I hope to use PHP to generate animations with SVG, Canvas or Flash (via ming).

I think I can achieve this using a PHP/JAVA bridge or using SWIG to generate a PHP extension.

Ill post anything I learn here but if anyone else has any thought on this please share, especially if you have experience using box2d with SWIG.
This my friend, must be one of the strangest ideas I've seen on this forum. 😆

Not sure what in your twisted mind came up with the idea of having box2d in PHP, but I like it 😀 I think a native port shouldn't be that hard. With php5 properly supporting objects and everything.
I want to make a multiplayer browser based worms style artillery game with simultaneous turns.
Each player would submit orders to the server. Angle, velocity, weapon type etc. When all the orders are received the server uses box2d to process everything and then the results back to each player.

Your right intuitively a native PHP port seems possible and the neatest solution, but Im not clever enough to do it even using SWIG. However the PHP/java bridge seem to be working.
I don't think SWIG can handle all the inline functions. Also, box2d is not really the right option for scorched earth game IMHO.
SWIG has worked for the python and ruby ports so could work, but I am going to concentrate on calling the JAVA port via a PHP/JAVA bridge. that seems to be working.

Your right box2d is overkill for a simple artillery game, I have grander ambitions for it. but mostly just because I can 😉
No, it's just not that appropriate, full stop. The problem being that it is difficult to implement destructible terrain of the Scorched Earth variety, it is much easier to put into a simpler engine.

But yeah, I agree with the others, it's a crazy idea, but go for it if you want to.

Original thread: https://box2d.org/forum/viewtopic.php?t=1606