Jibble

Author Topic: I cannot save my game anymore when I add new Sprites. The sprites can't be saved  (Read 455 times)

What exactly do you mean when you say "we will try to investigate"??

Do you have like a whole lab team working on it??  (laugh)
And I mean, how can you investigate it if you don't have my game?

What exactly do you mean when you say "we will try to investigate"??

Refer to your description of a problem, and look into code to see what could possible go wrong under similar conditions.
Maybe ask more questions...
When I say "we" I mean we have more than 1 person who works on the Editor.

And I mean, how can you investigate it if you don't have my game?

Sometimes it's possible to reproduce similar conditions by making a test game.

Of course, ideally I'd like to have your game project that fails, but idk if it's okay for you to upload (also guess it may be huge).

I mean I trust you with this, and I think everyone, me included, can only profit if you can improve the program.
I PM ed you a link with the game file.
Well at least the sprite file tripled down in size after compressing the sprite files. The whole thing is about 4GB big.

Ok I downloaded it.

According to the data in Game.agf you are using slightly older beta (around 3.5.0.8 - 3.5.0.10).

When I tried opening your project with the most recent beta it shows following warning:
Quote
Sprite file (acsprset.spr) contained less sprites than the game project referenced (99 sprites were missing). This could happen if it was not saved properly last time. Some sprites could be missing actual images. You may try restoring them by reimporting from the source files.
(And some of the sprites are actually replaced with dummy "blue cup" image. But they seem to all have kept the source reference, so could be restored from source.)

This is a special test that we've added recently specifically to prevent crashes if sprites were not saved correctly. It was added around v.3.5.0.13.

Could you download very latest Beta and try using it with your project instead?

Hey I installed the latest version of AGS I found (v 3.5.0.16).

So the sprites that were replaced by the dummy blue cup, that was mostly an unlucky coincidence. With the bug I had when I saved new sprites, it would not save them but I would only get those blue dummy cups when opening the project again. But only sometimes it would save also some of the old files as blue dummy cups, that usually were saved correctly. So apparently just before I uploaded the game I saved the game and the sprites were saved as blue dummy sprites, but that was all due to the bug I described.

However, after installing the new version, I re-imported from source ALL my sprites, just to be sure.
However I still keep getting the same warning that you quoted in your message everytime I open the project, even though I have not a single blue dummy sprite anymore.

The good news is, now I CAN save the sprites and I CAN add new sprites, which makes me really excited, because I can finally add some cool, elaborate animations to my game! The work you guys have done in the new beta version on the sprite import and organization is really visible. Sprite folders are loaded faster, and the import is way faster, and does not slow down when I add dozens of high resolution sprites.

With that said, the initial warning that you also saw remains, which does not hinder my working, but is maybe just annoying.
Do you want to get to the roots of this problem?
I might re-upload the game with the correct sprites if it would really help, but I don't think it is necessary, also because you could simply add ANY kind of sprites as place holders for the blue dummy sprites I believe, in order to test it. It does not change anything to the cause of the problem.

While testing the new beta version, and the sprite import, in my project but also in new projects, I came across a few bugs that the new beta version still has. I'm sure you guys are working on it, and I don't know if that is interesting to you, but this are the things that did not work correctly:

When I try to Assign Sprites to a View by Right Clicking on them (in any project), I get a big Error Message:

These two:

https://drive.google.com/file/d/1XWoiLcPGc1KfyYYAhXTN3lrff3V5-rWJ/view?usp=sharing

https://drive.google.com/file/d/1_Sj3JxRRv9bdvkE_HI0ZHm7h5GGoJmYi/view?usp=sharing


In written form:

Error: Input string was not in a correct format.
Version: AGS 3.5.0.16

System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Convert.ToInt32(String value)
   at AGS.Editor.SpriteSelector.SpriteContext MenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.Rais eEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem. OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.Hand leClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.Hand leMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.Fire EventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.Fire Event(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseU p(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown. OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl. WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown. WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNat iveWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNat iveWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callb ack(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


So now I have to add every single sprite manually to a view loop by clicking on the "Create new Frame" button in the view tab.
Because the "Create new Frame" button moves further to right for each frame you add, and it's kind of annoying to follow the the button with your cursor to keep clicking, I avoided that problem by restoring down the program and adjusting the proportions so that the two sides, left and right, are very close together, because then you keep seeing the button on the same spot and you can just keep clicking it and adding new sprites. But when I did this I noticed another tiny bug: When you restore down the program like that and "squeeze" the right and left side of the program window together, and then click on the work space, sometimes when afterwards you maximize it the proportions of the property panel gets messed up. Meaning that the right column, where you read and type in the property values is moved to the right and you cannot see or read the values anymore, so I have to re-adjust that after I maximized the program again.


Another bigger bug is that everytime after running the game I get (in all projects, no matter which room or game) this error message:

https://drive.google.com/file/d/1URyVAO30_9AWnYVe17V44bn8zlSGKcq6/view?usp=sharing


Also, sometimes when you open a sprite folder, the tab all of a sudden switches by itself and I would find myself on a view tab, and I would have to click on the Sprites tab again to view the sprite folder I opened.

I'm sure you guys are already working on it, but those were the things I noticed regarding the new beta version in case it is interesting to you.


And I think a great thing would be to add an optional x- and y- offset for the FollowCharact(_EXACTLY) function, because this way you could very easily add shadow below the character without messing up baselines, it would be really useful for that. As for now if you add a z-Value to either the original character or the shadow character, it does never change the distance of the characters to each other, the program always aligns them on their original Baselines, so you never have an actual offset between the two, and you can't just create a shadow character below the original character to follow him around. This kind of leans in to another thread I posted, but we talked about the new version here, and if you think too that this might be useful, I think it'd be a great feature.



So the sprites that were replaced by the dummy blue cup, that was mostly an unlucky coincidence. With the bug I had when I saved new sprites, it would not save them but I would only get those blue dummy cups when opening the project again. But only sometimes it would save also some of the old files as blue dummy cups, that usually were saved correctly. So apparently just before I uploaded the game I saved the game and the sprites were saved as blue dummy sprites, but that was all due to the bug I described.

However, after installing the new version, I re-imported from source ALL my sprites, just to be sure.
However I still keep getting the same warning that you quoted in your message everytime I open the project, even though I have not a single blue dummy sprite anymore.


Hmm maybe I missed something, or maybe sprite manager does not work as I thought (not displaying wrong sprites perhaps?) I will look into this again.

LATER EDIT:
I tested more and found out that as you restore sprites the "missing" number actually decreases (although not always correct - see below), so this part works. Just a guess, the sprites you may still be missing are numbers somewhere between 2105 - 2060 and these are sprites from the original game template which you cannot restore without original source.

However, more importantly, I found out there's another serious problem with the whole "substitute with blue cup" thing that may lead to more crashes when viewing the sprite manager if you fix few sprites, save the game and continue to browse sprites. I will have to fix this once again. Maybe I will also add a function that prints missing numbers to the text file for convenience.



Another bigger bug is that everytime after running the game I get (in all projects, no matter which room or game) this error message:

https://drive.google.com/file/d/1URyVAO30_9AWnYVe17V44bn8zlSGKcq6/view?usp=sharing

This was already fixed (version could be downloaded from the build server artifacts, e.g. here: https://cirrus-ci.com/task/5958941248323584 , but it may be temporary).
It is simply that the editor does not recognize engine's exit code correctly and thinks that something is wrong.


I will make a record of other problems you posted and put them on our issue tracker.


So now I have to add every single sprite manually to a view loop by clicking on the "Create new Frame" button in the view tab.

Note you can also right click on view frame itself and "assign sprites from folder" (which seems to do similar thing).



And I think a great thing would be to add an optional x- and y- offset for the FollowCharact(_EXACTLY) function

We prioritize fixing bugs now for 3.5.0, so new features and similar enhancements will be planned for next development period. But in regards to FollowCharacter, I believe you could try positioning "shadow" character yourself using charater.x and character.y properties either in repeatedly_execute_always or late_repeatedly_execute_always.
« Last Edit: Today at 00:03 by Crimson Wizard »