Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way of using animated objects of GIF format #465

Open
ghost opened this issue Oct 1, 2018 · 2 comments
Open

A way of using animated objects of GIF format #465

ghost opened this issue Oct 1, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 1, 2018

Is it possible to use GIF images for animation? This would have made life a lot easier. Certainly would have become much more flexible for noob developers like me who can't use Gosu::Image.load_tiles properly. Not to mention the popularity of the format around the globe is pretty high.

@jlnr
Copy link
Member

jlnr commented Oct 1, 2018

Loading images from GIF seems simple enough. stb_image almost supports animated GIF files out of the box – note to self, search for "animated" here and there are some pointers: https://github.com/nothings/stb/blob/master/stb_image.h

It wouldn't really be an animation though, because Gosu has no concept of animations or time. It would be a new method (or an extra parameter to Image.load_tiles?) that would return all frames of an animated GIF file, in order, as an array of Gosu::Image.

@ghost
Copy link
Author

ghost commented Oct 4, 2018

Yes! That'll be awesome enough!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant