How do I Create a offline earning calculations

Get help using Construct 2

Post » Thu Apr 09, 2015 9:39 pm

So I'm a tad bit new to Construct 2 and I'm making a game something like AdVenture Capitalist if your familiar about that game and the game got me wondering how would a create a Offline Earning when the player gets off the App.... Any Suggestions of photos of what to do would help GREATLY!!!!
B
6
Posts: 31
Reputation: 316

Post » Thu Apr 09, 2015 9:55 pm

So something like Tap Titans / Clicker Heroes where the player is still accumulating money even when the App is closed?
B
4
S
1
Posts: 56
Reputation: 464

Post » Thu Apr 09, 2015 10:20 pm

Yes.
B
6
Posts: 31
Reputation: 316

Post » Fri Apr 10, 2015 3:51 am

You could store the day / time using websorage. Do this when the player closes the app (browser object I think).

Then when the player loads the game again, check the value in webstorage with the current date / time and calculate how much time has passed since they last played it..

So if they didn't play the game for 10 hours, and your game gives $1 every hour.. just add 10*1 to their money (obviously money is stored using webstorage too) when the player loads the game.

That's the simplest method.
B
15
S
5
G
7
Posts: 876
Reputation: 5,650

Post » Fri Apr 10, 2015 5:53 am

procrastinator wrote:You could store the day / time using websorage. Do this when the player closes the app (browser object I think).

Then when the player loads the game again, check the value in webstorage with the current date / time and calculate how much time has passed since they last played it..

So if they didn't play the game for 10 hours, and your game gives $1 every hour.. just add 10*1 to their money (obviously money is stored using webstorage too) when the player loads the game.

That's the simplest method.


If you could make a CAPX example of this I would be eternally grateful. I've been trying to do something like this without plugins and have had zero luck.
B
12
S
4
G
2
Posts: 132
Reputation: 1,749

Post » Fri Apr 10, 2015 7:40 pm

you need a plugin to get the system time.... though it would be easier to pull it from a server if you had one... it'd also mean that it couldn't be tweaked to earn more money by just changing phone clock time.
B
7
S
3
G
1
Posts: 184
Reputation: 1,352

Post » Fri Apr 10, 2015 8:47 pm

where do i get a plugin rho?
B
6
Posts: 31
Reputation: 316


Return to How do I....?

Who is online

Users browsing this forum: BackendFreak, farsen, kellehk, lahbach, MadSpy, newt, R0J0hound, TRMG and 21 guests