Two things follow this mechanism: the Golden cookie (Wrath Cookie) and Reindeer. They are called shimmers in the game. The spawning mechanism is probabilistic, however the probability density function can be approximated by a simple function. This mechanism is also affected by your current FPS (frames per second), which can be changed via cheating. From now on we shall assume the FPS is 30.

Let us first ignore the initial **T _{min}** seconds during which the probability of spawning Golden Cookie is 0.

There are two basic parameter for shimmers; **T _{min}** and

**T**, and there are many factors in the game can alter these two parameters

_{max}^{[note 1]}. For first

**T**seconds, the probability of spawn shimmers is 0. After

_{min}**T**seconds every frame, the game checks if a random number between 0 and 1 is less than the proportion of time elapsed and the difference between the maximum and minimum time, taken to the 5th power. Define the test probability at frame n:

_{min}

Where **N=30(T _{max}-T_{min})** frames is the difference of max time and min time in frame. The probability of spawning the shimmer at frame

**n**is:

This means the game failed to spawn from frame 1 to frame **n-1**, but successes at frame **n**. To calculate cumulative density function, which means probability of spawing before frame **n**, we must sum over **p _{n}**:

When **n=N**, we have **f _{N}**=1 and

**P**=1 which means the shimmer is guaranteed to be spawned before frame

_{N}**N**. So far everything is exact, and

**n**is a discrete integer. We shall approximate

**n**as a continuous real number. Notice that:

Since the time of each frame is short compared to the maximum time, we may approximate the difference of left hand side as a derivative:

This differential equation can be solved normally. The cumulative density function of the cookie spawning at **k**th frame is:

We can change the time unit to more familiar second. Let **k=30t** and **N=30T**, and we have:

and

The resulting cumulative probability of the cookie spawning looks logistic, with the probability early in the range nearly zero but increasing extremely quickly. This function fits well, but fails when **t=T=T _{max}-T_{min}**:

However, it should not be an issue in most cases, since **T** is usually larger than 10 in the game and **P(T)** is extremely close to 1.

So far we have ignored first non-spawning **T _{min}** seconds, which means

**p(t)**actually represent the probability of spawning at

**t+T**seconds, not

_{min}**t**seconds. Let us define a new probability function

**p(t)**, which represents the probability of spawning at

**t**seconds.

Similarly, we can define a new cumulative probability function **P(t)**, which represents the probability of spawning before **t** seconds.

It is also convenient to consider the inverse function of **P(t)**:

The expectation value of spawning time can be obtained:

Where **Γ** is the gamma function.

## Notes[]

- ↑ You may use the command "Game.shimmerTypes[
*type*].minTime" and "Game.shimmerTypes[*type*].maxTime" in the console to check the actual value in the game.*type*can be*golden*or*reindeer*and the unit is frame.