Taleforge Posted November 27, 2014 Report Share Posted November 27, 2014 Hi, is it possible to create a sprite with multiple atlantes? Lets say I have two atlantes (hope this is the right plural of atlas?) ... one with the normal animations of a character (that I need on every stage in the game) and one with some stagespecific animations. When the player now enters that specific stage, that needs extra animations I want to create that character sprite with the frames from the base-atlas and the special-atlas. I expect that the two atlas would be merged - overriding frames that have the same name in both atlantes. Is this currently possible?If no: would it be realisable without impacting the performance too hard? Thanks in advance Quote Link to comment Share on other sites More sharing options...
eguneys Posted November 27, 2014 Report Share Posted November 27, 2014 I suggest create two different sprite classes for your character, where each class use different atlas, and just use the related character sprite as fit. Quote Link to comment Share on other sites More sharing options...
Taleforge Posted November 28, 2014 Author Report Share Posted November 28, 2014 Hi eguneys, Thanks for your reply. That was my first attempt too, but I was hoping that there is a better way than this?Because I would have to reassign listeners and so on, when i switch to the other sprite. Quote Link to comment Share on other sites More sharing options...
lewster32 Posted November 28, 2014 Report Share Posted November 28, 2014 With the current animation system there's no way to specify more than one source texture, you'd have to work this in someway yourself either via eguneys's method or via changing the texture of the sprite dependent on which animation you need to play if you need to keep the sprite itself. Changing the texture will cause a small performance hit but I doubt it'll be a problem unless you're doing it lots. The optimisation strategy will be in keeping regularly played animations together so the switching happens as little as possible. Quote Link to comment Share on other sites More sharing options...
Taleforge Posted November 28, 2014 Author Report Share Posted November 28, 2014 That is a nice idea! I will try that.Thank you very much. Would it be a good idea to place a feature request for this? Quote Link to comment Share on other sites More sharing options...
lewster32 Posted November 28, 2014 Report Share Posted November 28, 2014 It's come up a couple of times so it's probably worth mentioning, though I'd check first to see if anyone else has made a FR for this - I'd be surprised if no-one has. I think the problem is that the whole point of the animation system is to provide a very fast, easy way to change the current frame of the texture over time, and adding in multiple textures will probably muddy the waters of what is a fairly elegant system at the moment. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.