Moving game-related files on a USB-stick

Started by SlinkyB, Fri 11/04/2025 12:37:37

Previous topic - Next topic

SlinkyB

Hello! I hope this question found it's way under the right category and isn't completely self-evident.

Is it safe to move some/all files regarding a game made with AGS on a USB-stick, or will it crash the system?

My laptop is quite small and simple, and the storage-space seems to always be showing red no matter what I do. Moving all million of the character and GUI -sprites into a USB could probably help even a little, at least with performance when I'm not coding. But my computer knowledge is pretty non-existent and I'm scared that having the sprites or music files for example on a USB will crash/zero the game completely even if the USB is inserted.. So will it?:D

And is it better to move only the sprites (/pictures) and music files and all that smaller stuff or also the whole gamefile itself or whatever from the computer? Or is there any other way to minimize the space these game related files are taking?

I don't know if any of this made any sense I just wish this sort of small thing wouldn't force me to stop coding before ever really even getting properly started;(

Khris

Once you import a sprite, it ends up in a file called acsprset.spr and the external file is no longer needed. It can in theory be deleted. Room backgrounds are stored in the *.crm files.
Both sprites and room backgrounds can even be exported to the hard drive, should you lose the original image file.

I'm not 100% sure about audio files but afaik these get copied into the AudioCache folder in your game folder.

In general, all files needed to compile/run the game are kept inside the game's folder.

Which means while I wouldn't recommend keeping the game folder itself on removable storage, it's perfectly fine to do that with all external resources.

Crimson Wizard

#2
Quote from: Khris on Fri 11/04/2025 13:31:36Once you import a sprite, it ends up in a file called acsprset.spr and the external file is no longer needed. It can in theory be deleted. Room backgrounds are stored in the *.crm files.
Both sprites and room backgrounds can even be exported to the hard drive, should you lose the original image file.

Sorry, but getting rid of those image files is a very bad thing to suggest, and it's opposite to what we usually recommend. "acsprset.spr" is a huge binary file which may be subject to corruption if anything goes wrong when saving. It is also inconvenient to store under the source control (if you're using one, like svn or git or else). That's why the Editor has "recreate all sprites from sources" command, which restores "acsprset.spr" from the source image files. That's why we also recommend to put original image files into the game project's subfolder and import from there: this way Editor remembers their relative path and can restore the sprites even if the project was moved to another location or another computer.

Same thing with rooms. In AGS 3.* rooms are binary files, and if something breaks in them, they cannot be restored unless you have original backgrounds somewhere.

That said, you may of course move original images somewhere else. That will not break your game project. But if you would ever need to restore them in the project (if something breaks there, etc), then you would have to either:
- copy them back to where they were originally, and run restoration process;
- change the source links for all sprites to a new location (even on USB). There's a way to do this with a menu command in a upcoming version 3.6.2, but in earlier versions you would have to do a replacement in Game.agf file (that's a xml text).


Khris

I didn't though.

And in no way did I want to encourage anybody to delete their image files after importing them; it was only supposed to emphasize the fact that they are not required to edit or run a game.

I was under the impression that OP thought they had to keep the files around locally on their computer or "crash the system" so I wanted to drive home that's absolutely not the case.

SlinkyB

Thank you both for quick answers!

Yeah, I was mostly talking about the original image files on my computer; for some reason I didn't even consider the fact that after importing the sprites become a whole new thing added to the gamefiles. But now that I think of it, that should be obvious haha!

Also thanks for the tip to move the images into the game's subfolder even before importing, I hadn't even thought of that.

Now I feel again just a bit more confident to f*ck around and find out<3

SMF spam blocked by CleanTalk