Friday, 21 September 2012

A New Direction to Success... Hopefully

My new take on my fireworks code is to be about spawning fireflies. The interaction is when the user clicks on the screen a 'jar' begins to grow for as long as the mouse is held down. As it grows it begins to become more red and the tension builds inside it, causing it to vibrate. When this tension gets too great or the mouse is released the jar holds for a moment then bursts.

While the jar grows it spawns fireflies that at this point in time merely fall to the ground but once I figure out how will orbit the mouse as long as it is held down. Once the mouse is released the fireflies are free to roam as they please.

At the moment there is a problem with the fireflies in that to get them to work it requires a pair of nested 'for' loops that slows the program right down (as it's trying to run the jars as well), visible in the picture above with the unwanted trails behind the falling fireflies. I'll need to look into this to get it to run as smoothly as possible.

No comments:

Post a Comment