Craig Stephen Cooper

Author and Engineer

Sprite Editor

It used to be that most of the animations I developed for my game projects, I had to manually extract and align the individual frames. Then I used GameMaker, which helped, but still took a long while.

After learning a bit about signal processing, and discovering OpenCV, I've written a program that will analyse a sprite sheet, isolate the individual frames, and align them for me.

And I figured there'd be a tonne of people out there who might like something similar. So I've put it up here with some screen shots.

Latest Version - 2.0

What's new in this version:

    • A graphical user interface to make the whole process much easier.
    • An XML format for sprite projects
    • Alignment is performed using a segment of a single frame common across each frame.
    • You can name sprites, set frames per second, re-order the frames, and manually shift the anchor for each individual frame.
    • When your animations have been completed to your satisfaction, you can generate a compiled sprite file, which contains all your animations, plus the image data for each animation formed into a single film-strip.

What else is on the agenda? Possibly export to a GIF file?

Version 2.0 Screen Shot

This is the ENTIRE new user interface for the SpriteEditor. 

Along the left hand side, we have the control buttons for starting a new sprite, loading, saving, and generating sprites. The table below those buttons shows all the animations we have in the current sprite project.

Along the top, to the right, we have the sprite sheet view. You download a sprite rip in PNG, JPEG, BMP, PCX (basically anything supported by Allegro 5), and load it into the editor. The program will automatically use OpenCV's feature detection algorithms to isolate individual frames. Then you simply drag and select the frames you want, and hit add below the animation table in the bottom-left. With the buttons below this view, you can also re-scan the image, and merge detected frames as necessary.

The area in the bottom right, you have the controls for editing a single animation. You name it, set the frames per second, play the animation, and re-order the frames. You have a list of frames in the animation, as well as a large window to view the current animation. Within this window, you select an area of the frame to serve as your marker. Then you click "Perform Alignment" and it will use your marker to scan all the frames in the animation and align them using that marker.

Pretty sweet, huh?

Downloads for 2.0

Linux - Requires Allegro 5.2, Lua 5.3, and OpenCV 2.4

Windows and Mac OS X Coming Soon

Version 0.1 Screen Shots 

 Here's the main sprite sheet view. You select the individual frames and form animations.

Here's the sprite alignment view. You select a segment of the sprite common to all the frames, which the program uses as a template for alignment. You can see the template in the top-left corner.


You can download the program using one of these links.

Linux Download

Windows Download (coming soon)

Mac OS X Download (coming soon)