Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Plugins

Box2D Plugin - WIP

ShiVa Plugin Development

Box2D Plugin - WIP

Postby giggsy » 06 May 2012, 10:02

Read the full article on my blog (better formating :)):

http://www.slegg.net/box2d-shiva-wrapper-first-test



I recently started a little hobby project: try to get Box2D running inside ShiVa 3D with support for PC, iOS and Android.

Here is the result so far: http://www.youtube.com/watch?v=Nj4F4IvrWTw

Features:
- Body properties wrapped
- Shapes wrapped: box, circle, poly, (also compound shapes are possible)
- Optional collision callbacks per object
- Mouse joint
- Collision groups

Running on:

- PC
- iOS: iPod Touch 4g (60FPS)
- Android: HTC Desire (60FPS)

Special Note: All objects are composed in the scene! No additional object creation via script required ... well, sort of ;)

Big thanks go to NiCoX, for giving me some awesome tips on how to structure the plugin!
User avatar
giggsy
Platinum Boarder
Platinum Boarder
 
Posts: 1093
Location: Austria

Re: Box2D Plugin - WIP

Postby michax » 06 May 2012, 11:24

Wooow. Awesome work! Can't wait to read more about Plugin development endeavours.

Myself I'm working on Raknet plugin, but can't find time/will to finish it.

Thanks for sharing.
User avatar
michax
Platinum Boarder
Platinum Boarder
 
Posts: 450
Location: Poland

Re: Box2D Plugin - WIP

Postby Fraser » 06 May 2012, 13:05

Awesome work! If you do decide to release the plugin/docs then I'm sure there will be many interested.

Your video shows 2D physics in a 2D looking scene (quads in 3d space). I'm guessing you can also do 2D physics applied to 3D models (cubes/spheres) which are all constrained to the same Z?

EDIT:
I answered my own question. Upon further studying the screenshot I see they are in fact blue cubes, just no lights.
User avatar
Fraser
Platinum Boarder
Platinum Boarder
 
Posts: 951
Location: Europe

Re: Box2D Plugin - WIP

Postby giggsy » 06 May 2012, 16:48

Thanks!

Yes, they're 3d. I removed the perspective from the camera, because it made debugging harder and removed the dynamic light because I only want to see the performance of the physics :)

I plan to be working on it the next month (free time), after that I'll see how far I get. I will release the plugin to work with, not sure about the source yet but I will be posting a few blog entries (with snippets included).
User avatar
giggsy
Platinum Boarder
Platinum Boarder
 
Posts: 1093
Location: Austria

Re: Box2D Plugin - WIP

Postby feng3d » 07 May 2012, 02:05

It's Awesome! :D
User avatar
feng3d
Expert Boarder
Expert Boarder
 
Posts: 130
Location: Taiwan

Re: Box2D Plugin - WIP

Postby Fraser » 08 May 2012, 01:22

The physics performance looks very good. I've bookmarked your blog.
User avatar
Fraser
Platinum Boarder
Platinum Boarder
 
Posts: 951
Location: Europe

Re: Box2D Plugin - WIP

Postby giggsy » 12 May 2012, 10:06

I posted an article about how I map the data inserted in shiva editor to my plugin: http://www.slegg.net/box2d-shiva-wrapper-the-api
User avatar
giggsy
Platinum Boarder
Platinum Boarder
 
Posts: 1093
Location: Austria

Re: Box2D Plugin - WIP

Postby giggsy » 16 May 2012, 18:33

A new post about how to compile plugins with STL for Android and how I got Box2d to compile: http://www.slegg.net/box2d-shiva-wrapper-compiling-box2d-as-plugin
User avatar
giggsy
Platinum Boarder
Platinum Boarder
 
Posts: 1093
Location: Austria


Return to Plugins