Wednesday, October 13, 2010

Character animation test and 8bit graphics

I've added a new feature to PickleOS. It now allows me to create a surface with any pixel magnification to establish an "8bit" effect. Initially I did this simply by scaling everything I drew. This worked fine, until I started rotating sprites. Rotating a sprite by 45 degree rotates the pixels as well so that they end up looking like diamonds, not squares. To do proper rotation I instead had to render the entire scene at 1:1 scale to a texture, and then draw the texture scaled up. I've implemented this at a low level in the windowing code so all I have to do now is specify what pixel magnification I want when I create the main game window.

My first real use of this feature is in a little character animation test for a mini game I'm working on. The character is made of 4 parts, the head, the torso, legs, and arms. The head, torso and legs animate without any rotation, but the arms rotate around between -45 and 45 degrees. This works very well, and looks great in motion. Here are some still pictures.

2 comments:

  1. Such a burly man. Perfect build to survive the zombie uprising, with that manly beard and all.

    ReplyDelete