![]() Make sure to check Force identical layout – Corona SDK needs this since it can only load 1 single. That means that the main sheet is scaled down by a factor of 0.5 and the is replaced with “.” – which results in projects/a and projects/sheet.png. It also adds a scaling variant in the center view – with a scale factor of 0.5 and an extension of “.”. ![]() ![]() This fills the main extension with – that’s the part of the file name from the main sprite sheet that gets replaced to create the other resolutions. Select corona from the Presets and press Apply. This opens a popup window, as you can see on the next screen shot: To add the scaled-down resolution for older devices, click on the cog wheel next to AutoSD. If you press Publish now you should see a single sprite sheet – consisting of a. tps file (which is TexturePacker’s save file format) – so if you move your project, just make sure that the basic file layout is identical. To set Data file open the file dialog with the “…” button and navigate to For Texture file navigate to path will be displayed as an absolute file path, but don’t worry – TexturePacker stores all paths relative to the. Set the Data Format to Corona SDK (image sheet) and choose PNG as the Texture format – which should be the default. Sprites from subfolders are also added – they will have the folder name as part of the sprite name – e.g. TexturePacker monitors this folder – any change made to a file will be updated in the sprite sheet as soon as you re-enter TexturePacker. It creates a tree view on the right with a small icon for each sprite loaded. TexturePacker scans the contents of the folder and adds all known image formats. Now you should start by adding your assets: Drag and drop the complete assets folder onto the right pane. You should use the trial version for this tutorial.Īfter installation and your agreement to the license terms, you should see an empty TexturePacker screen. You can use it for free with some restrictions or buy the full version. Creating the main sprite sheetĭownload TexturePacker, available for MacOS and Windows. The assets and the project can be downloaded here: CoronaSDK-TexturePacker-Tutorial.zip. TexturePacker will create the scaled assets for you – on the fly. So let’s see how you can use them in your game.įor this you are going to do a simple setup with some graphics – and content scaling. Now you know why sprite sheets really help you to improve your game. The first thing that comes to mind is placing all those graphics in your game’s folder and loading each one of them.īut that’s a very bad idea! Why? Reducing memory consumption You paint them yourself or your artist delivers them – usually as PhotoShop PSD files, Flash animations, or already prepared as. Improving your gameįor a game, you always need graphics – backgrounds, characters, objects. In this post, I want to help you to make your game better by using less memory and getting higher frame rates. Our goal is to help people to create awesome games by offering professional high quality tools.Ĭurrently we have two tools that work with Corona SDK: TexturePacker, which allows you to create sprite sheets that you can use with your game in less than 20 seconds, and PhysicsEditor, a physics body editor you can use to automatically trace the outlines of your game objects, creating collision shapes in seconds. I am Andreas Loew, founder of Code’n’Web. Learn more about TexturePacker, as well as how to use less texture memory and improve your game’s performance. Best of all, the extremely fast layout algorithm shows all changes in realtime. Offering a full-featured graphical user interface, TexturePacker includes multi-touch support, zooming, and a tree view with all used sprites. Today’s post comes to us from Andreas Loew, the Founder of TexturePacker.
0 Comments
Leave a Reply. |