AGS Awards nominations close at 13:59 GMT on Saturday 10 February 2018. You haven't yet nominated, so you've got 18 days and 8 hours left to play the games and decide which to nominate!

Author Topic: Feature Request: Store sprites as separate files  (Read 947 times)

JanetC

  • Mittens Serf
It's currently really hard to keep AGS projects in source control, due mainly to the enormous size that acsprset.spr can grow to in any large projects. Could the sprite image sources be kept as links to separate image files on disk, as with the sound files?

Re: Feature Request: Store sprites as separate files
« Reply #1 on: 19 Oct 2017, 22:18 »
You can add to git ignore and use git-lfs.

cat

  • Mittens Baronet
  • AGS Baker
  • Learn to how write cat in Japanese!
    • cat worked on a game that was nominated for an AGS Award!
      cat worked on a game that won an AGS Award!
Re: Feature Request: Store sprites as separate files
« Reply #2 on: 22 Oct 2017, 20:33 »
The question is: can the spr file be rebuilt from the info in the Game.afg and the sprite images in the folder?

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: Feature Request: Store sprites as separate files
« Reply #3 on: 22 Oct 2017, 20:53 »
The question is: can the spr file be rebuilt from the info in the Game.afg and the sprite images in the folder?

TBH I do not remember about sprites which keep references to sourcefiles, but the sprites package can also contain sprites copied from clipboard, in which case they do not have any links to real sprites (and there may not be any original files on disk whatsoever).

This should be also kept in mind if this feature is implemented, because unlike AudioCache which you can safely delete if you have original audios somewhere, you won't be able to just delete all sprites from cache.
So probably there should be a special folder in your project where Editor will add sprites created by clipboard copying, or something like that.
« Last Edit: 22 Oct 2017, 21:01 by Crimson Wizard »

cat

  • Mittens Baronet
  • AGS Baker
  • Learn to how write cat in Japanese!
    • cat worked on a game that was nominated for an AGS Award!
      cat worked on a game that won an AGS Award!
Re: Feature Request: Store sprites as separate files
« Reply #4 on: 01 Nov 2017, 17:25 »
In this case I would advice against git-ignoring it. The purpose of source control is being able to restore your project to a specific historic state. But if the sprite file is not included, game data is basically broken and cannot be restored which renders source control pointless.

Re: Feature Request: Store sprites as separate files
« Reply #5 on: 01 Nov 2017, 18:22 »
git-lfs would allow to version control your source and store the large binary file, but not version your large file, because each version would require it entirely so it would quickly reduce your available storage.

Alternatively, you can use Dropbox paid account for your project since it allows versioning - if you have a spare server and don't want to spend money on Dropbox, Nextcloud provide the same functionality if you install yourself.

Snarky

  • Local Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Feature Request: Store sprites as separate files
« Reply #6 on: 03 Nov 2017, 10:01 »
... Or we could correct a very poor design decision in AGS so people don't have to hack half-functioning workarounds.

Re: Feature Request: Store sprites as separate files
« Reply #7 on: 03 Nov 2017, 10:23 »
if there is support for multiple sprite files, it should be simple to break it in a new one on each import, right? I also think that, if the source links are still available it should be able to rebuild from source - which would help for reimports instead of having to load the sprite window and go on each clicking replace from source.
« Last Edit: 03 Nov 2017, 10:36 by eri0o »

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: Feature Request: Store sprites as separate files
« Reply #8 on: 03 Nov 2017, 10:50 »
if there is support for multiple sprite files, it should be simple to break it in a new one on each import, right?
To be precise, currently there is no support for multiple sprite files, there is support for multiple resource files (they may contain other data, like rooms etc).
Technically it is possible to implement sprite archive splitting, as well as creating new part whenever new sprites are created (if I understand your idea right?).
But the point here is to move away from having compiled data packages in the project source, making project sources more open.

Same refers to the room files, actually, currently they are kept as compiled binary blobs in the project source, making it difficult to collaborate on a same rooms (team members should take turns updating them).


I also think that, if the source links are still available it should be able to rebuild from source - which would help for reimports instead of having to load the sprite window and go on each clicking replace from source.
As I noted in my post above, not all sprites keep their links. Sprites copied from clipboard and sprites imported using "tiled import" feature do not have links stored.
« Last Edit: 03 Nov 2017, 11:16 by Crimson Wizard »

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: Feature Request: Store sprites as separate files
« Reply #9 on: 03 Nov 2017, 11:49 »
I've split the transparency issue into separate topic (hope nobody minds): http://www.adventuregamestudio.co.uk/forums/index.php?topic=55426.0

JanetC

  • Mittens Serf
Re: Feature Request: Store sprites as separate files
« Reply #10 on: 06 Nov 2017, 15:13 »
We know about Git LFS and Dropbox and use both. But it would be much nicer if the sprites were stored as individual files like the sound files are. At the moment "Unavowed" has a sprite file that is several gigabytes in size and stresses even LFS.

The other unmergeable binaries, like room files, are also a small problem too because Dave & I have to be very sure that only one of us is using them! But that's not nearly as much of a problem as the enormous sprite file.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
Re: Feature Request: Store sprites as separate files
« Reply #11 on: 30 Nov 2017, 16:24 »
One alternative option, if storing the sprites as separate files isn't doable.

Can there be an option to split the sprite files into smaller chunks? Much in the same way you can split up the game's .dat file?

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: Feature Request: Store sprites as separate files
« Reply #12 on: 30 Nov 2017, 17:23 »
One alternative option, if storing the sprites as separate files isn't doable.

Can there be an option to split the sprite files into smaller chunks? Much in the same way you can split up the game's .dat file?

Storing sprites as separate files is doable of course, there should be some kind of specification (rules) made first to know how exactly we are doing that (sprite cache folder similar to audio cache, etc).
Because that will completely change the way how Editor works with sprites, we need to be very careful in planning here.

Regarding splitting sprite file, that won't necessarily be much easier, because unlike game data, which is the final output, Editor uses sprite file during its work.