Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-29-2010, 06:56 AM   #1
Registered User
Join Date: Aug 2010
Posts: 1
Default flash game save

I am building a tycoon type game, something similar to a farm building game, or travian. I'd like the player to be able to have his progress saved, and be able to access the game from any computer. So I have to save the data on the server not on the players machine. I was thinking of sending the data to a php which saves it in a mysql database. But I can't do this every time the player takes an action or my server will eventually overload with database requests. I suppose I could make a save button but if for whatever reason the player doesn't hit that button or his connection drops the game progress will be lost. Do you have any other ideas on how I could solve this. How do other games solve this? For instance does travian make a database request every time you take an action?

P.S. I know travian is not flash
tripleb is offline   Reply With Quote
Old 08-29-2010, 04:56 PM   #2
Senior Member
Join Date: Feb 2008
Posts: 387

1) Autosave at predefined intervals.
2) Keep a local save, and upload the info whenever something major happens. Like you don't need to send each and every slash on a monster, rather the experience gained or lost at the end of the battle.

But, the best way is to limit how often the player can take an action, and query the server such that the actual task is performed serverside, and the result is returned to the game, instead of the other way around. This is the way games like travian work.
For example, if you hit a monster, send that info to server, and wait for the server to return how much health the monster has left. This way, the player relies on the server, and can't really force it to overload , also if for some reason the player suddenly disconnects, your server already will be updated to latest change.
My Site :- http://blog.bluemagica.com

I need a spriter, and a story writer for arcade fighter and a side-view RPG. If you can help, please pm me!
bluemagica is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:23 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.