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?
Football Dash: GooglePlay | AppStore

Zombie Bash: GooglePlay | AppStore

Kunkong: GooglePlay
B
69
S
23
G
3
Posts: 454
Reputation: 6,999

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
27
S
16
G
154
Posts: 887
Reputation: 80,202


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 58 guests