Particle system and layered independant harmonic motion is used to simulate moths/fireflies. Movement is a combination of two oscillations (one on each primary axis) with randomized amplitudes and frequencies. A third oscillation is applied to opacity to give the impression of z-axis movement. Moths move towards several goal points on screen (denoted with small stars), and use probabilistic decision making to select new goals at random intervals. The result is a lifelike imitation of moth-like behaviour.