There was a small discussion yesterday on #wesnoth-dev about spritesheets<http://wiki.wesnoth.org/SummerOfCodeIdeas#Allow_wesnoth_to_support_spritesheets>, and Blarumyrran pointed to this: http://forums.wesnoth.org/viewtopic.php?f=18&t=26531&p=374077&hilit=spritesheets#p374077 He basically hinted that the feature was basically implemented. What gives?
I checked and Wesnoth is still using individual .png's, so maybe what's missing is to implement an automatic method of generating them then? If I had a go at this, this would be an overview of my implementation: 1. Keep individual pngs on svn. Makes it easier for artists. 2. Keep .cfg files for unit animations as they are now, i.e. have them refer to individual .png files. Makes it easier to create animations and see what are the frames of an animation. 3. Generated sprite sheets as part of the build process. The size of the actual sprite sheets and how many images are included in each should be configurable depending on the target platform memory capabilities. 4. During this same build process generate new .cfg files for animations, that refer to positions within the sprite sheets and use ~CROP(), instead of refering directly to the original .png 5. When distributing the game (except in source form), include only spritesheets and the generated .cfg files, not original .png or .cfg files. 6. Once the system is in place, work out the possible memory/display optimizations. As far as generating the sprite sheets themselves, I'd borrow a maximum of code from this (licence is BSD) and adapt their GUI for wesnoth needs for testing and to complement the automated process: *ClanLib 0.9 texture packer* http://www.rtsoft.com/forums/showthread.php?t=2518<http://esoteric.clanlib.org/%7Esphair/texture_packer6.png> http://www.clanlib.org/beta/index.php/Examples#Screenshots_from_ClanLib-2.0.2FUtilities<http://www.clanlib.org/beta/index.php/MainDocs:Sprite_Resources> I'd then spend any remaining time trying to improve the placement of images in the sprite sheets, which may seems to be nitpicking but could get crucial for low-memory devices: http://en.wikipedia.org/wiki/Bin_packing_problem http://code.google.com/p/caparf/ http://scholar.google.com/scholar?q=%22Packing+Rectangular+Pieces+-+A+Heuristic+Approach.%22 Regards, Gabba
_______________________________________________ Wesnoth-dev mailing list Wesnoth-dev@gna.org https://mail.gna.org/listinfo/wesnoth-dev