Skip to main content
edited tags
Link
Gnemlock
  • 5.3k
  • 5
  • 30
  • 60
Post Closed as "Not suitable for this site" by DMGregory, Vaillancourt, Anko, Seth Battin, bummzack
Title is more specific
Source Link
Vaillancourt
  • 16.4k
  • 17
  • 56
  • 61

So I saw this piece of code while doing research for an idle game I am making:

var minions = new Object;
minions = {
    0: {
        name: "Mole",
        description: "...",
        price: 10,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 1
        }
    },
    1: {
        name: "Bulldog",
        description: "...",
        price: 1e3,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 70,
            diamondsPerSec: .5
        }
    },
    2: {
        name: "Giant Ant",
        description: "...",
        price: 1e5,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 700,
            diamondsPerSec: 3
        }
    },
    3: {
        name: "A.W.E.S.O.M.-O 2000",
        description: "...",
        price: 1e6,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 5e3,
            diamondsPerSec: 20
        }
    },
    4: {
        name: "Caterpillar",
        description: "...",
        price: 8e7,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 3e4,
            diamondsPerSec: 100
        }
    },
    5: {
        name: "Pterodactyl",
        description: "...",
        price: 19e8,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 85e3,
            diamondsPerSec: 400
        }
    },
    6: {
        name: "Miner Spaceship",
        description: "...",
        price: 29e9,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 5e5,
            diamondsPerSec: 2700
        }
    },
    7: {
        name: "The dwarf King",
        description: "...",
        price: 3e11,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 3e6,
            diamondsPerSec: 16e3
        }
    },
    8: {
        name: "Spirit Golem",
        description: "...",
        price: 5e13,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 25e6,
            diamondsPerSec: 98e3
        }
    }
};
var minions = new Object;
minions = {
    0: {
        name: "Mole",
        description: "...",
        price: 10,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 1
        }
    },
    1: {
        name: "Bulldog",
        description: "...",
        price: 1e3,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 70,
            diamondsPerSec: .5
        }
    },
    2: {
        name: "Giant Ant",
        description: "...",
        price: 1e5,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 700,
            diamondsPerSec: 3
        }
    },
    3: {
        name: "A.W.E.S.O.M.-O 2000",
        description: "...",
        price: 1e6,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 5e3,
            diamondsPerSec: 20
        }
    },
    4: {
        name: "Caterpillar",
        description: "...",
        price: 8e7,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 3e4,
            diamondsPerSec: 100
        }
    },
    5: {
        name: "Pterodactyl",
        description: "...",
        price: 19e8,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 85e3,
            diamondsPerSec: 400
        }
    },
    6: {
        name: "Miner Spaceship",
        description: "...",
        price: 29e9,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 5e5,
            diamondsPerSec: 2700
        }
    },
    7: {
        name: "The dwarf King",
        description: "...",
        price: 3e11,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 3e6,
            diamondsPerSec: 16e3
        }
    },
    8: {
        name: "Spirit Golem",
        description: "...",
        price: 5e13,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 25e6,
            diamondsPerSec: 98e3
        }
    }
};
And I have a small idea of what is being done here but my question is how would this code be handled or triggered. Really all I need is the name for what this is, and I can take it from there thanks:)

And I have a small idea of what is being done here but my question is how would this code be handled or triggered.

Really all I need is the name for what this is, and I can take it from there :)

So I saw this piece of code while doing research for an idle game I am making:

var minions = new Object;
minions = {
    0: {
        name: "Mole",
        description: "...",
        price: 10,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 1
        }
    },
    1: {
        name: "Bulldog",
        description: "...",
        price: 1e3,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 70,
            diamondsPerSec: .5
        }
    },
    2: {
        name: "Giant Ant",
        description: "...",
        price: 1e5,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 700,
            diamondsPerSec: 3
        }
    },
    3: {
        name: "A.W.E.S.O.M.-O 2000",
        description: "...",
        price: 1e6,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 5e3,
            diamondsPerSec: 20
        }
    },
    4: {
        name: "Caterpillar",
        description: "...",
        price: 8e7,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 3e4,
            diamondsPerSec: 100
        }
    },
    5: {
        name: "Pterodactyl",
        description: "...",
        price: 19e8,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 85e3,
            diamondsPerSec: 400
        }
    },
    6: {
        name: "Miner Spaceship",
        description: "...",
        price: 29e9,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 5e5,
            diamondsPerSec: 2700
        }
    },
    7: {
        name: "The dwarf King",
        description: "...",
        price: 3e11,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 3e6,
            diamondsPerSec: 16e3
        }
    },
    8: {
        name: "Spirit Golem",
        description: "...",
        price: 5e13,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 25e6,
            diamondsPerSec: 98e3
        }
    }
};
And I have a small idea of what is being done here but my question is how would this code be handled or triggered. Really all I need is the name for what this is, and I can take it from there thanks:)

I saw this piece of code while doing research for an idle game I am making:

var minions = new Object;
minions = {
    0: {
        name: "Mole",
        description: "...",
        price: 10,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 1
        }
    },
    1: {
        name: "Bulldog",
        description: "...",
        price: 1e3,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 70,
            diamondsPerSec: .5
        }
    },
    2: {
        name: "Giant Ant",
        description: "...",
        price: 1e5,
        priceModifier: 1.5,
        attributes: {
            goldPerSec: 700,
            diamondsPerSec: 3
        }
    },
    3: {
        name: "A.W.E.S.O.M.-O 2000",
        description: "...",
        price: 1e6,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 5e3,
            diamondsPerSec: 20
        }
    },
    4: {
        name: "Caterpillar",
        description: "...",
        price: 8e7,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 3e4,
            diamondsPerSec: 100
        }
    },
    5: {
        name: "Pterodactyl",
        description: "...",
        price: 19e8,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 85e3,
            diamondsPerSec: 400
        }
    },
    6: {
        name: "Miner Spaceship",
        description: "...",
        price: 29e9,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 5e5,
            diamondsPerSec: 2700
        }
    },
    7: {
        name: "The dwarf King",
        description: "...",
        price: 3e11,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 3e6,
            diamondsPerSec: 16e3
        }
    },
    8: {
        name: "Spirit Golem",
        description: "...",
        price: 5e13,
        priceModifier: 1.3,
        attributes: {
            goldPerSec: 25e6,
            diamondsPerSec: 98e3
        }
    }
};
And I have a small idea of what is being done here but my question is how would this code be handled or triggered.

Really all I need is the name for what this is, and I can take it from there :)

Understanding a piece of codeJavascript Variable Initialization

Source Link
Loading