Here are some comments I have about my program so far
Fairy Comments:
-As soon as I ran the sketch I realised I had forgot to add smooth();
-The fairies are all 'breathing' (glowing on and off) at the same time. Because I'm stupid.
The values that I passed to the fairy constructor were the initial x, y position, the speed (how much to increment the x/y by each step) and the starting point for the count. I used this count with a sin wave to get the 'breathing' smooth...and I passed it a random number between 0 and 1...oops.
So I can fix that problem really easily.
-When they bounce off one of the walls they end up going backwards and forwards in a straight line, this
is because only their x OR y direction is altered in the outOfBounds() method, This conditional checks if the fairy would go out of bounds(offscreen) in the x direction, and reverses the x direction it's travelling.
I probably need to alter the other axis at the same time to fix this.
-They are moving a bit too fast for my liking. But I figured out that was because of another mistake on my part. In the new fairy() call above you can see that after the initial x and y positions I pass it the x and y increments. I thought they were moving far too fast so I changed it from a random number from -20 to 20 to a random number between -1 and 1...but I only changed the y increment...oops again.
I need to change the x increment as well , now that I come to think of it, changing that would probably solve the problem above about them whizzing to and fro in pretty much horizontal lines.
Net Comments:
I'm not actually finished with the net part of the code, so these comments don't cover everything.
-It's not very obvious from this screen cap but when you draw a net it not only traps the fairies inside the net but also stops the ones up till about where I have drawn that red circle.
I realised this was due to another mistake on my part.
In the conditional below I'm checking if the distance between the fairy and the centre of the net, but what I had named 'rad' for radius actually held the diameter.
Things I still need to code:
-The fairies that are trapped are supposed to get faster and brighter, In my current code there is no place where the fairies' trapped boolean is set to true so I'll need to call a checkIfTrapped() method every time a net is closed (i.e. the mouse is released)
-When to 'break'
The trapped fairies are supposed to get brighter and faster until they break the net.
so I'll need to write a break method, this could be an opportunity for some nice shattering graphics.
Net limitations, I need to make sure you can only make nets up to a certain size otherwise you could just make a net as big as the screen and trap all the fairies, which wouldn't be as fun.
If I'm going to make the maximum net size smaller I could let the user have more than one net at once. That way it could be interesting to work out how to position your two nets so as to catch the most fairies.
Visual Consideration -I think it may be more interesting if the fairies varied in size or hue ever so slightly.
I also was the nets to just be outlines...and not to breathe with the fairies.
No comments:
Post a Comment