First off - want to say awesome product. I'm using it with Unity 3D and the C# API and it's incredible how fast prototyping and development can be done, even though I'm not that proficient in C#.
Anyway, question: If I am creating a fighting game say, and there's multiple players, is it best practice to:
A). Store the abilities (ie. Sword Slash - damage x-y, time 3 seconds) in a database
or
B). Store these in a server extension.
We have a normalized database that we're accessing via a java extension, but it occurs to me that it might be better to only store data the user can change (location, equipment etc.) in the DB and keep static elements of the game logic in the server code such as attack abilities etc.
I realize this isn't completely specific to SFS but since the server extensions are so flexible I thought someone might have suggestions.
Cheers,
Database or in Server Extension?
Hey,
I would advise to use smartfox's user variables for x and y positions and anything that may be altered many times (or use a custom string extension message). Use the database if a user need to save data for next login. (i.e. my last known position etc). When a user logs out, his saved data is lost (usually). Also, it's not a good idea to save things on server side extension - because if your extension encountered a crash and it may need restarting (thus re-initializating all the varaibles)
I would advise to use smartfox's user variables for x and y positions and anything that may be altered many times (or use a custom string extension message). Use the database if a user need to save data for next login. (i.e. my last known position etc). When a user logs out, his saved data is lost (usually). Also, it's not a good idea to save things on server side extension - because if your extension encountered a crash and it may need restarting (thus re-initializating all the varaibles)
Smartfox's forum is my daily newspaper.
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 68 guests