[XP] RMXP Sprite Animator

Started by G_G, August 17, 2010, 06:27:39 pm

Previous topic - Next topic

G_G

August 17, 2010, 06:27:39 pm Last Edit: August 17, 2010, 06:29:53 pm by game_guy
RMXP Sprite Animator
Version 1.0



Intro

Trying to share your sprites? Or give previews of them? You want to animate the walking direction you say? No problem. This small nifty program takes any ordinary RMXP Character Sprite and transforms each direction into a walking gif.


Features

  • Works on any size RMXP Sprite
  • Can export each direction individually
  • Can export each direction in a single file
  • Small and easy to navigate



Screenshots

Heres what the GUI looks like. Small, maybe a bit uneven. But perfect.
Spoiler: ShowHide



Heres what it can produce.
Individual Files: ShowHide

Single File: ShowHide



Download

Download


Help

Once you run the program. Everythings basically self explanatory. However there is a "Help" option under the "Help" menu.


Credits

  • Ronnie Mooney (this is me) ~ For making it
  • Dwellercoc ~ For requesting it
  • Special thanks to the creators of NGif or else this wouldn't have been possible. (Possible for me anyways)



Known Bugs

These do not always happen. Its odd. Its only happened to the following sprites.
"001-Fighter01" and "002-Fighter02".

If a sprite has a colored background, it'll make most of it transparent, but will however leave a few pixels behind in the bottom right corner. (Only on 001-Fighter01)

If a sprite has a transparent background, it'll do the same as above. Leave a few random pixels in the corner.
EDIT: Actually, sometimes you can't tell but it leaves a few white pixels there. I'd fix it but I dunno how. Sorry :(

If you export the file as a "Single" file, you'll get an error. Saying "Cannot access {file name here}. Its being used by another process. Not sure whats causing it, but for the most part, just click Continue and it'll be fine.


Notes

Enjoy! If you run into any problems let me know.

Dweller

Great work game_guy, lvl up!

I made a few test and is just was I looking for. The pixel bug is not important for me.

This one is a monster that I´m working on:


Thanks again.
Dwellercoc
Spoiler: ShowHide

poxy

This could be really handy. I'll have to try it out. :)
My Project: ShowHide

element


G_G


stripe103

Really good idea but I get two errors.

System: Windows XP Home Edition
Service Pack: 3

When trying to load the graphic: ShowHide

Code: Error dialouge

Unhandled exception has occurred in your application. If you click
Continue, the application will ignore this error and attempt to continue. If
you click Quit, the application will close immediately.

Could not find a part of the path 'C:\Documents and
Settings\Markus\Mina
dokument\RMXP\Testproj\Graphics\Characters\Tmp'.

"Mina dokument" is swedish for My Documents, not that much of a change really.


And then, in the details
Code: Details
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Documents and Settings\Markus\Mina dokument\RMXP\Remexos\Remexos\Graphics\Characters\Tmp'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
  at System.IO.DirectoryInfo.GetFiles(String searchPattern, SearchOption searchOption)
  at System.IO.DirectoryInfo.GetFiles()
  at RMXP_Sprite_Animator.Form1.button1_Click(Object sender, EventArgs e)
  at System.Windows.Forms.Control.OnClick(EventArgs e)
  at System.Windows.Forms.Button.OnClick(EventArgs e)
  at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ButtonBase.WndProc(Message& m)
  at System.Windows.Forms.Button.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
   CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RMXP Sprite Animator
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase: file:///C:/Documents%20and%20Settings/Markus/Skrivbord/RMXP%20Sprite%20Animator.exe
----------------------------------------
System.Windows.Forms
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3614 (GDR.050727-3600)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
   <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.



When trying to exit, either from the File menu or the X button: ShowHide

The error dialouge is exactly the same, but the details is not.
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Documents and Settings\Markus\Mina dokument\RMXP\Remexos\Remexos\Graphics\Characters\Tmp'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
  at RMXP_Sprite_Animator.Form1.Form1_FormClosed(Object sender, FormClosedEventArgs e)
  at System.Windows.Forms.Form.OnFormClosed(FormClosedEventArgs e)
  at System.Windows.Forms.Form.WmClose(Message& m)
  at System.Windows.Forms.Form.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
   CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RMXP Sprite Animator
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase: file:///C:/Documents%20and%20Settings/Markus/Skrivbord/RMXP%20Sprite%20Animator.exe
----------------------------------------
System.Windows.Forms
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3614 (GDR.050727-3600)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
   <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


legacyblade

A way to fix that error is to create a folder called tmp in the same directory as the sprite. And if you want to avoid another error, save the sprite in a different folder than the original sprite is in.

stripe103

Yea, it did work, but since the program removes the directory when closing, I have to make a directory each time I open it. It is better to have the program save the temporary files in the tmp directory that it creates on the desktop when opening. Also, the exit error. I found out that it only appear after I've got the open error. If I try to close it before getting it, it goes perfect.

G_G

The programs supposed to automatically create the Tmp directory at startup. If anything try running it as Admin.

stripe103

It creates the diectory at the desktop, but searches for it in the graphics's folder.
Also it can't get much more admin on Win XP.

G_G

August 19, 2010, 10:09:30 pm #10 Last Edit: August 19, 2010, 10:25:56 pm by game_guy
I'll look into the code but I'm positive nothings wrong. O.o

EDIT: Try re downloading it now. I added a variable that declares the directory path of the application.

stripe103

I think you missed a back slash.
Could not find a part of the path 'C:\Documents and Settings\Markus\DesktopTmp'.

Blizzard

Lol, seems G_G forgot a backslash character. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

August 20, 2010, 11:27:49 am #13 Last Edit: August 20, 2010, 11:48:42 am by game_guy
Fuck. I can't fix it til later anyways. :( Got stuffs to do

EDIT: Now try. Updated it real fast and uploaded it.

poxy

Mine testing confirms it's a pretty handy prog. I found a great use for it to preview the animation.
Though I got some bugs to report.
Saving as separate produces mychar.gif_1.gif, etc... even when .gif not added in. No big deal, but just want to bring it up.
Saving as single gives an error, Unhandled exception:
Spoiler: ShowHide

System.IO.IOException: The process cannot access the file 'D:\Documents and Settings\poxy\Desktop\rpgxp scripts\scale2x\kid_t_anim.gif' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
   at System.Drawing.Image.Save(String filename, ImageFormat format)
   at RMXP_Sprite_Animator.Form1.button2_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3615 (GDR.050727-3600)
    CodeBase: file:///D:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RMXP Sprite Animator
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/Documents%20and%20Settings/poxy/Desktop/rmxp%20sprite%20anim/RMXP%20Sprite%20Animator.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3614 (GDR.050727-3600)
    CodeBase: file:///D:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Gif.Components
    Assembly Version: 0.0.0.1
    Win32 Version: 0.0.0.1
    CodeBase: file:///D:/Documents%20and%20Settings/poxy/Desktop/rmxp%20sprite%20anim/Gif.Components.DLL
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///D:/windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///D:/windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------


Though it still saves the gif.
I didn't notice the bugs others mentioned, though.
My Project: ShowHide

Blizzard

G_G, always use try-catch blocks when working with files and display error messages to the user rather than letting the app crash like this. e.g.

try
{
    StreamReader reader = FileStream("file.ext");
}
catch (FileNotFoundException e)
{
    MessageBox.show(e.Message);
}
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

I actually said that it does that in the known bugs. And I also know why. Just not sure how to go and fix it.

Dweller

g_g it will be difficult to improve an option so you can set the spritesheet grid (numer of columns and rows). I´m think in Minkoff's Animated Battlers (4x11) or 8x4 Blizz-ABS attack weapons (for example)
Dwellercoc
Spoiler: ShowHide

G_G


Dweller

Quote from: game_guy on August 27, 2010, 10:13:23 am
I'll see what I can do.


are you still on this?

Also I want to ask you that if is posible to change the single export gif order. Actually the order is front, left, right, back. If you could change it to front, left, back, right (or front, right, back, left) the gif will follow a logical rotation (i hope you understand what I want to explain).
Dwellercoc
Spoiler: ShowHide