Page 1 of 1

Game Data - on Server or in SWF?

Posted: 28 Jan 2009, 12:38
by BattleSpace
Hello,

I've been away from SFS for a while but I'm now getting back into developing my games using SFS.

When I started my latest project (a turn-based game) I had all of the data such as unit information/stats in MySQL tables. I also had information about each scenario such as map layout (tiles), etc... This approach also requires time to load from the server everytime the game is played (each scenario).

Is this a proper approach or would it make sense to keep all of the game data inside the SWF file? The game data is meant to be static. The SWF would be encrypted and site-locked if they tried to download it. My main concern would be cheating such as changing a units stats... would that be even possible?

I will of course continue to keep general data about the user and game room on the server so my question is about the actual game data that loads before each scenario is started.

Thanks for any advice,
Brent

Posted: 29 Jan 2009, 04:01
by Carl Lydon
If the extension is downloading the same data repeatedly from a database, just do the query in the init() function, and put it into a variable, and send that variable to users whenever they login, so you don't have to hit the database each time.

Or, if you want to store the data in the swf, try to encrypt the file best you can.