OverviewFelgo 2 Support (Qt 5) › TexturePackerAnimatedSprite

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #21128




    I dont know what i am doing wrong, trying to use an texturepacker json file with an spritesheet but nothing shows. I have:


    TexturePackerAnimatedSprite {
    id: welcomeText
    source: "../assets/Images/StartSpritesheet.json"
    frameNames: "WelcomeText.png"
    x: 100
    y: 100




    But when i try to run the code i get the following:

    Warning: TexturePackerSprite could not read the frame information in " "file:///home/isak/.local/share/FelgoLiveClient/pixelspacefight//assets/Images/StartSpritesheet.json\"."


    Earlier the path to the file got autocompleted but that dont happen anymore?




    Felgo Team

    Hi Isak,

    which platform or device are experiencing this problem on? Does it happen with Felgo Live or with custom build and deployment?

    I an run this snippet from the SDK examples on macOS for both Live Client and custom builds:

    import QtQuick 2.0
    import Felgo 3.0
    GameWindow {
      activeScene: scene
      Scene {
        id: scene
        // this uses a single animated sprite, easier access if you do not need to switch between multiple animations where only one is visible
        TexturePackerAnimatedSprite {
          id: squabySpriteAnimatedTP
          x: 20
          width: 32
          height: 32
          source: "squafurTP.json"
          frameNames: ["squafurY/squ1-walk-1.png", "squafurY/squ1-walk-2.png", "squafurY/squ1-walk-3.png", "squafurY/squ1-walk-4.png"]
          frameRate: 20
      }// Scene
    }// GameWindow




    Hello Günther,

    I tried it in the live server on PopOS(based on Ubuntu), it is an older .json that i generated last year from texturepacker. Could it be that i need to genereate a new one? I am thinking that is says that it cant read the information.

    i even tried to put it in the qml folder but got the same error, is there an example with an json file bundled that i can test with?




    Felgo Team

    Hi Isak,

    you can find a TexturePacker example at Examples\Felgo\examples\sprites\spriteAnimations in your installation directory.






    I have now tested out that example and it works. I tested it in Windows 10 but i am sure it works in linux too. I compared mine with your json and it dosent look the same.


    	"filename": "UpgradeButtonUp.png",
    	"frame": {"x":360,"y":451,"w":199,"h":79},
    	"rotated": false,
    	"trimmed": true,
    	"spriteSourceSize": {"x":1,"y":66,"w":199,"h":79},
    	"sourceSize": {"w":200,"h":200},
    	"pivot": {"x":0.5,"y":0.5}


    	"frame": {"x":571,"y":2,"w":29,"h":105},
    	"rotated": false,
    	"trimmed": true,
    	"spriteSourceSize": {"x":25,"y":0,"w":29,"h":105},
    	"sourceSize": {"w":80,"h":160}

    I am guessing that i made the json in an earlier version of texturepacker, and the exporter has changed how it generate the json?

    Anyways it seems to work now i i am guessing i need genereate a new spritesheet to use with Felgo.




    Felgo Team

    Yes, please prepare you JSON in the format that works for Felgo. TexturePacker changes its JSON format from time to time, so some incompatibility is possible, until update the JSON format for the Felgo Sprite types as well.


Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support