

Var texturePackerCmd = '"C:\\Program Files\\CodeAndWeb\\TexturePacker\\bin\\TexturePacker.exe" ' Luckily, TexturePacker comes with a command line companion, so it is very easy to automate the process. So, why not use gulp to script the boring stuff? The overall logic will be: when some changes occur in the image folder(s), launch TexturePacker to republish the texture. We extensively use gulp as task automata. And then your realize that you simply forgot to repack! In addition, for sure, you will face the situation where you edited some images but the changes are not reflected in the game, and you begin to shake your brain asking yourself: “why? doesn’t work now! why? It worked two minutes ago …unreliable developers!”. Dealing every time with the tool can become quite annoying. Suppose you are the graphic designer in the creative phase, i.e. Default 256 paddingMode:number, Defines the padding style of the packer (SUBUVWRAP, SUBUVEXTEND, SUBUVCOLOR). Default 8 frameSize:number, The base size of the frames before padding is added. This file includes the source images (you should import the whole folder) and the output file, thus the workflow becomes: Default TexturePacker.LAYOUTSTRIP colnum:number, If using LAYOUTCOLNUM will define the number of columns to use. tps file, that contains all packing configurations you set. addtexture() will return an AtlasTexture, this is the texture you want to use in your classes. It even comes with a handy gradle plugin if needed. Add every texture you want into it using its API (addtexture()), and then call merge(). Texture Packer Edit on GitHub LittleKt comes with its own version of packing textures into an atlas. TexturePacker allows to save a project, a. This is the class that can merge textures. For extensive help, you can refer to the online guide.

Just open the tool, put your images and generate the texture. Thanks to tools like TexturePacker the process of packing sprite is straightforward. Of course, if the game is very simple and has no loading screen, you can group all images at once. By packing the images per level the benefits are vastly more than the extra memory used. Don’t be scared to repeat some images used by multiple levels. The trick is to group all images in logical containers, usually related to loading stages, for example all images for level 1, level 2… In this way, you have to organize all graphic assets in different folders. This allows to batch all the drawing calls involving the same texture in one single call, gaining a huge performance benefit. Packing merges all images in a single texture. Our upcoming game Aedo Episodes uses sprite packing technique to dramatically reduce draw calls. Mobile phones have limited graphic performances, therefore to achieve a good gaming experience developers must adopt various strategies. When it comes to mobile games, graphic assets management can be a serious pain.
