COMP1400 – Programming for Designers

Class announcements for Programming for Designers

COMP1400 – Programming for Designers random header image

Lab 9 – Lists

Posted by on September 21st, 2010 · Uncategorized

Make sure you upload your Ass 2 to your webpage in today’s lab if you have not done so already.

Task 1: Rewrite the code from last week’s lab to use variable-length arrays (lists) rather than builtin arrays.

Task 2: Allow the user to plant extra flowers by clicking on the screen.

Lost Property

Posted by on September 19th, 2010 · Uncategorized

I found a small silver palm-top computer in a black case in the class after today’s lecture. I took it up to Security in the Mathews building.

Assignment 2 – submission

Posted by on September 14th, 2010 · Assignments

There are three components you will need to submit:

1) Storyboard of your design (due week 8, your lab session)

2) The JavaScript files for all your scripts (due Sunday 19 September 2010, 23:59)

3) A web version of your game (due week 9, your lab session, i.e. the first lab session after Sunday 19 September 2010)

[Read more →]

Lab 8 – Arrays

Posted by on September 14th, 2010 · 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
// store them in the flowers[] array
}


function Update() {
// Find the smallest flower and make it grow a little
}

Task 1: Complete the Start() method so that it creates multiple instances of the prefab with the specified heights. Make them stand in a line (or, if you’re more adventurous, a circle). Add the script to an empty object (lets call it the flowerbed) in the world and test it out with different values of the heights array.

Store a reference to each flower you make in the flowers array, so we can access them in Update().

Task 2: Complete the Update() method so that on each frame the whichever flower is currently smallest and make it grow a little.

To do this, you will need to use a for loop to look at all the flowers in the flowers array and check its height against the smallest you have found so far.

Test your code with different numbers of flowers. Does it work with 10? 100? 1? 0?

Assignment 1 is ready to collect

Posted by on September 12th, 2010 · Assignments

Assignment 1 marking is finished. You can collect your mark using

https://cgi.cse.unsw.edu.au/~give/Student/give.php

You may contact your tutor during your assigned lab session for more information in regards to the marking.

Assignment 2 – Grouping list

Posted by on September 8th, 2010 · Assignments

The grouping has been done for Assignment 2 and you can check it at

http://www.cse.unsw.edu.au/~cs1400/10s2/groups.html

Please make sure your grouping is exactly as you had asked.

Report any possible mistake to your tutor before Tuesday 14 September 2010.

Assignment 1 – marking

Posted by on September 2nd, 2010 · Assignments

We are marking the “assignment 1”. 

When it finishes and ready to collect, it will be announced in the blog. Until then, do not try to collect your mark.

Exam

Posted by on August 31st, 2010 · Uncategorized

I’ve just written the final exam for the subject. It will cover your understanding of javascript and the principles of programming I have been teaching in lectures. The breakdown is as follows:

  • 20 marks are multiple choice, mostly testing your comprehension of small pieces of code (if statements, while statements, for loops, etc).
  • 10 marks are short answer questions about programming (answers are in the lecture notes).
  • 10 marks are longer code-comprehension questions
  • 20 marks are for two longer code writing questions.

You are not expected to have perfectly memorised the syntax or the API. Pages of the Unity Script Reference will be provided for classes that are relevant to the questions you have to answer.

The exam isn’t going to be easy, but if you can understand the code from lectures and can do the lab exercises and assignments (with reference to the scripting manual) then you should be fine.

Lab 6 – Breakout

Posted by on August 24th, 2010 · 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 the number of bricks in each layer. You can base your code on the script I wrote in the lecture.
[Read more →]

Assignment 2 – Team Registration

Posted by on August 23rd, 2010 · Assignments

Team registration for assignment 2 will start on Wednesday 25 Aug. The maximum number of team members is 2.

You are  supposed to inform your tutor who you decided and arranged to work the ‘assignment 2’ with, during your lab session in week 6 (for Monday lab in week 7).

REMEMBER all team members have to inform the tutor at the same lab session.

REMEMBER that on-line team registration (for example by sending email) is NOT acceptable.