PDA

View Full Version : income???



benjaminj88
09 Aug 2010, 12:12 PM
So about income with programming. No I don't exactly mean how much you make, I'm working on a PBB RPG (Persistant Browser Based, Role Playing Game) and have had troubles when comming up to income.

Now of course there will be an option where a user simply clicks a link and it will set their player to work for 8 hours or whatever, which after that time will provide an amount of currency for that time.

Now another feature in the game is going to be allowing them to mine or harvest resources, This is where I am stuck. How exactly can i make it so that a user does not have to simply wait for an hour to havest 600 worth in crops? but for each occurring minute that passes they will have 60 worth in crops harvested? Any ideas on how to make this from static to dynamic?

TheMichael
09 Aug 2010, 01:32 PM
On page load, calculate how long it's been since the last harvest, then give the player his crops.