How do I Make a Idle Game

0 favourites
  • 7 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • So The features I'm looking to be able to do is, click on a object which adds to a total.

    Click on an upgrade which adds to the total every second.

    Anyhelp?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • first thing to do is to add 2 buttons, 2 texts and the mouse object.

    give one text object the following instance variable(you can add these in the properties menu on the left of the screen). Call the variable Score, this will be a number starting from 0.

    Give the other text object the variable UpgradeCost also starting from 1

    in the event do the follow thing:

    Mouse > On object clicked > left clicked on "first button"[/code:tajp3dbc]
    This will perform an action when a user clicked on the button
    
    The action will be:
    [code:tajp3dbc]"text with the score variable" > add to > 1 to Score.
    "text with the score variable" > set text > "Score: " &[name of the button].Score [/code:tajp3dbc]
    This will add 1 to score every time the button is pressed.
    
    The other button will upgrade the automatic scoring. The event will be:
    [code:tajp3dbc]Mouse > On object clicked > left clicked on "second button".
    "text with the upgrade variable" > Compare instance variable > Upgrade equal or larget then "int(self.Upgrade^1.5+1)"[/code:tajp3dbc]
    The action will be:
    [code:tajp3dbc]"text with the upgrade variable" > add to > 1 to upgrade.
    "text with the upgrade variable" > set text > "Upgrade cost: " & int([name of the 2nd button].Upgrade^1.5 + 1) [/code:tajp3dbc]
    This will add 1 to upgrade every time Upgrade has been "upgraded". The price of the upgrade will be raise with the formula 'Upgrade ^ 1,5 + 1'
    
    Thats it. Try change the formula to your own to make the game interesting
  • first thing to do is to add 2 buttons, 2 texts and the mouse object.

    give one text object the following instance variable(you can add these in the properties menu on the left of the screen). Call the variable Score, this will be a number starting from 0.

    Give the other text object the variable UpgradeCost also starting from 1

    in the event do the follow thing:

    Mouse > On object clicked > left clicked on "first button"[/code:3pt2hple]
    This will perform an action when a user clicked on the button
    
    The action will be:
    [code:3pt2hple]"text with the score variable" > add to > 1 to Score.
    "text with the score variable" > set text > "Score: " &[name of the button].Score [/code:3pt2hple]
    This will add 1 to score every time the button is pressed.
    
    The other button will upgrade the automatic scoring. The event will be:
    [code:3pt2hple]Mouse > On object clicked > left clicked on "second button".
    "text with the upgrade variable" > Compare instance variable > Upgrade equal or larget then "int(self.Upgrade^1.5+1)"[/code:3pt2hple]
    The action will be:
    [code:3pt2hple]"text with the upgrade variable" > add to > 1 to upgrade.
    "text with the upgrade variable" > set text > "Upgrade cost: " & int([name of the 2nd button].Upgrade^1.5 + 1) [/code:3pt2hple]
    This will add 1 to upgrade every time Upgrade has been "upgraded". The price of the upgrade will be raise with the formula 'Upgrade ^ 1,5 + 1'
    
    Thats it. Try change the formula to your own to make the game interesting
    

    how do you add offline earning?

  • So.. I believe you can do it the way adventure capital does it... When you log out of the game saves the time, then when they log in compare the time difference. I'm using an add-on for time I can't remember the name of that allows for better comparisons. Basically your checking the last time something was updated, then adding the value to score when they really load... I'll try and remember to post the add-on name when I'm close to my CPU and not phone.

    Their may be a more efficient way, but this seems to work for me so far

  • WumpusThumper Hey there, welcome to the forums! I will first put in a little plug for my idle/clicker game template you can get on the store (https://www.scirra.com/store/games-with ... e-game-666), pretty cheap and a couple examples of ways to do what you are asking for with commenting for each of the parts.

    But I know a lot of people don't wanna buy anything on the store and learn themselves, so as what MythStylz said there is a great plugin from rexrainbow that I used in the template (http://c2rexplugins.weebly.com/rex_time_awayl.html)...actually just go through and download a ton of RexRainbow's plugins, they help a ton. But the TimeAway plugin will set a timer when you leave or close the game and when you come back you can just calculate the difference.

    Good luck!

  • Yeah that's the one

  • > first thing to do is to add 2 buttons, 2 texts and the mouse object.

    > give one text object the following instance variable(you can add these in the properties menu on the left of the screen). Call the variable Score, this will be a number starting from 0.

    > Give the other text object the variable UpgradeCost also starting from 1

    >

    > in the event do the follow thing:

    >

    Mouse > On object clicked > left clicked on "first button"[/code:364xe2xl]
    > This will perform an action when a user clicked on the button
    > 
    > The action will be:
    > [code:364xe2xl]"text with the score variable" > add to > 1 to Score.
    > "text with the score variable" > set text > "Score: " &[name of the button].Score [/code:364xe2xl]
    > This will add 1 to score every time the button is pressed.
    > 
    > The other button will upgrade the automatic scoring. The event will be:
    > [code:364xe2xl]Mouse > On object clicked > left clicked on "second button".
    > "text with the upgrade variable" > Compare instance variable > Upgrade equal or larget then "int(self.Upgrade^1.5+1)"[/code:364xe2xl]
    > The action will be:
    > [code:364xe2xl]"text with the upgrade variable" > add to > 1 to upgrade.
    > "text with the upgrade variable" > set text > "Upgrade cost: " & int([name of the 2nd button].Upgrade^1.5 + 1) [/code:364xe2xl]
    > This will add 1 to upgrade every time Upgrade has been "upgraded". The price of the upgrade will be raise with the formula 'Upgrade ^ 1,5 + 1'
    > 
    > Thats it. Try change the formula to your own to make the game interesting
    > 
    
    how do you add offline earning?
    

    so the first part in C3 is "Score: " & score

    How do you solve the: "Upgrade cost: " & int([name of the 2nd button].Upgrade^1.5 + 1) -thing?

    Cause C3 does not recognize this way.

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