Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

node.js - Incrementing regularly vs updating when value is needed

I am going to be creating some kind of chatbot game where you can use money to buy factories that generate you more money over time. What I'm wondering is whether I should add the generated money to their balance regularly (for example, every 1 minute) or if I should use dates to calculate how much money their factories have earned and update their balance ONLY when the data is needed, such as when they check their balance or when they attempt to purchase something.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...