Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: A quick question about how a spritesheet needs to be structured  (Read 1619 times)

0 Members and 1 Guest are viewing this topic.

DevilEdge

  • Newbie
  • *
  • Posts: 28
    • View Profile
Hi there,

If I were to use the SFML tilemap example, how does the spritesheet containing all of the tiles need to be like? For example, what's the padding between the tiles, etc. Also, if anyone can recommend any good tools for creating tiles/spritesheets that'd be awesome as well.

Thanks!

PsichiX

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: A quick question about how a spritesheet needs to be structured
« Reply #1 on: August 18, 2014, 09:37:00 pm »
good app to make spritesheets: Texture Packer.
good free app to make spritesheets: Sprite Sheet Packer for Starling.

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: A quick question about how a spritesheet needs to be structured
« Reply #2 on: August 18, 2014, 09:39:26 pm »
The only requirement is that you can come up with the right rectangles to pass to setTextureRect() or build your vertex array out of.  SFML doesn't really care how you structure the spritesheet since it's on you to give it those rectangles/vertices.  Most of the library is like this; it provides the tools you need to get started and stops there, so that you're free to use them any way you want.  Structure your spritesheets based on what makes things easy for you.

Regarding tools, I've never used any myself, but I have seen a ton of posts on this forum about this specific one: http://en.sfml-dev.org/forums/index.php?topic=3023.0  I can only assume that means it's decent.
« Last Edit: August 18, 2014, 09:41:23 pm by Ixrec »

 

anything