PDA

View Full Version : Labs 3 and 4


kaufill
01-04-2016, 10:47 AM
Lab 3 was a bit difficult, but not bad. I used one torus shape that would move from the top left corner, over a random number (within the confines of the camera), then down to the ground. It would then be set to not showing, move back to the starting position using a dummy, set to showing, and fall again. I did not have a visible counter, but once 10 rings were caught 3D letters came down that said "You WIN" and the torus would stop falling.

When I started Lab 4, I had to start from scratch essentially. I needed multiple torus objects, and since we were supposed to work with arrays, my "torus.fall" method wouldn't work anymore. This assignment wasn't necessarily more difficult, it was simply more time consuming. I decided the best plan would be for me to create the world one step at a time, so that I would know when I broke something. For instance, I created all of the torus objects, and had them all fall one after another. Then I had them all fall and then all reset. Then tried to make them move at different times. This worked as planned, because pretty much every time I tried to add a new element, something would break and I'd have to find the problem. Had I built every requirement into the program from the beginning I probably would have broken my computer in frustration trying to find all the bugs!

Although the program works how it is supposed to, I used a lot of code to make it so. The code also seems repetitive, but its repeating code on different objects. I'm not sure if I fell into the pitfall of lots of code = missing the easier way, or if this program simply required it.

While the other assignments each took a couple hours for me to be satisfied, I worked on Lab 4 for an entire day, took a break for the night, and then managed to tweak it the next day until I was happy. This was a commitment! :eek: