Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 22-10-2009
Member
 
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?
Reply With Quote
  #2  
Old 22-10-2009
Member
 
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.
Reply With Quote
  #3  
Old 22-10-2009
Member
 
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.
Reply With Quote
  #4  
Old 22-10-2009
Member
 
Join Date: May 2008
Posts: 2,008
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Run a countdown as in some online games"
Thread Thread Starter Forum Replies Last Post
What are the best Online RPG games? Elili Video Games 5 04-05-2012 01:04 PM
online games - how to Alexlogie Video Games 2 09-08-2010 12:42 PM
online problems: lag on online games and very slow download speeds James Brown Vista Help 7 16-01-2010 04:42 PM
Online games lag on Windows 7 RTM Jaimenacho Technology & Internet 3 04-12-2009 06:20 AM
Non-online RPG games Hulk the Savior Video Games 4 28-07-2009 11:37 PM


All times are GMT +5.5. The time now is 06:09 AM.