Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: brower game

  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    brower game

    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

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Location
    AZ, USA
    Posts
    685
    Thanks
    6
    Thanked 46 Times in 46 Posts
    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.

  • Users who have thanked binaryWeapon for this post:

    ksclans (06-12-2008)

  • #3
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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??

  • #4
    Regular Coder
    Join Date
    Sep 2007
    Location
    AZ, USA
    Posts
    685
    Thanks
    6
    Thanked 46 Times in 46 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •