COMP1400 – Programming for Designers

Class announcements for Programming for Designers

COMP1400 – Programming for Designers random header image

Lab 3

Posted by on August 3rd, 2010 · 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.

Design

Before you begin programming, take some paper and draw a storyboard of what your game will look like. Make sure you show all the important events in the game:

  1. How does the player object move? What keys control it?
  2. How do treasures respond to the player? How will you tell if the player is touching them?

Prototype 1 – The Player

You first prototype is to make a model in the world and give it a script that allows the player to control its movement with the keyboard. How it moves it up to you to decide. You can use the script from the Wednesday lecture as your starting place.

Prototype 2 – The Treasures

Add some treasure objects to the world. Add a script to them that makes them disappear if the player gets close.

You can make a game object disappear by setting its active property to false:

gameObject.active = false;

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.