What do you use to Save/Load your games?

A little uncomfortable question as this I consider a holy grail topic.The ones on udn are wayyy out of my understanding so in this case I use Crusha K. Rools kismet save/load system with the provided dll bind.Works great, but it can get frustrating some times when you try to keep track on every bool and stuff you do in kismet.(but is still kismet so thats a + for me)

https://wiki.beyondunreal.com/User:Crusha/UltimateSaveSystem

Was wandering if someone from you guys have discovered/created a magical plug and play thing that does that, even more easy.

this is how im saving the positions of 5 vehicles.


class boltonsSaveGame_tbp_VH extends Object;

var vector Inquad;
var vector quad;
var vector Outquad;

var vector Intruck;
var vector truck;
var vector Outtruck;

var vector Inute;
var vector ute;
var vector Outute;

var vector Infork;
var vector fork;
var vector Outfork;

var vector Intractor;
var vector tractor;
var vector Outtractor;




class SeqAct_boltons_tbp_VH_save extends SequenceAction;

var boltonsSaveGame_tbp_VH SG;
var vector Inquad;
var vector quad;
var vector Intruck;
var vector truck;
var vector Inute;
var vector ute;
var vector Infork;
var vector fork;
var vector Intractor;
var vector tractor;

function Activated()
{
      SG = new class'boltonsSaveGame_tbp_VH';

   SG.quad=Inquad;
   SG.truck=Intruck;
   SG.ute=Inute;
   SG.fork=Infork;
   SG.tractor=Intractor;

   class'Engine'.static.BasicSaveObject(SG, "boltonsSaveGame_tbp_VH.bin", true, 1);
}

defaultproperties
{
 bCallHandler=false
 ObjColor=(R=255,G=0,B=255,A=255)
 ObjName="tbp vehicle save"
 ObjCategory="Boltons"

 VariableLinks(0)=(ExpectedType=class'SeqVar_vector',LinkDesc="quad",PropertyName=inquad)
 VariableLinks(1)=(ExpectedType=class'SeqVar_vector',LinkDesc="truck",PropertyName=intruck)
 VariableLinks(2)=(ExpectedType=class'SeqVar_vector',LinkDesc="ute",PropertyName=inute)
 VariableLinks(3)=(ExpectedType=class'SeqVar_vector',LinkDesc="fork",PropertyName=infork)
 VariableLinks(4)=(ExpectedType=class'SeqVar_vector',LinkDesc="tractor",PropertyName=intractor)
}


class SeqAct_boltons_tbp_VH_load extends SequenceAction;

var boltonsSaveGame_tbp_VH SG;
var vector outquad;
var vector quad;
var vector outtruck;
var vector truck;
var vector outute;
var vector ute;
var vector outfork;
var vector fork;
var vector outtractor;
var vector tractor;


function Activated()
{
    SG = new class'boltonsSaveGame_tbp_VH';
    class'Engine'.static.BasicLoadObject(SG, "boltonsSaveGame_tbp_VH.bin", true, 1);

    Outquad=SG.quad;
    Outtruck=SG.truck;
    Outute=SG.ute;
    Outfork=SG.fork;
    Outtractor=SG.tractor;
}

defaultproperties
{
 bCallHandler=false
 ObjColor=(R=255,G=0,B=255,A=255)
 ObjName="tbp vehicle load"
 ObjCategory="Boltons"


 VariableLinks(0)=(ExpectedType=class'SeqVar_vector',LinkDesc="quad",bWriteable=TRUE,PropertyName=outquad)
 VariableLinks(1)=(ExpectedType=class'SeqVar_vector',LinkDesc="truck",bWriteable=TRUE,PropertyName=outtruck)
 VariableLinks(2)=(ExpectedType=class'SeqVar_vector',LinkDesc="ute",bWriteable=TRUE,PropertyName=outute)
 VariableLinks(3)=(ExpectedType=class'SeqVar_vector',LinkDesc="fork",bWriteable=TRUE,PropertyName=outfork)
 VariableLinks(4)=(ExpectedType=class'SeqVar_vector',LinkDesc="tractor",bWriteable=TRUE,PropertyName=outtractor)

}

the second 2 files are custom kismet nodes,you just need to hook up the vars.when you save it will create a file in the binaries/32 or 64 folder depending on which mode you are in,ie editor or game.

just trigger the node to save or load.

The only way to do is to copy all the relevant variables of all the actors in a one object to save it to disk?

I haven’t done it for my game yet, I’m waiting to have the pawns code almost complete to do, but I think that will be a headache.

If you’re comfortable with Unrealscript I heavily recommend the SaveGame gem: UDK | DevelopmentKitGemsSaveGameStates

I know it seems a little convoluted, but if you spend a little time reading through it, most of the work is done for you. Then all you have to do is implement the SaveGameState interface on any actors you want to save, then simply add a Serialize() and Deserilize() method for those actors.

I use it heavily in my project and it works fantastically. Also then you are able to view the save files in json format (kinda nice for debugging).

Good luck.

I use the method from the SaveGame gem as well

I was thinking about an spawnable actor that retrieves all the relevant variables of all relevant actors in the game, store them in arrays and variables and do a basicsaveobj. I think that it’s more simple than the Gem example and enought for my game.

yeah,the example I posted above is 1 of 6 I currently have,each with around 20 or so vars,and I works perfectly.
im working to get rid of the kismet nodes and do it all in the game script.O_and_N was after the kismet connection though.

Nice info.For now I supose I will not make my life more complicated and stick crushas kismet thing(enough for saving the player and some events).I think that the files of this game
https://forums.epicgames.com/showthread.php?972404-Links-amp-Content-Updated-UDK-–-Horror-Starter-Kit-Source-Code-(7-Days)

used the udn gem thing.Might take another look at it on how it works.Still i find that most udk games on steam dont have any save sytem at all.Some get away with having all levels available from the start and with a open comand you just teleport there lol.

Yes, basically that is what I want to do. I’m thinking in a unique Object with an array using a struct var that stores the pawn’s variables. The same for the weapons, pickup items, etc.

For load the game, destroy all the pawns, items, etc in the map, then load the saved game object and re-create all the paws, weapons, items, using the stored variables.

In that way there are no need to add code to each class, so for example using the Epic Gem method, if there are 1000 bots in the map, then there are 1000 instances including that code (*). It’s better to have that code in a unique Object that you can load or unload on demand.

Not tested yet, so I don’t know what problems I will have, perhaps the struct length limited, or the spawn of all classes will need to be distributed in several ticks. Also I will need a way to encrypt the file to difficult the tricks.

(*) Really I don’t know yet the impact in memory compsumition having extra code in each pawn instance. Perhaps it’s insignificant. I was thinking about moving several functions to the game class, and call them from the Pawn class and the controller. But this is another story.

I really do advise anyone reading this to use the SaveGame gem. It scales incredibly well and it’s so nice being able to simply add the vars you want saved to the serialize/deserialize methods of the actors you want saving.

I have a very large open world map where players can build huge bases made up of hundreds of actors (possibly thousands, i haven’t actually tested how many). I do auto-saves every 2 mins and it isn’t even noticeable to the player when it occurs.

I think a lot of thought went into the gem, so unless it really doesn’t suite your needs, i feel it should be the ‘goto’ for devs implementing a save game feature in their projects. But that’s just my opinion.