22.04.2013, 11:28
Hello, everyone.
Well I've been trying to rattle my brain on how to create a character system for my RP server that is efficient and doesn't cause lagg/stress on the server... My plan was to allow players to have a main account which inside contains probably a maximum of 3-5 character accounts...
Problem is I have a rough idea how I could have each individual characters data saved in the database but I don't know if it's an efficient way. My idea was to have separate data fields for every character for example... if I was saving a position of the characters, in the database make it like.
Meaning that the players character ones position is saved within Char1Pos(X, Y, Z). Character two is in the Char2Pos etc etc...
Personally I feel that's too much effort or even just a messy way to code it and eventually if enough players are on will cause major lag...
Does anyone have another solution to how I could do this? is there a way I could possibly set an array of floats in the database that could store all their characters floats in the same field, or is the way I've done it the best or maybe even the only way?
Thanks in advanced to your replies and help!
Well I've been trying to rattle my brain on how to create a character system for my RP server that is efficient and doesn't cause lagg/stress on the server... My plan was to allow players to have a main account which inside contains probably a maximum of 3-5 character accounts...
Problem is I have a rough idea how I could have each individual characters data saved in the database but I don't know if it's an efficient way. My idea was to have separate data fields for every character for example... if I was saving a position of the characters, in the database make it like.
Код:
Char1Posx (FLOAT) Char1Posy (FLOAT) Char1Posz (FLOAT) Char2Posx (FLOAT) Char2Posy (FLOAT) Char3Posx (FLOAT) Char3Posy (FLOAT) Char3Posz (FLOAT)
Personally I feel that's too much effort or even just a messy way to code it and eventually if enough players are on will cause major lag...
Does anyone have another solution to how I could do this? is there a way I could possibly set an array of floats in the database that could store all their characters floats in the same field, or is the way I've done it the best or maybe even the only way?
Thanks in advanced to your replies and help!