Jibble

Author Topic: Silly question about Update  (Read 157 times)

Silly question about Update
« on: 23 Nov 2020, 11:30 »
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

eri0o

Re: Silly question about Update
« Reply #1 on: 23 Nov 2020, 11:49 »
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!  :)

Re: Silly question about Update
« Reply #2 on: 23 Nov 2020, 11:53 »
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.
« Last Edit: 23 Nov 2020, 11:55 by Crimson Wizard »

Re: Silly question about Update
« Reply #3 on: 23 Nov 2020, 12:05 »
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?

Re: Silly question about Update
« Reply #4 on: 23 Nov 2020, 12:11 »
Is the method like the sounds assign to viewframes?

Yes, there's ViewFrame.Graphic property, it will change its sprite.

Re: Silly question about Update
« Reply #5 on: 23 Nov 2020, 12:12 »
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.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Re: Silly question about Update
« Reply #6 on: 23 Nov 2020, 18:22 »
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.  ;)
There are those who believe that life here began out there...