BIP - Managers

>> Thursday, April 22, 2010

I added a Sprite Manager and Audio Manager to BIP, now is very easy to load and play sounds. The Sprite Manager basically is a Vector with many sprites, so is easier to update and draw them all, is somewhat similar to DarkGDK way of managing sprites if you want to think it like that, you can check for collision doing something like this:

if(manager.pixelCollide(1, 5)) { /* Collision! */ }

That will check for collision between sprites 1 and 5.
Also I added a Button class inside the "gui" package, it's a very basic abstract class, the way you make buttons will be inherit from that class, and define your own actionPerformed method, then just call it with an image and a location, and optionally an image for the hover state.

BIP seems to be doing pretty nice so far, so I'm planning on using it in a small project now, which do not need tiled maps, to test it and improve it.

Post a Comment

  © Blogger template Simple n' Sweet by 2009

Back to TOP