GIFPlay - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Expanding Horizons (Libraries) (https://qb64phoenix.com/forum/forumdisplay.php?fid=21) +---- Forum: a740g (https://qb64phoenix.com/forum/forumdisplay.php?fid=55) +---- Thread: GIFPlay (/showthread.php?tid=2217) |
GIFPlay - a740g - 11-30-2023 This is an animated GIF player library written purely in QB64-PE. I was kind of annoyed and frustrated with the issues in the animated GIF library implementation we have listed in the wiki. Unfortunately, InForm's GIF support is derived from the same code, and it suffers from the same limitations and issues. Basically, it does not support frame local color tables and does not correctly support all of GIF's frame disposal methods. So, I set out to write an animated GIF library that can work standalone and also with InForm-PE. The latest version of the library will always be a part of InForm-PE. You can find the code inside InForm-PE/InForm/extensions. I am also attaching a standalone zip file here. This zip file contains just the GIFPlay library, demo and its dependencies. Library documentation is here: InForm-PE/InForm/docs/GIFPlay.md You'll find some other useful (?) stuff in the InForm/extensions directory. Cheers! RE: GIFPlay - FellippeHeitor - 12-01-2023 Great improvement! Thanks for that! RE: GIFPlay - grymmjack - 12-01-2023 @a740g This is great work! Would it be possible to use only the GIFPlay components outside of inform? Or are there requirements for inform too? I guess what I'm asking is, as I've not used InForm yet myself, how would I integrate something like this in for example a formless thing like a game? Thanks as usual RE: GIFPlay - a740g - 12-02-2023 (12-01-2023, 10:39 PM)grymmjack Wrote: @a740g This is great work! Would it be possible to use only the GIFPlay components outside of inform? Or are there requirements for inform too?Certainly we can. That's how I designed it. Example below. I've also include this example in the zip file and updated the first post. Also see https://github.com/a740g/InForm-PE/blob/master/InForm/docs/GIFPlay.md for complete documentation. I might just add FLI / FLC and aseprite support in the future. Code: (Select All)
RE: GIFPlay - grymmjack - 12-05-2023 <3 Asesprite! Ok I will check what you shared. RE: GIFPlay - grymmjack - 12-05-2023 @a740g this is excellent! Could you possibly add a way to jump to a frame, then we could use this for a stack of animation for our sprites. E.g idle - frame 1-2, walk - frame 3-5, jump = frame 6-10 etc. Then we could do in our code check and loop over frames, stop playing walk on first frame of idle, etc RE: GIFPlay - a740g - 12-05-2023 (12-05-2023, 05:24 AM)grymmjack Wrote: @a740g this is excellent! Could you possibly add a way to jump to a frame, then we could use this for a stack of animation for our sprites. E.g idle - frame 1-2, walk - frame 3-5, jump = frame 6-10 etc. That's a good idea. I was going to add seek support. The only reason I did not do that is because of GIFs last-frame dependencies. It can cause weird artifacts with some GIFs if you seek to a random frame. The only way I can get past the frame dependency issue is if I completely pre-render every frame. That's the plan anyway. Once I have the base framework locked, I'll start adding FLI/FLC and aseprite support. Maybe we can also do a PlaySegment(m, n) kind of routine, where it only loops from frame m to n. That way you'll not even have to check and manually loop frames. We can also do reverse loops. RE: GIFPlay - grymmjack - 12-05-2023 (12-05-2023, 08:56 AM)a740g Wrote:(12-05-2023, 05:24 AM)grymmjack Wrote: @a740g this is excellent! Could you possibly add a way to jump to a frame, then we could use this for a stack of animation for our sprites. E.g idle - frame 1-2, walk - frame 3-5, jump = frame 6-10 etc. That is awesome to hear! Yes ! I will help test! This is huge! Opens up tons of possibilities for easy game making with just GIFs! |