I have arranged for Unity 3 to be installed on the CHI Lab Macs. It includes the debugger that I demonstrated in the lecture. We’ll use it to step through some code. Download the GrowFlowers.js script from the lecture. Create a project to run it in. Remember to save the scene. Set Preferences to use […]
Entries Tagged as 'Lab'
Lab 10 – GUI
September 28th, 2010 · No Comments · Lab
Task 1: Build a GUI with a label and a button. The label should show the number of times the button has been pressed. Task 2: Build a “Security Panel” GUI with buttons labelled “0” through “9” and an “Enter” button. Allow the player to unlock the panel by entering the correct 4 digit PIN. […]
Tags:
Lab 8 – Arrays
September 14th, 2010 · No Comments · Lab
This week’s lab involves experimenting with arrays. Start with the following behaviour: // Flowers.js var flowerPrefab : GameObject; var heights : float[]; var flowers : GameObject[]; function Start() { // make as many instances of the prefab // as there are entries in the ‘heights’ array // scale each one according to the height // […]
Tags:
Lab 6 – Breakout
August 24th, 2010 · No Comments · Lab
The task in this lab is to automatically generate different levels for the Breakout game written in the lecture. For each of the three layouts below, write a script which creates bricks in this arrangement. Use two for loops to create the bricks. The outer loop should count the layers. The inner loop should count […]
Tags:breakout
Lab 5
August 17th, 2010 · No Comments · Lab
Your task in this lab is to practise using for loops and prefabs. We’re going to make a simple game in which the player has to click on a bunch of moving targets to destroy them. Create a target object of your choice. Give it a script to make it move around randomly. Create a […]
Tags:for loops·mouse events·prefabs
Lab 3
August 3rd, 2010 · No Comments · Lab
In this lab you are going to make a very simple game. The player moves around in a 2D world gathering ‘treasures’. When each treasure is touched, it disappears.
Tags:
Lab Week 2
July 27th, 2010 · No Comments · Lab
Note: If you missed last week’s lab you will need to activate your CSE account. Look at the instructions from last week. Ask your tutor about this before you proceed. Your task in this lab will be to create some objects and make them move. You’ll also learn how to import more interesting models than […]
Tags:
Lab Week 1
July 18th, 2010 · No Comments · Lab
We will be starting labs in Week 1 for all classes except the Monday lab which will start in Week 2. There are 3 tasks for this week’s lab: Activate your CSE account. Write your first program! Play with Unity
Tags: