How to use uneven sprites? - Printable Version +- The VG Resource (https://www.vg-resource.com) +-- Forum: The Resources (https://www.vg-resource.com/forum-109.html) +--- Forum: The Spriters Resource (https://www.vg-resource.com/forum-110.html) +---- Forum: Ripping Help (https://www.vg-resource.com/forum-114.html) +---- Thread: How to use uneven sprites? (/thread-28489.html) |
How to use uneven sprites? - regiostech - 01-05-2016 Hi guys. I'm a programmer who's interested in game dev, so I'm trying to start with 2D. Spritesheets make sense to me when used programmatically, so I thought I would try to use some from SR. The thing, though, is that all of the sprite sheets in the tutorials I've used have been uniformly spaced, and you knew the sizes of each sprite beforehand. But with a spritesheet like this one, there are things like a watermark on the sheet, and the different animations are different sizes. http://www.spriters-resource.com/resources/sheets/64/67255.png I've been Googling a lot, and I'm still confused. Should I just split it into different sheets, and then try to work out the frame sizes myself? Or is there an easier way? Thanks in advance, really appreciate the hard work you guys do. RE: How to use uneven sprites? - Ploaj - 01-05-2016 Watermark? Where do you see that at? The spacing will depend on the game they are ripped from. For that one, each animation is a separate file in-game, so they have different widths and heights for each animation. How you use them programmatically is up to you. You could rearrange them all to be evenly spaced, or program a way to hold the width and height for each animation separately. It depends, really. RE: How to use uneven sprites? - puggsoy - 01-05-2016 Like Ploaj said, it all depends. Personally, I would just leave the boxes how they are, and load the animations separately. Depending on whether the engine supports spaces between frames, I might make a script or something to remake each row without gaps. It would get tedious to specify the dimensions for each animation, but you could possibly make something to detect them. For instance if each animation is separated into a single-row strip with no gaps, and you simply specify the number of frames, dividing the total width by the number of frames gives you the frame width, and the frame height is just the total height. In any case I would recommend that, unless your working with few animations, writing animation information (dimensions, frame numbers, speed or whatever) should probably be stored in external files and not straight in your code. That way you can just write animation loading code and can make small tweaks without recompiling the whole program. Maybe you can even write something to help generate these files. Also keep in mind that, for the most part, sheets are made for viewing and studying the sprites, rather than usage. We do try to display them in a usable manner, especially when we're able to use animation info. A lot of older games are hard-ripped though, and the sprites are usually arranged in a way that, while fine for viewing purposes, is unusable for programming without making your own sheets from them. For example see this sheet. I'm also not sure what you mean by watermark; even if you mean tags, there isn't one on the sheet you linked to. RE: How to use uneven sprites? - regiostech - 01-08-2016 Thanks for the help guys, appreciate it. And yeah, by watermark, I meant tag, just couldn't think of the word. |