How do I Create a offline earning calculations

0 favourites
  • 7 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • 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!!!!

  • So something like Tap Titans / Clicker Heroes where the player is still accumulating money even when the App is closed?

  • Yes.

  • 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.

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • where do i get a plugin rho?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)