Skyfall
Skyfall

Reputation: 35

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

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

Upvotes: 1

Views: 68

Answers (1)

Google
Google

Reputation: 80

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

Upvotes: 0

Related Questions