Technical Game Development II
IMGD 4000 - B Term 2012

Individual Homework: The "10% Solution"

Due by Turnin: Midnight Weds, October 31


Goal: The main goal of this homework is to quickly get you oriented and productive in the Unity 3 engine.

Resources: Your primary learning resource to get started with Unity will be the Design3 Video Tutorials (Subscription required--get code from instructor). Below are the tutorials you are required to study (you may want to view some videos twice---once to get the basic idea, and then again later with the Unity Editor open in front of you).
  • Unity Fundamentals [expand Interface bullet under Unity]
    • Chapter 1: Getting Started (4 min) -- Note support file attachments to download.
    • Chapter 2: Unity Interface (21 min)
    • Chapter 3: Prefabs (5 min) ***NB*** Very important!
    • Chapter 4: Applying Textures (1 min)
    • Chapter 5: Contents Layers (2 min)
    • Chapter 6: Unity Console (1 min)
    • Chapter 11: Importing and Using Assets (3 min)
    • Chapter 12: Cameras (16 min)
    • Chapter 13: Lights (6 min)
    • Chapter 18: World Collider (5 min)
    • Chapter 20: Module Wrap-up (2 min)

  • Asset & Scene Management [expand Asset Integration bullet under Unity]
    (23 min)

  • Debugging with MonoDevelop [expand Coding bullet under Unity and click on Debugging] (9 min)
Total tutorial videos time: 98 min (approx 1.5 hours)

To go deeper into various topics introduced in the tutorial videos, see the Unity Manual, Reference Manual and Scripting Reference accessible under the Help menu in the Unity Editor. Also the 3D Platform Game tutorial is very good and comprehensive, but also very long (requires a larger commitment of time than necessary for this homework).

For help on making the (not too hard) transition from Java to C#, you may find the book, C# for Java Developers, and/or the website, C# Versus Java, useful.

Also see the short overview on the Unity site about differences between Unity scripting in Javascript versus C#. Almost all of the tutorial videos use Javascript, but as soon-to-be-professional programmers, you should easily be able to make the translation.

Finally, there is a very active Unity community that can be accessed via online forums, wikis, etc., and an IMGD-4000 thread at the WPI GDC Forums.


Instructions: Basically, your assignment is to add "10%" of your own C# (only) code to the 3rd Person Shooter demo on the Unity website. This demo was chosen because the code is well organized and written almost entirely in C#, and thus is a good model for the project you will develop in this course. (It has a little more emphasis on animation techniques than we we need.)

You must write all your Unity code in C# for this course, and we strongly recommend using the MonoDevelop editor distributed with Unity 3, which requires some manual setup (see instructions).

(If following the Unity site instructions above you do not see MonoDevelop in the drop-down list, choose the Browse option to locate and select the MonoDevelop application either in the same folder where the Unity application is located or in Program Files.)

Note that "10%" is subjective. Don't concentrate on whether you have added 10%---just use this homework to learn as much as you can from the tutorials and documentation. It's very hard (though not impossible) to do less than 10% if you just spend some time experimenting.

If you are having trouble getting started, here is some advice:

  1. Play the game and think about how it works.
  2. Open some scripts attached to an object in the scene. Make some guesses about the relationship between elements of the code you are looking at and the behavior of the object in the game. Modify the value of some variables used in the script to confirm your guesses. You can try changing the logic of the code a bit to see what happens. (These are examples of extensions to the game, although they may be so minor or silly that you do not want to make them part of your final submission.)
  3. Keep repeating Step 2 to get more familiar with how the game works technically. This may also make your project messy---if at any time the game freezes or aborts, just download a fresh copy.
  4. Once you basically understand how the game works (do not try to understand it completely, you don't have enough time), plan for some extension features, such as "I will add a GUI to let the player choose between different weapons", or "I will add health packs on the ground for the player to pick up and regenerate health", and so on. Some of these ideas may turn out to be technically trivial to implement, so you may need to combine a few to reach the 10% criterion (which is admittedly vague---we just want you to do enough to be competent in Unity). Focus on extensions that use what you learned in the Design3 tutorial videos.
  5. Try to implement your extensions.
  6. Start early, so you have time to get help from the TA and/or professor during office hours if you get stuck.
You may discuss this homework with others, but you must write all the code yourself (see cheating policies).

Submission:
  • Build a web player executable for your modified game:
    • Select Demo scene
    • File > Build Settings > Web Player > Build
    • Test the web executable by clicking on the .html file in the folder created by the build command. If the TA tries to run your demo and it does not run, you will fail this assignment.

  • Copy all of the scripts (not art assets, if any) that you created or modified to the folder created by the build command above---you can organize these into subfolders if you wish. Do NOT try to zip up the complete Unity demo, including all the art assets, because the file will be too big for turnin!

  • Prepare a plain text file, README.txt, in which you briefly describe the changes and extensions you have made to the demo code. Be specific about which classes and methods you have modified or added, and what you were trying to achieve. Add the README.txt file to the web folder.

  • Zip the web folder. Thus we can play the game to see what it does and look at your scripts to see what you've done.

  • Log into Turnin using your WPI user id and the password you were mailed.

  • Select the IMGD 4000 area of turnin (if necessary) and submit the zip file under "Ten Percent Solution". (If your submission times out, try again.)

  • Homework is due by 11:59 Weds, October 31. Half credit will be given for homework that is up to 24 hours late; no credit thereafter.
Grading: This homework will be graded "A", "B", "C" or "F" (see grading).