Ex­po­nen­tial Idle Guides

Day 5: The Power of Stack­ing

Guide writ­ten by Minh Tea (prop). Con­tri­bu­tions from the Amaz­ing Com­munity.

Feel free to use the gloss­ary as needed.

Hola. It is dawn of the fifth day.

Today we are go­ing to bring the the­ory down to earth, be­cause ad­mit­tedly, big num­bers are very bland, and in this guide, you have to listen to me, be­cause this world needs sav­ing from mean­ing­less dopam­ine-in­du­cing di­ver­gence.

In this les­son, we will learn about a way to look at the the­ory’s bal­ance, so that we can fix its di­ver­gence. Then, we will con­tinue by im­ple­ment­ing a new term that util­izes the the­ory’s stor­age, called the in­ternal state.

▶︎ A new frame­work

. I will give the for­mula for its power as , and this will make sense as I give ex­amples. Ima­gine that had a cost pro­gress of 1, which means each level is twice as ex­pens­ive as the pre­vi­ous. However, when you buy a level, your in­come doubles, which means that the next level will cost the same amount of time as the pre­vi­ous, and the next of the next, ad in­fin­itum. In this case, 's power is cal­cu­lated to be , ex­actly 100%. In­deed, if your the­ory con­sists of only this , it shall never de­cay. times the amount of time to reach as the pre­vi­ous level. In this case, 's power is cal­cu­lated to be , or 50%. , a step­wise up­grade with base 2 and length 5. For this up­grade, 5 levels are needed for it to nearly double in value, which means that asymp­tot­ic­ally, its power has a for­mula of . For ex­ample, a up­grade with a cost pro­gress of 1, and base 2 length 5 as be­fore, has a power of , or 20%. with a dif­fer­ent base than 2, such as or , the power for­mula be­comes . This is the case with our up­grade , which is pro­por­tion­ate to ( be­ing the golden ra­tio), and so its power is rep­res­en­ted as . to yield 23%). is quite the most power­ful up­grade in our the­ory. While we want to re­duce its power over­all, we don’t want it to be­come so bad that the early game slows down to a crawl. Let’s in­tro­duce a new tool to our bal­an­cing toolkit: . These al­low the the­ory to split the up­grade into two lay­ers, each with its own cost model: level 30, you no­tice that 's cost jumps down as the com­pos­ite cost switches to the second model. This won’t af­fect any­thing, but your play­ers might be an­noyed by that. Simply set the second cost’s ini­tial cost to something higher, or just leave it be, be­cause who does­n’t want lower costs to go faster?

▶︎ Time to ac­cu­mu­late new friends

be­cause of the name (do not listen to those who name their in­stant up­grades !) up­grade a bit fur­ther into pro­gres­sion. One of the ways to do this, is to re­quire a mile­stone to un­lock the up­grade. Let’s make a mile­stone that un­locks : ex­po­nent mile­stone, we as­sign static strings, and up­date the primary equa­tion when we buy or re­fund it. However, in or­der to make the up­grade also ap­pear and dis­ap­pear (al­though at this point we haven’t pro­grammed it), let’s make an func­tion and call it here, as well as at the end of . Let’s leave it empty for now. be­fore the term it­self, so that we have something to put into : , its proper name is (‘q dot’), which in­dic­ates the change of ac­cord­ing to time. This is called the dot nota­tion, or New­ton’s nota­tion, after Isaac New­ton. The game uses this nota­tion be­cause it is much more com­pact com­pared to Leib­n­iz’s nota­tion (). term, and dis­play its value on screen: is ad­ded onto our cu­mu­lat­ive vari­able , which is cal­cu­lated by our up­grade times the amount of time passed. Our in­come is then mul­ti­plied by amongst other terms. However, what hap­pens when we don’t have the mile­stone, is that has to stop grow­ing ( is sub­sti­tuted with zero), and in the in­come for­mula is sub­sti­tuted with one since we do not have the term un­locked. The primary and ter­tiary equa­tions are also re­flect­ive of these changes, and the ter­tiary equa­tion spe­cific­ally needs to be up­dated every tick to track the value. Fi­nally, should be re­set every time we hit Pub­lish, in the func­tion.

▶︎ A the­ory’s in­ternal state

has been re­set back to one! (I am such a mean teacher). The reason why this hap­pens, is that un­like up­grade levels, cur­ren­cies, or mile­stones, terms like are just reg­u­lar pro­gram­ming vari­ables, which aren’t saved any­where out­side of the scope that it’s run­ning in. In or­der to save these vari­ables, the game provides us a way to store (seri­al­ize) them, in the form of an in­ternal state. The in­ternal state is stored as a string, and is loaded once after everything in the the­ory file has been loaded (which means it is run even after ). , which stores the base 64 rep­res­ent­a­tion of the vari­able , which can be ac­cessed with . 's value should be pre­served.

▶︎ Af­ter­math

is a step­wise up­grade of base 2 length 10, with a cost pro­gress of 2.5. Un­der this frame­work, it should have a power of , or 4%, which brings the total power of the the­ory from 94.93% to 98.93%. While how much 's cu­mu­lat­ive nature en­hances its power (or whether it even does so at all) is still a mys­tery, we can be sure that we did make pro­gress today, so I shall see you .