6/8/2023 0 Comments Gideros set sprite of textureFast development Easy learning curve, instant testing and the ability to create custom native plugins reduces development time.Dozens of open-source plugins are already developed and ready to use: ads, in-app purchases, physics for 2d or 3d, Steam integration and many more. Import your existing (C, C++, Java or Obj-C) code, bind to Lua and interpret them directly. Extensive plugins You can easily extend the core with plugins.Cross-platform: Apart from supporting multiple platforms, Gideros also provides automatic screen scaling and automatic selection of proper image resolution, which makes supporting different screen resolutions, aspect ratios and universal projects an easy task.Full development set: Get everything you need from the start, including a lightweight IDE, players for Desktop and mobile devices as well as tools to manage your assets (Texture Packer, Font Creator).Native speed: Developed on top of C/C++ and OpenGL or Metal, your game runs at native speed and fully utilizes the power of CPUs and GPUs underneath.Instant testing: While developing your game, it can be tested on a real device through Wifi in only 1 second – you don’t waste your time with an export or deploy process.It is completely free for personal and commercial projects. Free: Gideros is an open source project.Code your game once and deploy to Android, iOS, MacOS, tvOS, Windows, HTML 5 and more. It is easy to pick up, quick to develop and robust to deploy. Gideros is a cross-platform development environment for creating amazing games and interactive applications in 2D or 3D. X,y,w,h = region:getRegion ( ) if w > maxWidth then maxWidth = w end if h > maxHeight then maxHeight = h end table.Gideros Cross-Platform Development Environment Self.maxHeight = 0 - READ TEXTURE ATLAS DATA, CREATE TIMELINE FROM IT for line in io.lines (dataFile ) do Local Pack = TexturePack.new (dataFile, imgFile ) local maxWidth = 0 local maxHeight = 0 local frames = Is there a way to do so to avoid hardcoding the image names of a texture atlas in the actual project code? I want to avoid unnecessarily blowing up my code, but also the need to change my code again if I decide to replace the anim.txt with another one at a later time.ĪnimClip = Core.class ( ) - METHOD: CREATE NEW ANIMATED MOVIECLIP FROM A TEXTURE ATLAS - function AnimClip:init (dataFile, imgFile, loop ) local line, Region, name So is it possible to extract the image names from a texture pack and create a list of images like this?Īlso, if it would be possible to numerally loop through a texture pack's texture regions like this, there would be no need to use self.anim anymore to store references to them. txt file as exported from Texure Packer and avoid hardcoding the image names in my actual code. txt file (where all images used on the sheet are already defined by name).īut as I understood, I additionally have to "hardcode" the image names in my code then:īitmap.new(pack:getTextureRegion("anim_01.png")),īitmap.new(pack:getTextureRegion("anim_02.png")),īitmap.new(pack:getTextureRegion("anim_03.png")), Local pack = TexturePack.new("anim.txt", "textureSheet.png") ![]() ![]() Hm, when I define a texure pack like this: The reference is very unclear and confusing on that -or did I miss some "magic" tutorial section here where all this is explained in detail? o.O ![]() What does the content in an anim.txt file stand for? I assume that the strings are just name identifiers for each individual frame (and can be changed to anything else), while the next four numbers on a row define the x,y,width and height of this individual texture region -but what about the other four numbers? TexturePack.new(textures, padding, filtering, options)Īnd how should the "textures" parameter look like? A string? Or a table? And if this parameter is a table, what properties should it contain and in what order?ģ. Whereas the docs specify TexturePack.new() like this: Local pack = TexturePack.new("anim.txt", "anim.png") In the Texture Pack example, TexturePack.new() is used like this: So which one should be preferred? I am using a texture atlas exported from Texture Packer (non-uniform / different sized frames) and want to create an animated sprite from it.Ģ. Then I searched the example codes and found three different things: the bird animation, gtween and the Texture Pack example.ġ. There is a class named MovieClip but it seems that those MovieClip thingies are static images whose properties can be tweened only. The docs are more than confusing regarding that. After switching from Corona to Gideros I was looking for a method to create animated sprites / movie clips from a texture sheet.
0 Comments
Leave a Reply. |