RageOnline, a web based game for the Empires community

Discussion in 'Off Topic' started by KILLX, Jan 17, 2009.

  1. Jcw87

    Jcw87 Member

    Messages:
    1,676
    Likes Received:
    0
    Trophy Points:
    0
    I see a problem with this. If you want to really do it that way, then you need to change some timestamps in the DB before opening the game. Else, when people log in for the first time, it will say "hmm, 1 week has passed since last update (register time) so i need to give him 1 week worth of resources at the CURRENT resource speed."

    Or, you can try to convince beerdude to make each planet perform a resource update whenever the speed is changed, before the change is applied.
     
    Last edited: Apr 18, 2009
  2. Jessiah

    Jessiah Member

    Messages:
    2,947
    Likes Received:
    0
    Trophy Points:
    0
    If I leave it at 0x for a bit, wont it give a week of res at 0x? Which is 0?
     
  3. Jcw87

    Jcw87 Member

    Messages:
    1,676
    Likes Received:
    0
    Trophy Points:
    0
    That's not how the calculation works at the moment. It keeps track of the last time a planet has been "updated." When it needs to update it again, it it uses the difference between the last time, and the current time. I dont remember the exact formula at the moment, but it will multiply in whatever the CURRENT resource speed is with no regard to what any previous value might have been. It does not keep track of previous speeds. Updates occur only when someone is logged in and views certain pages, or when someone sends a probe to one of their planets (i had to make it do that :p). So... you need to get beerdude to make it trigger an update on all planets when the speed changes, or you need to manually change the logged timestamp on every planet to the time when you plan on making the game go online. The timestamps are Unix timestamps, which, IIRC, are the number of seconds that have passed since January 1st, 1980.
     
    Last edited: Apr 18, 2009
  4. Jessiah

    Jessiah Member

    Messages:
    2,947
    Likes Received:
    0
    Trophy Points:
    0
    I don't know a lot about this stuff, but to me it sounds like this would work: Register a test user just before it goes live to get the unix value from. Apply that value to all the user time fields across the users table. Make game live.

    That would work, right?
     
  5. Jcw87

    Jcw87 Member

    Messages:
    1,676
    Likes Received:
    0
    Trophy Points:
    0
    Yeah, but that's not my preferred way to get the timestamp. But hey, whatever works for you. You will need to modify the "last_update" field in the "game_planets" table.
     

Share This Page