This project was actually pretty easy once I figured out the professors' code. While I can't say much for the way they indented their code, it was well-documented. Again like in Homework #1, I took the tree-building code from IDM's Project #3 and re-used it to create the twenty trees dotting the landscape. Code reusability is cool. I orignally experimented with 100 trees to make a literal forest, but the polygon count was over 150,000 and my computer didn't really want to render it :)
The trees are awesome - not only did I add boundaries so that the lawnmower wouldn't go over the edge of the world, but I also added each of the trees to the "boundary" list so that if the lawnmower runs into them, it gets shunted off to the side. Pretty cool actually. I modified the positionVehicle() function to positionObject so that I could pass the object to be positioned as a parameter and again, code reusability. That one function alone makes everything a lot easier in regards of placement!
The cameras gave me the most trouble, actually, before I figured out that I could just clone camera #1 and rotate it. 8 hours of work to find one line that made the entire project easier - go figure.
There are two things wrong with this project. First, I couldn't seem to get my boundary cube big enough to encompass the entire world - it stopped at 9,000x9,000x3,000 and refused to display if I set it any higher. The bounding ability does work, though, and if you try to go through the cube in the middle of the world, it'll bump you off enough so that you follow it instead of going through it. The second thing is although Mrs. Doubleday suggested I check out the addBackdrop() function, I played around with it for awhile before giving up on it, thus why the sky is a solid blue and not using starry.gif like I wanted to. Maybe I'll figure out how to use addBackdrop() properly later...
The little perks in this project, aside from the bounding trees, also include wheels that turn when you're moving forward and an engine that constantly rotates like a real lawnmower's would.
Images Used
(thumbnails enlarge to full graphic)
![]() |
![]() |
![]() |
![]() |
External Images Used
(thumbnails enlarge to full graphic on original site)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |