Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cloning and creating! Introduction to cloning and creating objects.

Similar presentations


Presentation on theme: "Cloning and creating! Introduction to cloning and creating objects."— Presentation transcript:

1 Cloning and creating! Introduction to cloning and creating objects

2 Objective Learn how to create clones and creatables Understand the difference between clones and creatables. Be able to explain the advantages of each in terms of ease of program maintenance.

3 What does cloning mean? What does it mean to clone something? Where can have you seen examples of this in the past? Ideas?

4 Computer games Why do we use cloning in computer games? Can you think of any examples that you might need? Here is an example below… what has been cloned?:

5 How to clone: Cloning objects you’ve already programmed at the beginning of the game will make things much easier for you if they’re carrying out the same actions: Give it a try

6 What does creatable mean? What do you think is a creatable? Ideas?

7 What does creatable mean? A creatable is an object which we want to launch or occur at a specific point in each game. For example…. You might want to launch a rocket every 10 seconds. ? You will need to place a rock on the floor. We will use this as our launch pad. < Code on the rocket < Place the rock and rocket < Make your rocket creatable Program the rock

8 Why bother?? Creatables means so that you can give out multiple objects at once. You can also use other objects in order to make them spawn. This is particularly useful with lives. You could make your character a creatable so that whenever a specific score is at 3, you’re still able to create a new character.

9 Tinker Time We do not want you to break the game / world you’ve already started. This is experimental time. Can you do the following and get snippets of your code. Clone some trees or objects so that you’re confident in doing this and moving some things around. Createables – Show me that you can build a createable in a new world and show that you can control it. Challenge – Can you get your creatable to work based on a score variable?

10 Game continuation: - Use your initial plan and start building your game. You must show your teacher printed evidence of: Cloning and a creatable before you continue. You should also show your teacher that it works. Print screen evidence of testing and explain what happened…..

11 Activity Teacher lead activity


Download ppt "Cloning and creating! Introduction to cloning and creating objects."

Similar presentations


Ads by Google