- Home /
Save and Loading player created objects
So I'm working on making a game and cant figure out the best way to save player created objects in the server as well as saving whats in side certain objects like a chest. I know there is XML databases and Php myadmin but which is best method the games items and whats inside the containers are going be little like Ark but not sure how to proceed. I need everything be saved to the server so when that player is offline other players can still interact with the objects.
generally speaking, when saving to a server, you make the server do as little as possible and utilize the users cpu for as much calculation as possible.
the creation of a "saving system" totally depends on the complexity and needs of your game.
for example if you have 100 different possibility that could be found in a chest. then the client sends nothing more to the server than a number between 1 and 100 to save or recieve with the server. each user's game copy should know what to do with it by loading a prefab (hopefully you have in an array or list of gameobjects).
i suggest you consider all possibilitys of what your game will need for a file format to save and then think of the simplest way to represent an all inclusive way to send/load to the server.
if your game is simple or and your info is small, you could use a string format for your save file with handy split and parse functions using seporator charactors. if you need to save more advanced info such as pixel info or actual files. then you could use a byte array format probobly with some sort of key.
anyways, this question cant really be answered and a particular method can't be described without specifics of your program$$anonymous$$g or details about your game.
Your answer
Follow this Question
Related Questions
how make player database 1 Answer
Problem reaching highscore board - crossdomain.xml issue? 1 Answer
Saving Huge strings over the web 3 Answers
Dialogue strategy? 0 Answers
Unity PHP Database is going haywire 0 Answers