Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: rmonic79 on Mon 23/11/2020 11:30:40

Title: Silly question about Update
Post by: rmonic79 on Mon 23/11/2020 11:30:40
Hi guys there is something that, uncredibily, i never done before and i was thinking, if it's possible, to use it to avoid to break savegame on update. I'm talkin about assign frame to a view in runtime, could it be a good solution? And, first of all, it can be done? And, it will avoid savegame brake problem?
Thanks for answers
Title: Re: Silly question about Update
Post by: eri0o on Mon 23/11/2020 11:49:29
I have no idea but it's an interesting thing to test! Maintain a copy of your old built game so once you get the new build you can save game in the old and load in the new. Please update if it works!  :)
Title: Re: Silly question about Update
Post by: Crimson Wizard on Mon 23/11/2020 11:53:22
If you mean, add new frame to a loop, then no, this cannot be done at runtime.
If you mean, assign new sprite to a frame, then yes, this can be done at runtime, and no that won't break saves ofcourse. Saves are only broken by adding/removing game objects. In this case this will be reusing same existing objects.
Title: Re: Silly question about Update
Post by: rmonic79 on Mon 23/11/2020 12:05:47
Ah ok i cannot assign frame to loop in runtime... this is sad, but assign new sprite to frame is still something, at least i don't have to import a lot of placeholder but only create a bunch of void view of different frame lenght to fill
Is the method like the sounds assign to viewframes?
Title: Re: Silly question about Update
Post by: Crimson Wizard on Mon 23/11/2020 12:11:49
Quote from: rmonic79 on Mon 23/11/2020 12:05:47
Is the method like the sounds assign to viewframes?

Yes, there's ViewFrame.Graphic property, it will change its sprite.
Title: Re: Silly question about Update
Post by: Vincent on Mon 23/11/2020 12:12:58
Quote from: Crimson Wizard on Mon 23/11/2020 11:53:22
Saves are only broken by adding/removing game objects.

If you have to remove game objects or characters I think there is nothing you can do, the saves would be breaked but if you have to add a game objects or new characters a good workaround I think it would be to add let's say 10 empty game objects or characters into your main version, so maybe after you release the game and you have to add some characters or game objects they are already implemented into your main version and the saves would not be breaked if I am not wrong.
Title: Re: Silly question about Update
Post by: Cassiebsg on Mon 23/11/2020 18:22:46
Remember to add some dummy variables as well, you never know when you might just need a couple extra to fix a bug or even had something new.  ;)