UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.18k stars 222 forks source link

Export sprites as gif #1204

Open coretheguy opened 1 year ago

coretheguy commented 1 year ago

Which component should be improved?

Other

Describe your feature suggestion in more detail

Add a script to export all sprites as gifs (in some cases, easing up on accessing the folder in programs such as Aseprite and making importing into other programs much easier)

OPTIONALLY: export sprites as spritesheet?

Jacky720 commented 1 year ago

How do you propose to determine the GIF speed? Static 10fps?

Red1Fouad commented 1 year ago

How do you propose to determine the GIF speed? Static 10fps?

i propose 30 fps, the user who wants the gif can readjust the speed with an online gif tool, so it really doesn't matter

PhantomSlash64 commented 1 year ago

I got an idea that would help with this, what is you convert the playback speed for a sprite into milliseconds and assign that to the current frame its extracting from into the GIF file.

Jacky720 commented 1 year ago

The issue with that is that playback speed is usually defined in game code, which is nigh-impossible to trace back to the sprite and not even guaranteed to be consistent.

As for 30FPS, that should be possible. We just need a C# GIF encoder library.

TurtMaster2000 commented 1 year ago

The problem is that not everything when loading came in as a GIF, if you can reload the possible sprites as GIFs and then attach the following to the "Images" file, it should possibly work, assuming that the matter has no internal script issues. If so, you should be able to transform your picture into each frame, that is, as above, the encoder library, in the script and play those according to your speed. Get back to me if this works and keep trying for it!

XDOneDude commented 1 year ago

im searching for a c# gif encoder

TurtMaster2000 commented 1 year ago

Amazing, we should be able to fix that issue very soon. It might be helpful if we take a encoder library and apply it, then download it into the mod itself. I don't know if you already had that in mind but that is just my idea.


From: XDOneDude @.> Sent: Wednesday, March 22, 2023 1:42 PM To: krzys-h/UndertaleModTool @.> Cc: TurtMaster2000 @.>; Comment @.> Subject: Re: [krzys-h/UndertaleModTool] Export sprites as gif (Issue #1204)

im searching for a c# gif encoder

— Reply to this email directly, view it on GitHubhttps://github.com/krzys-h/UndertaleModTool/issues/1204#issuecomment-1480000204, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5XK6MSDIICRQOY37L3SBQTW5M2WRANCNFSM6AAAAAAVO4AVJQ. You are receiving this because you commented.Message ID: @.***>

XDOneDude commented 1 year ago

@TurtMaster2000 im creating my own gif encoder, its working fine for now, but i need to add the functions for being good for gamemaker

XDOneDude commented 1 year ago

how i would call my gif encoder for undertale mod tool?

VladiStep commented 1 year ago

how i would call my gif encoder for undertale mod tool?

UndertaleGIFEncoder I guess?

XDOneDude commented 1 year ago

actually is a good idea @VladiStep

TurtMaster2000 commented 1 year ago

You can try that, if not, transfer the file into the hard-coded script and then apply to your IDE.

TurtMaster2000 commented 1 year ago

By downloading on to your computer. (Windows, download into you're OS and then copy and paste to the system, it should work just the same.)

XDOneDude commented 1 year ago

@TurtMaster2000 how do you want could be the library, im taking suggestions from all to my project UndertaleGIFEncoder

TurtMaster2000 commented 1 year ago

Could you refine that sentence please? I don't understand the wording you mean there. (how do you want could be.)

XDOneDude commented 1 year ago

@TurtMaster2000 how much functions do you think it needs my library "UndertaleGIFEncoder"

TurtMaster2000 commented 1 year ago

I'm not sure, I'm not in front of the screen, and don't know what you mean. Do you think you could send a picture of your current Codespace?

TurtMaster2000 commented 1 year ago

I might be able to find out how many you would need then. @XDOneDude

XDOneDude commented 1 year ago

@TurtMaster2000 well i think like 5 functions, the encoder the decoder, the converter, the reader and the stream function

XDOneDude commented 1 year ago

the stream function i think that will help the reader

TurtMaster2000 commented 1 year ago

Sounds good by me.

TurtMaster2000 commented 1 year ago

I'm still learning around here, can you describe Stream function for me? I know I'm really dumb for having to ask this but it would still be help to define it a little more.

XDOneDude commented 1 year ago

@TurtMaster2000 the stream function is an extension of reader that reads 1.5x faster that the reader using old encoders and making it better

TurtMaster2000 commented 1 year ago

Thank You. I'm actually extremely young to be doing this and it's nice to have someone that actually listens to what I ask.

TurtMaster2000 commented 1 year ago

I still know what I'm doing though. Regardless of age.

VladiStep commented 1 year ago

Remember that UndertaleModTool should switch from using System.Drawing.Bitmap, because it's unsupported starting from .NET 7 (and UndertaleModTool should also switch to .NET 7+ eventually). So you should not rely on (System.Drawing.)Bitmap, or else there would be more work for those who will migrate UTMT from using that system library.

TurtMaster2000 commented 1 year ago

Ok Thx.

XDOneDude commented 1 year ago

@VladiStep im creating this encoder in net 7 so that is a problem, undertale mod tool NEEDS to switch to net 7 or it simply not work my encoder

TurtMaster2000 commented 1 year ago

I think the best way to clear up your problem is to switch your Net 7 Encoder. If it doesn't switch then, as written above, it won't work.

XDOneDude commented 1 year ago

well, in the moment finally undertalemodtool switches to net 7 or 8, i think it will work perfectly

TurtMaster2000 commented 1 year ago

But you can't rely on the "in the moment". True though it might be possible though.

XDOneDude commented 1 year ago

just it needs to switch to another thing that functions like System.Drawing.Bitmap that is compatible with net 7 or 8

TurtMaster2000 commented 1 year ago

Correct me if I'm wrong, this is a transference problem right? Where it's isn't reading Net 7?

XDOneDude commented 1 year ago

net 7 uses a different libraries that in my experience, works better than the old libraries, using the old libraries can make compatilibity problems

TurtMaster2000 commented 1 year ago

If it isn't compatible with things like Net 7, it might be your converter function you made with you're Encoder in the first place. Then again I don't know what I'm doing.

TurtMaster2000 commented 1 year ago

Try going back to that old library and program in the old library so there are no compatibility issues.

XDOneDude commented 1 year ago

well in speeds and quality the new are better, but yeah im changing to my encoder

TurtMaster2000 commented 1 year ago

Ok that is a good idea.

XDOneDude commented 1 year ago

i think in 1 month or 2 i will finish the stable version

TurtMaster2000 commented 1 year ago

Can you send me the name of your encoder so I can help during my free time? Also, what is the name of your library?

XDOneDude commented 1 year ago

@TurtMaster2000 actually i didnt make even an alpha version, i recently started

TurtMaster2000 commented 1 year ago

That's is completely fine

TurtMaster2000 commented 1 year ago

I think I have to sign off for the day. I should be able to come back on later, and if not, I'll be here the same time tomorrow. Thank you XDOneDude.

XDOneDude commented 1 year ago

the good thing is that if we did it two together a good encoder, we will make happy hundreds of modders

XDOneDude commented 1 year ago

@TurtMaster2000 i decided what should use undertalegifencoder, ironsoftware.system.drawing

steviegt6 commented 1 year ago

Expecting people to update their project to .NET 7 for your GIF encoder is unreasonable -- why are you rolling your own anyway?

XDOneDude commented 1 year ago

well, i opened net 7 and in major things is compatible with net 6

TurtMaster2000 commented 1 year ago

That is reasonably smart, but with NET 6, wouldn't you have to change your entire converter?

TurtMaster2000 commented 1 year ago

And, yes, I agree you @XDOneDude, we should make it together.

XDOneDude commented 1 year ago

@TurtMaster2000 now ill use another encoder that is compatible with net 6 and 7 so the net 6 problem is gone