Just go to Edit\Refactor\Convert to Objective-C ARC. You are going to use ARC in this project, but by default the template isn’t set up to use ARC. Once you’ve got that installed, start up Xcode and make a new project with the iOS\cocos2d v 2.x\cocos2D iOS template, and name the project TextureFun. So first make sure that you have the latest “unstable” version of Cocos2D v2.x installed.
Like I said, even though this is a Texture Packer tutorial, I wanted to show you an example of this working in an actual game, so we’ll be using Cocos2D for that. If you’re curious to learn more about Cocos2D, check out some of our other Cocos2D tutorials. If you are new to Cocos2D, you can still follow along with this Texture Packer tutorial, but there may be some missing gaps in your knowledge about Cocos2D itself as the focus will be on TexturePacker.
This Texture Packer tutorial will show you how to use Texture Packer to create and optimize sprite sheets in your games, using a Cocos2D 2.X game as an example.Īlong the way, you’ll learn how to use pixel formats and Texture Packer wisely to make sure your games launch quickly, run smoothly, and use as little memory as possible – while still looking good! When making 2D games, it’s important to combine your sprites into large images called sprite sheets, in order to get the best performance for your games.Īnd Texture Packer is a great tool that makes it extremely easy to generate these sprite sheets – with the click of a button.
Update : Fully updated for Cocos2D 2.1-rc0a, Texture Packer 3.07, and Modern Objective-C style (original post by Ray Wenderlich, update by Tony Dahbura). GDX Texture Packer can be of aid when you're looking to manage your libGDX textures: if you need a GUI for that, you have it here.Optimize texture usage with Texture Packer and Pixel Formats! jpg, and elect to have the program pack your files. When all is done, you may choose to export in. Duplicate padding and edge padding functions are also usable, as well as aliases, which work to get rid of jagged texture edges. You can add padding to your textures to smoothen them out, and you can also increase or decrease their quality to save space. You can also change the min and mag filter, as well as the minimum and maximum page dimensions. RGBA88, LuminanceAlpha, and more such encoders are among the options. To test it out, we loaded in the sample textures from the test-me! folder that came in the archive, and started modifying the pack's settings.Ī bunch of the textures' properties can be changed in the Settings menu: for one, you can start by changing their encoding, where plenty of formats are available.
jar extension and works on its own, without requiring any additional config files or anything of the sort.
When it comes to setting up the tool, there isn't much to be done other than unpacking the archive, then starting it up. Distributions of libGDX come with texture packers, and if you're on the lookout for a GUI for such a thing, the GDX Texture Packer provides a much-needed interface to help users better manage their projects. LibGDX is one such platform, and it grants users the possibility to create cross-platform games, thanks to its streamlined environment. Open-source and free-to-use game development frameworks have been surfacing over the last few years, granting developers more opportunities to create new games. There's a lot to work on when it comes to game development, and designing and managing textures numbers among them.