How to: Travian tasks
Posted: Mon Sep 03, 2007 2:07 pm
Hi,
I don't know if you know travian. Travian (http://www.travian.com) is a browser game (programmed in PHP) where you can build your own village.
I was wondering how they program their building logs.
When a player wants to build something, he pays his recources and then the construction starts. The construction lasts a period of time (depending on the building).
Example.
I build a house: it takes 20 and 10 seconds minutes. 20 min 10 seconds later, I can see the house. Then I can build a threehouse, this takes 7min30sec. How do they program it that exactly after 7min30 sec, the building is made?
I don't think it can be done with a cron job... it would have to be run every second...
I don't know if you know travian. Travian (http://www.travian.com) is a browser game (programmed in PHP) where you can build your own village.
I was wondering how they program their building logs.
When a player wants to build something, he pays his recources and then the construction starts. The construction lasts a period of time (depending on the building).
Example.
I build a house: it takes 20 and 10 seconds minutes. 20 min 10 seconds later, I can see the house. Then I can build a threehouse, this takes 7min30sec. How do they program it that exactly after 7min30 sec, the building is made?
I don't think it can be done with a cron job... it would have to be run every second...