Tuesday, November 20, 2012

Asset Editor, Animation

I had a really basic 'Texture Editor' program which allowed me to manage the textures used by the game. However, the need for something a little more sophisticated emerged after a few requirements. First of all, selecting source texture coodinates by typing in pixels is extremely tedious. Here's a shot of the new utility:




On the left is a tree of 'assets'--so far just Textures and Animations. Selecting a node in the tree brings up the editor for that node. In the above screenshot, I've selected a texture. From the editor, I can then draw a box around the part of the image I want to use to set the texture coordinates. I don't know if the final game will make use of sprite sheets (texture atlases, whatever) or not, but it certainly makes development with temporary graphics a little bit faster. I can also change the source image and title from the editor.

Worth noting is the folder structure on the left. This is purely a development construct--folder data most likely won't be used in-game. But it will definitely be used in the editor build the dynamic fly-out menus to help find certain textures more quickly, and it's useful in the asset management tool too as a way to keep things organized.

Here's a shot of the animation editor:


The image preview actually animates so you can see what you're building, not that you can tell from a screenshot. The list box of frames is populated simply by dragging nodes from the tree into the box. Unlike textures (which are referenced by id), the names of animations are important, as that's how they're set by code.

In addition to the editors above, this asset utility allows the creation and deletion of folders, textures, and animations. You can also rename folders and drag items between folders. Changes are saved explicitly by clicking the save button.

And, for something a bit more interesting, here's a short video of the character running around using 4 simply animations.


Oh, I also hooked up a gamepad (some old Logitech rumblepad) and wrote the code to parse input. Even controlling a character that can't do anything but move around yet is more fun when you're holding a proper controller.

No comments:

Post a Comment