Real Sprites PLEASE!!!
carlos.varela.com
Member Posts: 99
It's so complicate to split all my ready sprites into separates files.
Are anyway to automate these splits?
Are anyway to automate these splits?
Comments
I hope we still get the option to use the anim system 'as is' if sprite sheets are introduced. I'm used to making my graphics this way now!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
@Carlos
The best way to 'Split' your current Spritesheet to separate Sprite files would be to:
1. Open image in Photoshop
2. View | New Guide
3. Insert vertical & horizontal guide lines to split up the sheet (I just divide the image dimensions by # of frames and use those values for where the place the guides)
4. Select slice tool
5. Choose "Slice from guides"
6. File | Save For Web & Devices
7. Save Images Only
This will give you your individual PNG Sprite files.
@QS
Using Spritesheet animation using OpenGL ES with iPhone SDK is significantly faster than preloading each sprite entity separately. The memory footprint is significantly reduced If Spritesheets are used. The speed increase can be significant across an entire project. As the engine need only load 1 file (the Spritesheet), you then use the co-ordinates and size to locate your Sprite within the Sheet.
Creating Spritesheets can be very easy using various tools like [Zwopple] for example.
http://zwoptex.zwopple.com/
Zopple, can take each of your individual sprites and create a combined PNG File (Spritesheet) and a separate XML file which defines the X,Y, Size of each sprite.
Wayne
wayneh001: thanks, I will try your option.
Cheers for that sprite sheet maker tool - I was thinking how much of a hassle it would be to do that!
Your ideas are intriguing to me and I wish to subscribe to your newsletter.
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
But, does not work.
I Have just tested ImageMagick 6.5.9 installed on a Snow Leopard 10.6.3 Mac.
The [-crop] command does respect the transparency of PNG files when cropped.
ie Using Terminal:
`convert test.png -crop 50x50 test2.png`
This results in a new PNG file being created with the Transparency correct.
Could you try forcing the transparency with the [-background none] command ie:
`convert test.png -crop 50x50 -background none test2.png`
Also possibly check which version of ImageMagick you are using.
@QS
Sorry, I don't have any Blogs or Newsletters; maybe it's time to set something up.
sherezade:~ cgvarela$ convert -version
Version: ImageMagick 6.6.1-0 2010-04-09 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP OpenCL
I am not sure that this is the las version, because when you download directly from the ImageMagick site the .tar.gz say 10.2.0 ???
Please, Which version do you have?
I've just installed the latest version of ImageMagick on another Intel/Leopard (10.6.3) Mac.
Using the following URL and instructions:
http://www.imagemagick.org/script/binary-releases.php?ImageMagick=i7pr0tcinjab9dn4fd8bc4brd5#macosx
Again, the transparency aspect of the PNG files, once cropped, was respected. Maybe try uninstalling and installing manually using the instructions in the URL above.
************************* [ SIPS ] **************************
Another method you could maybe try is to use Mac OS X's [`sips`] command?
1. Open Terminal
2. Enter [`sips`] commands: eg: [`sips testimage.png -c 50 50`]
the [`-c`] flags the built in `sips` engine to [`crop`] the image. There are lots of tools similar, but not as advanced as ImageMagick.
Again, on all of my machines this respects the Transparency.
Do note this method is destructive to the original image, so DO MAKE A COPY FIRST.
For more information on `sips` review the Manual in terminal: `man sips`.
or view the following Apple Developers Website info:
http://developer.apple.com/Mac/library/documentation/Darwin/Reference/ManPages/man1/sips.1.html
Wayne
I actually meant this:
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Now its working well! Thanks, just uninstall 6.6.1 and reinstall 6.5.9
Is it possible to do wildcards like *.png?
Thanks again and for the next beers "own the house", but with some "tapas" here in Madrid
quantumsheep, we will hope to see you too!
; ))P
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io