Hello Guest

Author Topic: Sprite map from multiple images  (Read 3845 times)

0 Members and 1 Guest are viewing this topic.

Fatesauce

  • Member
  • Posts: 26
    • View Profile
Sprite map from multiple images
« on: July 09, 2015, 09:09:43 PM »
I have 11 separate images I need to use for the animation of a single entity.  Is there an easy way to collate these images into a spritemap without physically copy/pasting them into a single image file?

Kelly

  • Member
  • Posts: 3
    • View Profile
Re: Sprite map from multiple images
« Reply #1 on: July 09, 2015, 09:47:19 PM »
To the best of my knowledge, Spritemaps rely on a single texture to choose frames from, so you can't pass it multiple images. Copy/pasting the images into one file is probably a lot simpler than any other solution.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Sprite map from multiple images
« Reply #2 on: July 09, 2015, 09:53:54 PM »
Hmm yeah I wonder if there's a way I can just load different textures into a Spritemap... or maybe make a new class that's like a SpritemapMulti or something.  Defining animations for a spritemap with multiple textures might be a little tougher since it would need both the frame and the spritemap source for each frame of animation.

For now you can probably make your own class that can manage multiple sprite maps.

Fatesauce

  • Member
  • Posts: 26
    • View Profile
Re: Sprite map from multiple images
« Reply #3 on: July 09, 2015, 11:37:29 PM »
No worries. Thanks for the info!

floatvoid

  • Member
  • Posts: 11
    • View Profile
Re: Sprite map from multiple images
« Reply #4 on: July 10, 2015, 04:50:19 PM »
This is actually something I'm going to be working on soon. I have some characters with a lot of animations, and I don't know for sure that all the frames are in the same file at runtime.

When I get around to this for my game, I'll change the spritemap system to allow for multiple images, and I'll do a pull request on the repo
@floatvoid on twitter