Day 2: animation

Having an artist on board is really cool, I have lots more time to write code. On the other hand, there's already more art assets than any of my previous games had at their conclusion.

Pictured is the animation editor I wrote today. Images from Biccy come in as Photoshop files with 30-40 layers corresponding to different body parts and stages of animation. I use ImageMagick to split each layer into a separate PNG file (this is a bit glitchy and needs careful attention; I also tried PIL but no success).

I then draw a bounding box around each layer in a 128 line pyglet program that calls ImageMagick again to do the cropping and writes the bounding boxes to a file (which can later be loaded for editing). This is just to save space on image sizes.

The pictured program is used to assemble large sprite pieces ("anims") out of individual layers. The "select" window lets the user page through all the layers and add or remove them from the current anim shown in the "composite" window. Along the bottom of the composite window is a timeline scrub; as layers and the origin are moved around with the mouse, keyframes are inserted automatically and the animation can be played back immediately. Each "anim" is named and saved into a text file that stores all animation data, bounding boxes and references to the required images.

Finally, another script picks up this text file and copies the images that were actually used into the resource directory, scaling them down along the way (we haven't decided on a sprite size yet, which is why this is so late in the pipeline).

Constructing simple idle and movement animations is proving to be quick, so I'm optimistic that the time spent setting all this up pays off in the long run.

(log in to comment)

Comments

neat!