How do I integrate old save files into new game updates/make content updates in general?

0 favourites
  • 11 posts
From the Asset Store
Make your own platformer for both the web and mobile easy with this Santas Platformer Template, FULLY DOCUMENTED
  • Context:

    My game is an adventure/puzzle single player RPG game for pc. The idea is that the world would be an ever expanding project, with new updates, come new areas, npcs, story quests etc. Player would be able to save the game whenever they want and keep their loots and story progress.

    Problem:

    Fiddling with construct so far, I have noticed that when I save my game, and then go do some changes, boot up the same save file again, the content would stay the same of course and has none of the new stuff that I've added.

    Question:

    So let's say I update the game with new content, fix a few bugs, change some stats... How can I do this so that when the player updates my game and boots it up, they'd still be able to access their save file but only this time, not only does it contain their saved progress, but also holds all the new content and fixed stuff?

  • It will be very difficult to fix or update system saves. I suggest making your own save system - saving only the essential information, not everything. You can save it to Local Storage or to a file.

  • The answer to your question will change depending on what content is to be changed. But you will need to make the fixes in your Event sheet to effect users who have a save.

    I recommend a new Group of code for each patch you release. This will have all of your fixes - and you will call it one time for each person on load, if they don't already have this.

    Using a Global Variable 'UserVersion', track the version that the user is on. Let's say 1.01 is in that global.

    Time goes by with that user not playing and your game is on 1.04. In your event sheet on game Load complete check 'UserVersion' < 1.04. If it is you call each version they missed - 'UserVersion' = 1.01 call 1.02

    1.02 will set all the changes from that patch one time then change the users version to 1.02 and recall a version check doing this until they reach 1.04

  • Thank you both for replying.

    I think tweaking my save system from saving everything into saving just the states of some objects like the player, enemy, unacquired loot... and a bunch of global and local variables... would be the most straight forward solution.. But it's also really tedious since my game has quite a lot of content. I'll do this if I can't figure a better way but...

    ...About winstreak 's suggestion, what does it mean to "call" each version? How will the new groups of codes replace the old ones in practise? I don't know anything bout coding outside of C3 visual blocks and expressions. Do I have to write the patches as separate code files, like outside of C3? What should I look into now for knowledge regarding this?

  • A function would be the easiest way. Add it right into your current event sheet. If the version the player is on is lower you would call the new version's function so you can have a whole list of changes at once.

    Lets say we had a patch were we moved the first boss to a new position and buffed the players attack speed by 5. On your player characer you would add 5 to attack speed and you would go to the boss and move it to the new position (like normal).

    Then in the events

    If UserVersion = 1.01 || call function 1.02

    If UserVersion = 1.02 || call function 1.03

    The events you would have in there would be all of the changes:

    1.02:

    UserVersion set 1.02

    Player.AttackSpeed Add 5

    Set Position Enemy.Boss1 (154,100)

    1.03:

    Do all this other stuff

    And for each patch you would change the initial value of the UserVersion to the newest. If someone had a saved version it would mean they get the updates - new people would all have the newest already.

  • Oh! I see, this sounds like a simple solution for small changes and bug fixes.

    But how about bigger content updates like entirely new maps and event sheets?

    How do I tell the older user version that these new stuff exist within you now?

    *I mean, I couldn't possibly create an entire map or organized event sheets within a function can I ?

  • Also, I just remembered to mention my game has multiple layouts.

    So I'd have to find a way to also update the possible changes in those layouts that the player isn't currently on.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The most correct way to handle everything would be how dop2000 mentioned, but it gets very complicated if you try to start doing it after you already have a full game created (atleast I thought so).

    Only altering existing objects messes up save states. Since you are setting a property, the game yesays 'roger', then the load comes in to set the properties to the old values, and again the game says 'roger'.

    Newly created objects will appear in a game with a save state already in place. You can design a whole new map and will need to do nothing new.

    • If you are creating something new on an already existing map - sometimes you need to push objects to the correct place on the Z order map with your events

    You will definitely need a saved value on your game that you can load to verify you changes came in right. If they don't you add the extra events.

  • Okay, if I save only the important things, could I do it using an array?

    I'm thinking about using an array because I could store objects' positions and behaviours as well as all sorts of variables and everything would be in a single compact json format. Does this sound like a good idea?

  • I prefer saving a dictionary. You can put global variables into the dictionary, or any other values you want, including arrays and other dictionaries!

    This way you'll have everything in one dictionary and it's easy to save and load it from Local Storage.

    Here is how I usually do this:

  • Have never used a dictionary before but being able to store arrays and other dictionaries inside a dictionary to make an inceptionary sounds really cool.

    Thanks for the example too, I'll look into it now!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)