Monday, August 16, 2010

Physics and Billboards

Having a hell of a time integrating Box2d-JS into The Render Engine, right now.  I'm not saying it can't be done, but it's proving to be a major pain in the neck.  Soon I hope to get the bouncing ball demo re-written to use the new physics module, but for the time being everything to do with it is a little broken.  I wouldn't go trying to use the physics module just yet... I'll let you know when it's in there.

You may wonder how Billboards and Physics are related -- well, they aren't.  But one thing that was recently completed in v2.0 is the introduction of the BillboardComponent.  This component allows an object to render itself to a billboard (2d picture) and present that to the render context rather than re-rendering each and every frame.  Things like the vector text renderer benefit from this since it doesn't have to redraw each character's glyph for each frame.  It does it once, and from then on (or at least until it changes) it uses the billboard to draw itself.  This, my friends, is another win for speed!

2 comments:

  1. Thanks for the effort on Box2D integration! I'm thinking that selective use of it could really enhance a game.

    Paul

    ReplyDelete
  2. I'm glad you think so. The code, in the trunk, for the "bounce the ball" demo now includes Box2d physics.

    ReplyDelete