Are you treating the planets as points or discs? If you are treating them as points it could explain why i get some funny behavior when a small planet is by a big one, where the ball tends to the small planet rather than the big one. The mass of the planet is spread out among the area, not all at the center. Besides that, very enjoyable game. Well Done.