Talk:Expansions/@comment-49697-20120821020450/@comment-5116140-20120821024244

Expansion Anomalies Part 2

What would be an example of such a side effect? How could it cause an anomalous expansion.

Well a common code error is to confuse the new value of some critical parameter with the old value. Suppose there is a variable called Width = 70, which gives the present size of a maxed out village. Suppose in the future the variable is planned to be reset to Width = 86.

Suppose at present the program calculates the typical 3 pixel addition in a variable called say margin, using

margin = (Width - 22)/16 = (70 -22)/16 = 48/16 =  3 Pixels each expansion

Now by mistake the proposed new and larger value of Width gets used in some block of new code. This would give:

margin = (Width -22)/16 = (86 - 22)/16 = 64/16 = 4 Pixels each expansion

Some similar such side-effect may be operating here and causing the anomalous expansion. Warning, all this is highly speculative. It is only meant to illustrate the side-effect notion. I have tweaked the numbers to ilustrate my point.