Question about texture dictionaries and packing in Demina

Jun 21, 2011 at 8:16 PM

Hey, I've only been playing around with Demina for a day or so -- please forgive me if this is talked about somewhere right under my nose, and I've just missed it.


Are the texture dictionaries a way to use one texture file for every body part (bone texture) of a creature, to speed up draw calls?  Or are they there to do something else?  Also, have they been implemented yet?


If Demina doesn't have the ability to use one texture for multiple sprites (in other words, a sprite sheet) is this planned for some point in the future?  I'd be interested in working on this, if the functionality isn't already there.  But I'm not sure whether it is or isn't.  I couldn't figure out how to use the "Pack Animations" option in the editor, but I thought this might be related.  Maybe something happens at build time?  Thanks,



Jun 21, 2011 at 9:34 PM

That's exactly what it's for. You can actually load up multiple animations and pack them all together into a single texture. Once that's done, the animations files (the xml) will be modified to show that they should load from the dictionary instead of individual files, and then it's all handled for you at build/load time. (The png/tdict files need to live inside the content folder, though.)

I'm not terribly happy with this system, because I generally want to pack a whole lot more than just the animation pieces together. In my current game (which isn't using XNA), I'm packing level pieces and game object graphics all together, and then I've made the graphics loaders more intelligent to figure out where to find the files.

If you'd like to make any improvements to Demina, please do. :)

Jun 21, 2011 at 11:29 PM
Edited Jun 22, 2011 at 12:40 AM

Oops, I just got the "pack animations" menu item working.  I was confused by the line for adding a texture path -- for some reason I assumed it would have to do with selecting which textures go in, not the filename for saving the composite texture.


Thanks for your response.  Demina is a great little tool, from what I've seen so far -- not only does it pack all the character's bone textures into one file, it even gets rid of the wasted offset space in the pngs, which was my other concern with the program. Thanks for sharing this, jesse!


I'll definitely be updating the thread you created here, if I get something running that looks cool :)