Programming – Disney Week

There were a few things that Ant had left behind for people to do while some of the students were on the Disney trip. Since my group has finished our practice game, I thought I’d use my class time to finish some of the work.

  1. Create class diagrams to show the full structure of the scripts: PhysicsMovement1, WaypointMovement1, and Firing1.
  2. Create activity diagrams to explain he behaviour of the scripts: AutoFire and WaypointMovement1.
  3. Explain the trigonometry used in Trig1Movement, then identify two other scripts where Unity shortcuts are used instead of pure trig. Finally, explain where radians are used instead of degrees.
  4. List all the variables made in Firing2 and explain the datatype of each.
  5. List all of the functions defined or declared in Waypoints1, as well as list all of the functions calls, too.

Class Diagrams

physicsmovement1waypointmovement2autofireAbove are the diagrams I came up with. I’m not too sure if they’re perfect, but I had a much easier time making them than when we first learned about them. The scripts are quite straight-forward, so I’d imagine that it would be a lot more difficult to make diagrams for extremely complicated scripts. It’s like why it’s good practice to make the class diagrams as you go, rather than after the script has been written.

Activity Diagrams

I’m not too sure whether the activity diagrams are correct – I find them a lot harder to make up compared to the class diagrams – but I think I covered all the essential parts of the two scripts. The Waypoint script diagram is the one on the left, while the AutoFire script diagram is the one on the right.

Variables and Functions

Below are the answers I came up with for listing the variables and functions in the two different scripts. I tried to cover the datatypes explanation as best as possible.

variables_functions

I think all of this was good practice for the exam and to gain a better understanding of what we’ve covered for the last few months in class. I’ll need to start incorporating some of these into my builds in the future, for my own benefit and better practice overall. The last thing I’ll need to look at will the trigonometry, which felt a little more in-depth than the diagrams I was making up.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s