permitting players to save games
by Jennifer Montes · in Torque Game Engine · 09/24/2002 (9:20 am) · 9 replies
I've noticed that it's really hard to find anything that has to do with letting players save their games on this site... is it that big of a problem? i don't see it addressed anywhere...
i was talking to some people the other day and they told me that that's precisely why most games that are being developed are puzzle or race games... you dont need to save.
is there a solution at hand?
i was talking to some people the other day and they told me that that's precisely why most games that are being developed are puzzle or race games... you dont need to save.
is there a solution at hand?
About the author
I'm a sci-fi/fantasy/gamer geek that can draw and paint.
#2
It's not going to be a very simple solution I can tell you that, but with smart developers to work on that problem it might not be that hard.
09/24/2002 (9:30 am)
Well it's mainly because when the engine was first created they had no real reason to implement game play save and restore features since it was mainly used in Tribes2. Tribes2 is just a multi-player internet game, and has no single player missions. Well it has a few, but they're just training missions and not actual single player missions. So that is why many people don't want to have deal with the save and load of game play since that would require quite a lot of coding or it could be as simple as needing quite a bit of script functions to be used to keep track of where the player is, what it has done, where everything is right then, and what exists to save and then it will have everything to restore from.It's not going to be a very simple solution I can tell you that, but with smart developers to work on that problem it might not be that hard.
#3
09/24/2002 (1:42 pm)
I don't think saving data is something that the engine itself should have to tackle anyway. Every game is going to have different types of data that would need to be saved and so that is best implemented by the development team of the game itself.
#4
09/25/2002 (10:29 am)
So are you guys saying that i can solve the save game problem entirely with scripting and not have to touch the engine code at all?
#5
The point is that this isn't an area where submitting engine patches or pooling our efforts is necessarily best, since we all need to save different parts of the game state.
Wether you accomplish that by writing in C or script or a combination is a separate issue.
I expect you'd want to write a general persistence API into the engine source then define objects and fields to be saved in script. There are plenty of other approaches you could use, though.
09/25/2002 (10:37 am)
I don't think anyone said that.The point is that this isn't an area where submitting engine patches or pooling our efforts is necessarily best, since we all need to save different parts of the game state.
Wether you accomplish that by writing in C or script or a combination is a separate issue.
I expect you'd want to write a general persistence API into the engine source then define objects and fields to be saved in script. There are plenty of other approaches you could use, though.
#6
Saving games isn't hard though, you just decide all of the variables that need to be saved out (If you are not touching engine code I assume all of the relevant ones are in scripts already) and then write them out. If the torque scripting system doesn't support file I/O then it would be very easy to write a C file that will do this. Reverse the process to load the saved game.
09/25/2002 (10:38 am)
To be honest I don't know enough about Torque to make that statement. I don't know what file operations scripting has. Saving games isn't hard though, you just decide all of the variables that need to be saved out (If you are not touching engine code I assume all of the relevant ones are in scripts already) and then write them out. If the torque scripting system doesn't support file I/O then it would be very easy to write a C file that will do this. Reverse the process to load the saved game.
#7
Can you write the much without pummeling me with theory?
06/13/2003 (8:49 am)
How would you save the level a player is on to a file, and how would you read it?Can you write the much without pummeling me with theory?
#8
06/13/2003 (10:09 am)
Look at the code for saving preferences such as screen resolution or the like. That's a very easy way of doing it.
#9
XML Persistance for Torque Objects
Saving Inventory Between Missions
Happy coding.
06/13/2003 (12:15 pm)
I have written code to save a game. I will work on adding it as a resource today. In the meantime here are two resources that will get you started or maybe even provide the solution you need.XML Persistance for Torque Objects
Saving Inventory Between Missions
Happy coding.
Torque Owner James \"Corvidae\" Williams