Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Beginner BeginnerMember since: 08.04.2012, 22:57Posts: 83Location: UK Likes: 0
 

 Post Topic: Persistent Data in CryENGINE 3
PostPosted 22.04.2012, 14:24 
Does anyone know if there is a way of utilizing data across game sessions ?

For example, I am going to try and implement a money system but I wish to have the players money stored across multiplayer sessions maybe even servers.

I've thought about implementing MySQL but I'm just wondering if there is any way with the vanilla SDK?


triplemint.

  Trained Modder Trained ModderMember since: 19.10.2008, 11:28Posts: 388Location: India Likes: 0
 

 Post Topic: Re: Persistent Data in CryENGINE 3
PostPosted 22.04.2012, 16:32 
well..
One not so elegant solution would be to physically store the data in an external file, which will get read at the start of your game session and saved at the end of it ?

RE
  Experienced Modder Experienced ModderMember since: 30.10.2011, 20:24Posts: 457 Likes: 3
 

 Post Topic: Re: Persistent Data in CryENGINE 3
PostPosted 22.04.2012, 16:37 
That sounds like you'd need a master server (probably the same one that provides a list of dedicated servers to the player) that keeps everyone's profiles stored in an SQL database, if it was stored locally the data could be lost or edited for cheating purposes. I know that's possible and I've done a similar thing before in Python, but how to implement it in the SDK... I haven't a clue.
User avatar   Beginner BeginnerMember since: 08.04.2012, 22:57Posts: 83Location: UK Likes: 0
 

 Post Topic: Re: Persistent Data in CryENGINE 3
PostPosted 22.04.2012, 19:59 
I'm thinking of storing the informaiton on localhost for testing purposes.

Yes, the data would most likely be stored on a server.

It looks like I'm going to have to go with MySQL Connector/C++.

My only problem is locating unique multiplayer information for each player, to use as a key.


triplemint.
  Experienced Modder Experienced ModderMember since: 30.10.2011, 20:24Posts: 457 Likes: 3
 

 Post Topic: Re: Persistent Data in CryENGINE 3
PostPosted 22.04.2012, 21:50 
Get them to specify a username and register it with your server and then have an online log in thing?
User avatar   Trainee TraineeMember since: 20.08.2011, 05:40Posts: 166 Likes: 0
 

 Post Topic: Re: Persistent Data in CryENGINE 3
PostPosted 23.04.2012, 06:28 
Don't directly connect to the database, use libcurl to input to a php script or else people will be able to alter your database