View Full Version : brower game

06-12-2008, 03:21 PM
I am going to make a brower game,
and i have questionSSS
i see others games,like travian, mafia..those kind...they have something like product 200 wood per hour something like that, and there it show how many you have now, and it counting up .... without reloading pages...and i think it ajax?? or some kind ?? how to do that? thanks

06-12-2008, 04:08 PM
Yes, to do so without loading pages would be AJAX. They also have a server side language which AJAX sends a request to, and a database that the server-side language queries. My preference for serverside and database languages are php & mysql; php is similar to javascript.

There are some great online AJAX tutorials, you should check them out.

06-12-2008, 05:35 PM
ook, so ajax...
do i set 200 per hour or 200/60=3.333 min per 1 unit ?
like...do i set how many per hour or how many min it +1 wood or unit ?
get what i mean??

06-12-2008, 05:48 PM
The interval at which you could do things is entirely up to you. Personally, I would prefer the 3.3 minutes per unit method, because let us say you were only one unit short of reaching a goal. If it was 200/hour, you would have to wait a whole hour to get that unit (and 199 others, of course). With 1 unit/3.3 minutes, you would only have to wait 3.3 minutes.