I haven't started building my games yet. But this seems like a must-have. Thanks.
sprite_add_gif for GameMaker
A downloadable extension
Quick links: source code
Supported platforms: All (see notes below)
Supported versions: GameMaker Studio≥2.3
- sprite_add_gif(path, xorigin, yorigin, ?delays_array)➜sprite
Equivalent of sprite_add. Path should point to a valid GIF file.
delays_arrayis provided (optional), per-frame delays (in centiseconds) will be pushed to it, allowing for accurate playback (see demo project).
- sprite_add_gif_buffer(buffer, xorigin, yorigin, ?delays_array)➜sprite
Same as above, but takes a buffer with GIF file inside.
GifHx script into your GMS≥2.3 project.
- As a pure-GML extension, it isn't super fast.
Doing LZW decompression in GML hurts! (though slightly better with YYC)
Probably don't use this to load multi-megabyte GIFs.
It may be possible to optimize the code a little.
- As of beta runtime 220.127.116.11, doesn't work on HTML5 due to a code generation bug.
This will probably get fixed sometime soon.
- Note that the example project is mostly intended for Windows because GM doesn't implement file dialogs on other platforms.
The default sample GIF will still load though!
Click download now to get access to the following files:
- GMS1 versionMay 08, 2023
Log in with itch.io to leave a comment.
It might be perfect for an animated logo after the splash screen, if hopefully works on android build. I will try it sometime in the future when the game is almost finished
If a logo is pre-determined, you could very well add it as an actual sprite and assign it into a separate texture group so that it doesn't take up any space used by in-game imagery.
The extension should work fine on Android though.