How do I fake or create logic that progresses the game even though the user isn't playing? For example, if I have a farm, can it grow crops even though user isn't playing? What are some good logic to create this?
For me I ussualy use php & mysql. Do corn job add value to a specific table every hour or even minute and when client load player data through ajax, parse the data to the variable that will effect crops animation frame
Develop games in your browser. Powerful, performant & highly capable.
You can use the time difference between two gaming session (using this plugin by rex rexrainbow) , and depending on the comparison, adjust the objects changed by the time when loading the game.
The player plants crops and he leaves the game.
Crops grow in an hour and need water every 2 hours .
The player returns four hours later.
Loading, you compare and you know that crops are grown and they lack water for an hour.