Author Topic: (SOLVED!) Replacing Sprites from Sourcefile - Alter Sourcefile Path?  (Read 4016 times)  Share 

Ali

  • AdventureX Crew
  • What will become of the baron?
  • Ali worked on a game that was nominated for an AGS Award!Ali worked on a game that won an AGS Award!
I know this issue has come up many times before... but as I start to update animations for Nelly 2, I'm reminded of what a ridiculous waste of time it is to manually replace hundreds of frames of animation over and over again. (I seem to remember it was a major factor in pushing Theo away from AGS towards a custom engine for The Journey Down, so it is a big issue).

Can anyone suggest something I can do to make it more efficient? Is there a way to create an editor plugin which acts like an action in photoshop and repeats the reloading process for a selection of sprites?

I'm afraid I don't have the programming knowledge to just deal with this myself, but I would like to help if someone could suggest a possible solution?
« Last Edit: 04 Jun 2013, 16:11 by Ali »

For 300 sprites per character it should take only 40 minutes or so to replace them all. It doesn't seem too bad considering the tedium of some of the stuff we do. But if you know what views you need, maybe it would be better to quick import all of the sprites into a new folder, rebuild the views and then delete all the old sprites without having to replace them one at a time?
It is better to light one small candle than to curse the darkness.

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
  • Calin Leafshade worked on a game that was nominated for an AGS Award!Calin Leafshade worked on a game that won an AGS Award!
I actually raised a feature request in the tracker for this a few months ago.

It should be relatively easy to implement, i just haven't gotten around to it yet.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
For 300 sprites per character it should take only 40 minutes or so to replace them all.
Or have a feature that does the same in 30 seconds.  :angry:
BTW, it is usually not the required time, but the tedious routine that stops people from doing things like that.

People invented computers for doing boring work for them. And here we have an example when people must do boring work for computer...
« Last Edit: 04 Mar 2013, 11:05 by Crimson Wizard »

Ali

  • AdventureX Crew
  • What will become of the baron?
  • Ali worked on a game that was nominated for an AGS Award!Ali worked on a game that won an AGS Award!
Hey Calin, what can I say to make you get round to it sooner? I must say, King Cat is looking awfully dignified today.

For 300 sprites per character it should take only 40 minutes or so to replace them all.

I'm surprised you think 40 minutes is a reasonable amount of time to spend on something that should happen automatically! Bear in mind that when rendering sprites rather than drawing them, you often want to test out small changes, with the possibility of changing your mind. Spending an hour trying out a slightly different walk cycle is not very efficient!

EDIT: Crimson Wizard said it better than I did!

Snarky

  • Local Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Hear hear!

The sane way would be to just use the file system, so that you could update a series of sprites just by overwriting the files.

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
  • Calin Leafshade worked on a game that was nominated for an AGS Award!Calin Leafshade worked on a game that won an AGS Award!
That would require checking all the files every build for changes which might be problematic on a large project.

I will make an explicit option for now and the design team will have to consider the possibility of using the file system ala wintermute over the sprite cache currently used.

Ali

  • AdventureX Crew
  • What will become of the baron?
  • Ali worked on a game that was nominated for an AGS Award!Ali worked on a game that won an AGS Award!
Does that mean this is something you might be able to implement in the not-too-distant future? I will make a paper crown and post it to you...

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
BTW, Calin, what version will you work in?
I keep worrying about AGS releases; there's 3.2.1, there's 3.2.2 prepared by tzachs, which was never officially released, only posted as beta; there's Draconian edition, and God knows how many other personal hacks; there's the github repo we've marked as 3.3.0 already (for Gemini Rue release on Linux)... we need to start cleaning things up, the sooner the better.

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
  • Calin Leafshade worked on a game that was nominated for an AGS Award!Calin Leafshade worked on a game that won an AGS Award!
https://dl.dropbox.com/u/27247158/AGSWithReloadFromSource.zip

Give that a try.

As with other automated imports it uses the same transparency options as the previous import (top-left pixel and all that) and always uses an alpha channel if one is available and the game is 32bit.

This was compiled from the git version but the changes are very modest and could be dropped straight into the stable version.
« Last Edit: 04 Mar 2013, 13:00 by Calin Leafshade »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #10 on: 04 Mar 2013, 13:00 »
This was compiled from the git version.
o_0.
If it is what I think it is, you better make a backup of your project before using that. :P
Well, not implying anything, but just in case.

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
  • Calin Leafshade worked on a game that was nominated for an AGS Award!Calin Leafshade worked on a game that won an AGS Award!
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #11 on: 04 Mar 2013, 13:01 »
The editor itself received very few changes from the svn version.

But just to be sure I will patch the changes into the svn version for a more stable solution.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #12 on: 04 Mar 2013, 13:02 »
The editor itself received very few changes from the svn version.
Editor - yes, but AGS.Native (which shares quite some code with engine)............

On other hand, we could use Ali as beta tester in exchange of our services :D.
« Last Edit: 04 Mar 2013, 13:04 by Crimson Wizard »

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
  • Calin Leafshade worked on a game that was nominated for an AGS Award!Calin Leafshade worked on a game that won an AGS Award!
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #13 on: 04 Mar 2013, 13:06 »
The acwin and ags.native (since i couldnt get ags.native to build) files are the 3.2.1 stock files so that shouldn't be an issue.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #14 on: 04 Mar 2013, 13:09 »
The acwin and ags.native (since i couldnt get ags.native to build) files are the 3.2.1 stock files so that shouldn't be an issue.
Ah, it should be ok then, I think. The git version is made of tzach's version with very small fix to make AGS.Native compile with it.
But why cannot you build Ags.Native? Is there any error, or you don't have full MSVS version?
BTW, for that reason I am now commiting compiled library to Editor/References.
« Last Edit: 04 Mar 2013, 13:10 by Crimson Wizard »

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
  • Calin Leafshade worked on a game that was nominated for an AGS Award!Calin Leafshade worked on a game that won an AGS Award!
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #15 on: 04 Mar 2013, 13:14 »
I got a linking error


    error LNK2001: unresolved external symbol __forceCRTManifestCUR


I assume it's a problem with library versions being used or something.

I am using Visual Studio 2008 professional.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #16 on: 04 Mar 2013, 13:47 »
I tested import, it works! but it has an annoying incapability to continue updating multiple sprites if at least one sprite without source file was met. It just shows error and stops. I think it should be able to proceed with operation.

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
  • Calin Leafshade worked on a game that was nominated for an AGS Award!Calin Leafshade worked on a game that won an AGS Award!
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #17 on: 04 Mar 2013, 13:52 »
I agree but I'll need to implement some kind of custom dialog box for that which i will do at a later date.

This version will likely do what Ali requires for the moment.

Ali

  • AdventureX Crew
  • What will become of the baron?
  • Ali worked on a game that was nominated for an AGS Award!Ali worked on a game that won an AGS Award!
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #18 on: 04 Mar 2013, 13:53 »
Yes! It seems to work! Thanks for the quick response guys.

However I'm a little frightened by the beta warnings and the fact that, once saved, this project won't work in the stable version I normally use.

Excuse my ignorance of Gits and SVNs... but would I be unwise to continue developing a project I don't want to risk in this version of the editor?



Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
  • Calin Leafshade worked on a game that was nominated for an AGS Award!Calin Leafshade worked on a game that won an AGS Award!
Re: [Request] Automatically Replacing Sprites from Sourcefile
« Reply #19 on: 04 Mar 2013, 14:19 »
That version of the editor would probably be fine but for your peace of mind I have made one using the old svn version.

https://dl.dropbox.com/u/27247158/AGS3.2.1WithSpriteReload.zip

This is basically identical to the one you currently use with the reload from source thing added and so there is no risk to your project.
« Last Edit: 04 Mar 2013, 14:48 by Calin Leafshade »