Custergrant 0 Report post Posted July 19, 2007 Hey guys,I'm currently making my own online PHP game, and I'm smack into the middle of the coding. The game is an industry/economy type game where you start out with some initial resources and a building and you expand your business empire by building more buildings that produce more buildings, which can be bought and sold on the live market. Basically, you try and become the wealthiest player in the game by the time the round ends.My problem is, I need my game to update hourly and not hourly. Meaning, I have codes that update my MySQL database when a user buys or sells and makes transactions in my game. But, every hour, I would like my game to update the users resources with the output that their buildings are creating. If that's a little confusing, it's like a user has a Sawmill that uses 50 logs/hour and puts out 25 Lumber/hour.I already have a table in my database that has the inputs and outputs/hour for the different buildings, but I need a way to update that into the users' resources. How would I go about doing that? Someone mentioned a cron job, but I'm not too sure. Share this post Link to post Share on other sites
9block 0 Report post Posted July 19, 2007 Well, I googled around a bit, and the cron option seems the most popular. I seen someone mention a perl script that runs periodically. I don;t know much (actually, almost nothing) about PHP, but could you simply run a second PHP script with a timer or schedual that would trigger a class to update the mySQL? Share this post Link to post Share on other sites
it01y2 0 Report post Posted July 19, 2007 Try the game travian out and get some ideas of making a game, I am currently making a online game, and i have managed to create a online update system to update resources for each user: crop,iron,bronze and lumber.If you need any scripts email me or pm me, my website which has many errors and is under construnction is http://forums.xisto.com/no_longer_exists/ Share this post Link to post Share on other sites
Custergrant 0 Report post Posted July 19, 2007 Yah, I used to play Travian. I would need an update system close to that. Do you have MSN? Share this post Link to post Share on other sites
it01y2 0 Report post Posted July 20, 2007 Yah, I used to play Travian. I would need an update system close to that. Do you have MSN?yea i have msn messenger it is ichhabezwei@hotmail.com Share this post Link to post Share on other sites