Last week, I mentioned all the problems I was having implementing one of the game's key elements -- two separate clouds combining into one big one. After taking some time to spackle over the hole in the wall my banging head made, I tried an idea.
Round one just has the regular cloud generation routine. It's a random timer, activating somewhere between one second and 2.5 seconds. Round two, I set up a second generator that runs concurrently with the other, a random timer set between 1.5 seconds and 3.5. As a result, it produces clouds as well, and the program sees the clouds as completely seperate entities. They collide the big cloud is generated.
Yes? You in the back? You have a question?
[student from back of class]: But, Mr. G, if the clouds generated collide with their own clones, it won't produce a collision.
You are correct. However, the clouds generated will never run into their clones. I spent the week testing the speed of the clouds. Since they rise at a constant rate, once one is generated, no similar cloud generated will ever catch up to it. Research indicated that there needed to be about .65 seconds between cloud appearances to keep them from overlapping and throwing things off. So now, if two clouds appear in the same horizontal level, they have to be different ones, they can never be clones of themselves.
[student from back of class]: Gee! You're a genius, Mr. G!
You're too kind.
[student from back of class]: Oh, no! You are the smartest person on the face of the Earth, better than Cecil Adams and Alan Cox put together!
I'll give you three hours to stop that.
Also implemented a pause feature.
So, the goal for the coming weekend is to get Round 3 done. 1 is the start, 2 is where the combining clouds first appear. 3 is going to be busier, and the skills people use to get descending clouds to clear the area and recover water will be really key from here on out. I'm actually starting to enjoy playing this during my tests!