Pre-Order the Game!

Desura Digital Distribution

Saturday, March 23, 2013

Animation!

I've added a "SpriteManager" that allows me to load in sprites via data files, instead of hardcoding the locations of sprites inside the code itself.  I plan to revamp the UI drawing algorithm to be dynamic based on the sprites that it's using.  For example, if you have a 2x2 corner sprite for a background window border, it'll correctly draw that.  Same for 200x200 corner.  That way, I don't need to worry about manually setting the size and positions of UI in code, it'll handle itself.  It'll help speed up creation and tweaking of UIs in future.

SpriteManager should allow me to render stuff faster because instead of looking up a sprite then drawing it, all objects that contains a reference to the "lookup" will now instead hold a reference to the sprite itself, cutting down some processing time.

I've replaced the star sprites with BBSprites, and they're now animated!  Black holes are animated as well, but seeing it in motion, I'm not too happy with it, so I'll have my artist re-do the black hole soon.  However, I found a bug, since they're holding a reference to the same BBSprite, all stars of the same color twinkle at the same time.  Oh well, at least it's rendering and loading stuff correctly!  Here's a screenshot of a couple of stars twinkling (Blue and Orange is twinkling, they're a bit bigger than normal):


No comments:

Post a Comment