This episode is split in two parts. Our goal is to create an array of animated objects. We will create a few hundred pulsating circles.
In the first part of this episode we create two files: a very simple main program, and a class file where we define Bug, our animated circle. The size of this circle will increase and decrease regularly. Each of our bugs will have six properties: the horizontal and vertical position, the current size, the maximum and minimum size, and the "growth direction": a value that indicates how much the circle grows or shrinks on each frame. If that value is positive, it means the circle is getting bigger. If it's negative, the circle is becoming smaller. If you have a number, and add a negative number to it, the resulting number is always smaller. That's how the circle shrinks. For instance, assume the circle has size 20. If you add -1 to it, you get 19. Add -1 again and you get 18. I hope you get the idea.