Fake or create logic that always runs even when off?

Get help using Construct 2

Post » Tue Jun 30, 2015 10:28 pm

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?
B
59
S
19
G
3
Posts: 446
Reputation: 6,327

Post » Tue Jun 30, 2015 10:34 pm

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
B
15
S
3
Posts: 57
Reputation: 909

Post » Tue Jun 30, 2015 11:19 pm

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.
Image Image
B
25
S
14
G
139
Posts: 876
Reputation: 72,510


Return to How do I....?

Who is online

Users browsing this forum: worm1 and 21 guests