Is Gosu capable of handling SpriteSheets, either via a plugin/library or natively?

73 Views Asked by At

If SpriteSheets can be handled which library would be best to use and can it be done natively?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, Gosu can natively handle spritesheets. Using Gosu::Image.load_tiles(window, path, width, height, tileable?) (where width and height is the size of single sprite (if you're not sure what is the size of single sprites, but know that spritesheet will be ex. 8x8 sprites, use negative values to divide)) will create an array (1d) of Images from given file. You can then access them in other methods, such as draw