Results 1 to 4 of 4

Thread: Run a countdown as in some online games

  1. #1
    Join Date
    Aug 2009
    Posts
    56

    Run a countdown as in some online games

    I would like to find a way to run a countdown like in some online games.

    Let me explain:

    The player launches action X, he has the choice (30 min, 1 hour, 2 hours, 10 hours) ...

    For example he chose 2 hours, the meter displays: you still have 2 hours to develop the competence Y.

    From there things get complicated, I:
    - Can make a statement to the second: 1h 59min 59sec ... 1h 59min 58sec ... 1h 59min 57sec ... etc., until the end of time remaining
    - Can resume the count if the player changes the page and then returns to the page counter
    - At the end of the meter run a SQL query that will update the jurisdiction (even if the user is not logged): not an action the player to start the query ...

    Can you enlighten me on the technique used?

  2. #2
    Join Date
    May 2008
    Posts
    685

    Re: Run a countdown as in some online games

    What kind of program? Traditional program where there is a file ".Exe" on a machine (and if so with what OS and programming language), or a program client server type where there is a part of the program on a server, and another part at the user (and in that case with using a web browser or another solution)?

    The more complicated is the case of client server, because the clock must be enabled on the client side. For an Internet application, it can be done with a timer that makes regular or submit with Ajax.

  3. #3
    Join Date
    Aug 2009
    Posts
    56

    Re: Run a countdown as in some online games

    Its client server (php/mysql) and a web browser.

    For me the counter is not complicated (experienced during the base end date + javascript function that count, it must be able to do), the most complicated being launched at the end of time the query that will come to update the skills (even if the user is not logged) and then I see nothing.

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: Run a countdown as in some online games

    The meter is handled server side, not client side (risk of hack). When you generate your php page, you initialize counters with JavaScript. For the management of the end of the application, I would rather the reverse. Since we launched the jurisdiction, we add a base line saying that the comp will be active from 12:43 ET 27s

Similar Threads

  1. What are the best Online RPG games?
    By Elili in forum Video Games
    Replies: 5
    Last Post: 04-05-2012, 01:04 PM
  2. online games - how to
    By Alexlogie in forum Video Games
    Replies: 2
    Last Post: 09-08-2010, 12:42 PM
  3. Replies: 7
    Last Post: 16-01-2010, 04:42 PM
  4. Online games lag on Windows 7 RTM
    By Jaimenacho in forum Technology & Internet
    Replies: 3
    Last Post: 04-12-2009, 06:20 AM
  5. Non-online RPG games
    By Hulk the Savior in forum Video Games
    Replies: 4
    Last Post: 28-07-2009, 11:37 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,199,867.88358 seconds with 16 queries