Ok, heres the deal... a couple of friend's and myself decided we were going to learn PHP and create a game based on a game I saw a last year. This is for our final project at our technical college.
So far, everything has gone smoothly. Now, though, we are at the point where we want to set a delay to have things created. (It is a "RTS" based game... you create buildings and soldiers and go out and fight other nations) Lets say you want to make a house. You click the create button for house. I do not want the house to be created instantly, I want there to be a delay of, say, an hour (this game is intended to be played in the background as you go about your daily activities). How do I set it so that the database dosn't update the "houses" field for the specified player until the hour is up? Also, it would be cool if I could show a count-down timer to when the house would be completed.
The other issue we have with timers is that we want to be able to have resource havesters running constantly. Say a player puts 2 of his population into gold mining... that should be 2 units of gold per hour (according to the way we planned the game out). How do I accomplish this, so that once per hour it checks how many miners the player has, and credits their gold columb on the db with the right amount, even if they have left the game web page / logged out?
Thanks ahead of time...
Brian