Answer the question
In order to leave comments, you need to log in
[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
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question