Jump to content
MakeWebGames

Leaderboard

Popular Content

Showing content with the highest reputation on 12/27/2015 in all areas

  1. So far we have seen the ups and downs of the MWG community. Although McCodes in my opinion was MWG's most talked about topic I feel like we have to accept it's faith, look MCC is dead... In my eyes without it we see a community slowly dying. The lack of support back then has truly affected this forum and I'd hate to see it die but if nothing is done about it the forum will most likely die. I'd like to praise [uSER=53642]dave[/uSER] for taking over the forum and giving us a nice revamp he should really be applauded. Id also like to thank some of MWG's hardworking members who give their time t
    1 point
  2. I would advice against updating your database every minute. Instead you should as Coly suggested have a timestamp in your database that you can later use to calculate on how much points the user should be given when it's actually requested (needed). If the player would want to do something that costs AP, first calculate on how much points they have gained since last it was updated, update the points and finally do the requested task. It will save you a lot of redundant database queries. This is how larger games such as Travian handles it. They pass the formula (x resources per second and how m
    1 point
  3. Create a new column in the users table called last_AP . Give it an int(11) data type. My SQL is rusty, if this is wrong someone correct it ALTER TABLE users ADD last_AP int(11);   Next, at the bottom of your globals file add this:   $AP_Interval = 60; if(time() - $ir['last_AP'] >= $AP_Interval){ $db->query("UPDATE users SET ap=ap+1, last_AP=".time()." WHERE userid=".$userid); }   This is the logic behind adding the code. It will keep it in tune across multiple pages as an Ajax timeout set at 60 seconds will only work for however long the player stays o
    1 point
×
×
  • Create New...