For instance, sprites by default contain all the information they need to animate independently of the physics engine (or with an attached physical body), draw themselves, respond to basic collisions, receive input from the mouse or keyboard, etc. You can easily make various game elements behave as realistic physical objects with mass, velocity, friction, and elasticity, or you can make a sprite behave as a GUI element with BravoSprites' built in behavior.
For instance, writing an entire game in BravoSprites is this easy:
engine = [BBSpritesSystem startSpriteEngine]; [engine setBrain: self]; //set the controller/ main delegate [engine loadTextures]; //load image files into OpenGL textures [engine showWindow]; //display window BBSprite *sprite = [BBSprite sprite]; //add a few details here to customize the sprite [engine addSprite: sprite]; [engine run]; //runGranted, the above example doesn't have much in the way of gameplay, but just add a few sprites and a little game logic and BravoSprites will do the rest.
BravoSprites makes it easy to perform tasks that normally can be somewhat difficult to implement. For instance, if you want to display OpenGL-drawn text in a custom font, resized and word-wrapped within a bounding width, it's this easy:
BBTextSprite *textSprite = [BBTextSprite textSprite]; [textSprite setTex: FONT_TEXTURE]; [textSprite setString: @"Hello, world!"]; [textSprite setCharHeight: 20]; //set a custom font size [textSprite setPos: NSMakePoint(200,200)]; //place it onscreen [textSprite setBoundingSize: NSMakeSize(100,0)]; //word wrap within 100 pixel width [engine addSprite: textSprite];As you can see above, BravoSprites also uses many familiar Cocoa methods and data structures, so Mac OS X developers will feel right at home integrating it with existing XCode/ObjC/Cocoa projects.