CS 40 Fall 2009 Homework 1

Due date: 11:59 p.m. Wednesday, September 9.

1. Enhance the First Encounter program from lecture 3. As in the lab, the robot should say "Take me to your leader", and then both the robot and the alien should walk away, with the alien leading the robot, but they should walk at the same time. Make the camera follow them as they walk off of the initial scene, to the alien's home, which should have the alien's family (a few other aliens). From the initial viewpoint, none of the other aliens should be visible.

10 points for a scene that leads the fellow travelers to their destination. 5 points extra credit for assignments that add something original, fun or impressive to the story, but only if the basics work. Another 5 points extra credit if you don't dump all the code into my first method, but put some of the code into methods of the robot or alien.

2. Create a world with an animal of some sort, and a table with some food on its surface, and a chair near the table. In your program, the animal should first turn towards the chair, then move to it and and climb on top of it. It should then think confident thoughts. Next, if the chair is very close to (.5 meters?) the table, the animal should climb onto the table and eat the food, then turn towards the camera and wave. However, if the chair is further away from the table, the animal should not be able to climb onto the table, and instead should just go back to the floor and show some sign of displeasure.

In the world you save, the chair should be close enough to the table for the animal to get the food. I should then be able to change your initial world set-up, and again run your same animation, and see the animal fail to get the food. In either case, I should be able to move any of the items and the program should still work.

Feel free to change the story somewhat, but in all cases there should be one animated object which is getting some other object based on the placement of two other objects, so that I can test that your logic works. By "get", it doesn't have to be eating, I don't need to watch the exact same story 30 times...

15 points if you get all the details correct: First turn, then move to, then climb, then think, then either climb again and get, or climb down and be angry.

Put two attachments, encounter.a2w and snacking.a2w into an email to me at taylor@cs.sjsu.edu. The subject should be:
CS40 HW1 First Last
where, of course, first and last should be replace by your name. Note, there are exactly 3 space characters in this subject: one after the 0, one after the 1, and one between your names. Please follow that formatting.