N
N
No_Time2012-11-08 21:43:50
JavaScript
No_Time, 2012-11-08 21:43:50

[UPD] Tell me how to implement game timers?

Good evening!

Please tell me, what is the best way to implement timers in an online game? Suppose a building is under construction for n time, how best to organize the process of waiting for the end of construction?

I would be grateful for any materials on this topic! Thank you!

UPD:

If done on a node with timers, how productive will this solution be?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
mrspd, 2012-11-08
@mrspd

I once asked a similar question: habrahabr.ru/qa/15820/

T
Tenkoff, 2012-11-09
@Tenkoff

In the browser, you take and hang up the timer in the object of the building that is being built.
On the server, if it’s very rude, we hammer into the database and pick up objects that are already rotten in time and do something.
But the most delicious way is to cut down the event model of the “world”.
It seems to me that the correct solution should be chosen from more accurate input data, how many objects should be on the timer, whether they have interaction, how much it needs in real time, how many users it needs to be given, etc. etc.

H
HEm, 2012-11-08
@HEm

quite recently, it seems that right there on habré there was an article about this very thing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question