AGS doesn't save new sprites imported when save project or run play test

Started by mbnoland, Thu 09/07/2015 00:10:37

Previous topic - Next topic

mbnoland

After having successfully imported the new sprites they are replaced by a blue cup when I save the project or run the play test.
This happens only for the sprites exceeded 2,650.
I tried to import 10 new sprites and then delete 5 of those already present (before the 2650); as a result I got that 5 of the ten new sprites were imported correctly saved, while the other 5 have been replaced by the blue cup.
I also noticed that if the compression function of the sprites is set on "TRUE" all sprites are properly saved, while setting the function on "FALSE" the problem occurs.
It is therefore possible that there is a limit of other kind of import sprites in addition to the number of 30,000 mentioned in the statistics window?
Unfortunately I need to leave the compression function on "FALSE" because otherwise the game is too slow at run.
I'm using the AGS version 3.3.3 and set a screen resolution of 800x600, while the "acsprset.spr" file weighs now about 2 GB (if relevant).
Thanks for the attention!

Crimson Wizard

Quote from: mbnoland on Thu 09/07/2015 00:10:37
I also noticed that if the compression function of the sprites is set on "TRUE" all sprites are properly saved, while setting the function on "FALSE" the problem occurs.
It is therefore possible that there is a limit of other kind of import sprites in addition to the number of 30,000 mentioned in the statistics window?
<...>
while the "acsprset.spr" file weighs now about 2 GB (if relevant).
Hmm, that may be relevant. There is a known problem that some programs have a limit of 2 GB for a file they can read.
There might be ways to fix it though, but that may require some research first.

If this is the case, I have two ideas (except for sprite compression).
First is to store sprites as bmps in game directory and load them up into dynamic sprites from the script.
Second is to reuse same sprites (perhaps combining them into dynamic sprites during game).

Cassiebsg

Quote from: mbnoland on Thu 09/07/2015 00:10:37
Unfortunately I need to leave the compression function on "FALSE" because otherwise the game is too slow at run.
I'm using the AGS version 3.3.3 and set a screen resolution of 800x600, while the "acsprset.spr" file weighs now about 2 GB (if relevant).
Thanks for the attention!

Have you tried running Winsetup->Advanced and setting the Sprite cache to 100MB? It's set to 20MB by default, but I have found that in my system setting it up to 100 (MAX) helps... A LOT! (nod)
There are those who believe that life here began out there...

Crimson Wizard

Meanwhile, I confirm that this problem occurs when sprite file grows over 2 GB.

mbnoland

Sprite cache is just set on 100 MB but unfortunately this does not solve the problem...
I'll try with the first solution proposed by Crimson Wizard, using dynamic sprites stored on game directory as BMP.
In this regard I would like to ask your advice: I'm using about 600 images to create some short end-chapter videos; until now I was using normal sprites in combination with a GUI, passing about 15 images per second on the screen via combining the function "If... Timer Expired (3)" under the function "Repeatedly Execute", updating from time to time the GUI backgroung graphic with the next sprite (GUI.backgroundgraphic = GUI.backgroundgraphic+1).
Now I stored the 600 images as BMP under the game directory renaming these 1001, 1002, 1003 etc... but... how can I recall these one with the function "DynamicSprite.CreateFromFile(string filename.bmp)"? I dont't think I can use a variable within the "(string filename)"...
I apologize for the question probably trivial but I'm not very familiar with Dynamic Sprite! Thanks again!

Crimson Wizard

Quote from: mbnoland on Fri 10/07/2015 17:15:38
Sprite cache is just set on 100 MB but unfortunately this does not solve the problem...
In sake of experiment,
Spoiler
you could increase this value by editing acsetup.cfg directly.
Find [misc] section and change the line:
Code: text

cachemax=******

This value is in kilobytes. For example, 100 MB is "102400", 200 MB is "204800" and so forth. The more hi-res sprites you use in your animations, the higher this setting must be.
[close]


Quote from: mbnoland on Fri 10/07/2015 17:15:38
In this regard I would like to ask your advice: I'm using about 600 images to create some short end-chapter videos;
Wow!
May I ask, why won't you try render actual video instead? AGS supports AVI, MPG and OGV formats. Your problem with sprites may just go away.
Just for reference, 600 800x600 32 bit images without compression may require around 1 GB of disk space.


Quote from: mbnoland on Fri 10/07/2015 17:15:38
Now I stored the 600 images as BMP under the game directory renaming these 1001, 1002, 1003 etc... but... how can I recall these one with the function "DynamicSprite.CreateFromFile(string filename.bmp)"? I dont't think I can use a variable within the "(string filename)"...

What you need in such case is string formatting.
Code: ags

// this will substitute "%d" with actual SPRITE_NUMBER number
String s = String.Format("%d.bmp", SPRITE_NUMBER);
DynamicSprite.CreateFromFile(s);

mbnoland

I need to make interactive movies by the appearance of some buttons (GUI) that, according to their proper combination, make that the video processing in one way rather than another.
Anyway I decided, following your advices, to combine parts of video (in which is no interaction) linking to sequences of images loaded via dynamic sprite and for now everything seems to work very well!
Thank you very much for helping!

SMF spam blocked by CleanTalk