Webgame, as its name implies, is a web browser-based online multiplayer game. In other words, the white dot is actually a game played by a browser, and it does not need to download the client, anywhere, anytime, any computer that can access the Internet can play a happy game.
I don't know if you have played web games. If you haven't recommended two
Ogame: http://www.ogame.com.cn
Wulin Three Kingdoms: http://www.50sg.com
These web games all have a feature: Automatic Resource growth. For example, if a level-1 logging farm is built, your wood resources will automatically grow at a rate of U (20 timber/hour, even if you are not online.
This is the question I want to discuss with you. How does this automatic growth come about?
I thought about two solutions:
1. Update the total amount of wood in the database at a specified time. Total Amount = total amount + U.
2. Insert a record in the database at intervals. The record value is U, and the total value is the sum of all values.
If you have a webgame developer, please let us know. I am very grateful to you for your discussion.