I also have an older text tutorial but it goes into a bit less detail. Just a few weeks ago I published a pretty indepth video tutorial on using texture packer, atlases and such with LibGDX. Finally we stop by creating a sprite, then look at position, rotating and scaling. If youâre completely new to game dev and have never developed a game before, this (even more straight-forward) tutorialby tann is also worth a look as an alternative. This means that you let the AssetManager load the TextureAtlas and you manage getting the regions out of it yourself. We then look at the skeleton project that is created for us, the coordinate systems, loading a texture. Tutorials After you have createdyour very first libGDX project, we highly recommend our A Simple Gameand Extending the Simple Gamepages. 1 Answer Sorted by: 1 You don't, the asset is the TextureAtlas, not the individual TextureRegions. We cover the basics of a LibGDX project, project layout and adding assets. Sort input files by name to avoid platform-dependent atlas output // changes. Im making a 2d platformer in libgdx as my first project and in researching things Ive come across texturepacker. In this tutorial we look at coding our very first LibGDX application. Public class LibGDXTexturePackerLauncher IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. And I'm using the 0.9.3 version of libGDX. This tutorial is based on the Pro version of TexturePacker 2.4.2. This tutorial walks through the most basic aspects of using it with libGDX. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. Then just do: TextureAtlas at new TextureAtlas ( Source // The MIT License (MIT) // // Copyright (c) 2015 Arian Fornaris // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: The above copyright notice and this permission // notice shall be included in all copies or substantial portions of the // Software. A AtlasRegion is an TextureRegion that contains. Note that an atlas can contain multiple texture files. This file is typically created with the TexturePacker tool. You typically load a TextureAtlas from a file which holds all information about the atlas. IntroductionHere is the source code for . A TextureAtlas is a container for both one or more Texture s and the regions it contains.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |