Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www.computerscienceuk.com Programming Computer Games Game Design.

Similar presentations


Presentation on theme: "Www.computerscienceuk.com Programming Computer Games Game Design."— Presentation transcript:

1 www.computerscienceuk.com Programming Computer Games Game Design

2 www.computerscienceuk.com Starter Y-axis X-axis -240240 180 (0, 0) (x,y) What is the position of the: 1)Star 2)Square 3)Triangle 4)Rectangle 5)Cat -180

3 www.computerscienceuk.com Learning Objectives – Remember the coordinates system in Scratch. – Learn how to program a scrolling background. – Understand how Scrolling Backgrounds work. Success Criteria Level4/5 – To code a scrolling background with support. – To briefly describe how the scrolling background code works. Level6/7 – To code a scrolling background mostly from own knowledge. – To explain fully and in detail how the scrolling background code works. Literacy – Key Words Sprite A programmable object Scrolling Background The illusion that the screen is panning / moving across the ground Coordinates Two numbers to identify the position of an object

4 www.computerscienceuk.com Learning Habits / Skills Required Independence - Working effectively alone Avoid Distractions - and sustain concentration Capitalising - Using resources purposefully Perseverance - Overcoming frustration and difficulty Reasoning – Thinking rigorously, methodically and giving explanations.

5 www.computerscienceuk.com Hands up if you remember what the coordinates system is in Scratch?

6 www.computerscienceuk.com Starter Y-axis X-axis -240240 180 (0, 0) (x,y) What is the position of the: 1)Star (-240,180) 2)Square (240, -180) 3)Triangle (-240, 0) 4)Rectangle (0, -180) 5)Cat (0,0) -180

7 www.computerscienceuk.com Hands up if you remember what the coordinates system is in Scratch?

8 www.computerscienceuk.com Project Aim You will design and create a computer game… …but unlike previously we will learn how to program a scrolling background. …and here is one I made earlier!

9 www.computerscienceuk.com Programming Scrolling Backgrounds

10 www.computerscienceuk.com Hands up if you know how to program “Scrolling Backgrounds”?

11 www.computerscienceuk.com Scrolling Backgrounds… The Theory

12 www.computerscienceuk.com A scrolling background is simply two sprites which move to the left. They are positioned next to each other. As soon as a sprite goes too far to the left, it is repositioned to the right of the screen. This gives the illusion of a moving background!

13 www.computerscienceuk.com Sprite 1Sprite 2

14 www.computerscienceuk.com E.T.C!

15 www.computerscienceuk.com Y-axis X-axis Remember the Invisible Coordinates Grid? (0, 0) (x,y) How can we move a sprite to the left along the x axis in scratch? -240240 180 -180

16 www.computerscienceuk.com Which is going to help us move along the x axis?

17 www.computerscienceuk.com Scrolling Backgrounds… Programming!

18 www.computerscienceuk.com 1 2 3 4 5 + 6 Create a new sprite. Zoom out as far as you can. Paint your ‘ground’ at the bottom of the canvas So, now go back and edit the same sprite. At this point scratch will annoyingly centre the sprite… Choose the ‘Select Tool’ and ‘Zoom Out’ again. Finally, drag the sprite down to the bottom of the canvas.

19 www.computerscienceuk.com Now repeat the process to create the second sprite.

20 www.computerscienceuk.com Place first sprite so that it is centred at the bottom of the screen. Then forever move the sprite to the left (change x by -5). But, if the position of the sprite goes too far to the left (x pos < -450), move back to the right of the screen (x=450) Programming The Scrolling Background Sprites Understanding the Scripts Block

21 www.computerscienceuk.com Place first sprite so that it is to the right of the screen. Then forever move the sprite to the left (change x by -5). But, if the position of the sprite goes too far to the left (x pos < -450), move back to the right of the screen (x=450) Understanding the Scripts Block Programming The Scrolling Background Sprites

22 www.computerscienceuk.com Hands up if you know how to program “Scrolling Backgrounds”?

23 www.computerscienceuk.com Demonstration

24 www.computerscienceuk.com Programming Task 1 ’12 Minutes’ Open a new scratch file Use this presentation to program your own scrolling background

25 www.computerscienceuk.com Programming Task 2 ’12 Minutes’ Complete the worksheet explaining the code you have created and how the scrolling works.

26 www.computerscienceuk.com Assessment Criteria LevelProgramming Skills 7 I can produce the code from my own understanding. I can explain what the code does in detail and in my own words. 6 I can produce the code mostly from my own understanding but use the lesson resources for support. I can explain what the code does in detail and in my own words 5 I can use the resources to help me code the scrolling background I can describe what the code does in my own words 4 I can copy the code to produce the scrolling background I struggle to describe how it works in my own words

27 www.computerscienceuk.com Learning Habits / Skills Required Independence - Working effectively alone Avoid Distractions - and sustain concentration Capitalising - Using resources purposefully Perseverance - Overcoming frustration and difficulty Reasoning – Thinking rigorously, methodically and giving explanations.

28 www.computerscienceuk.com Programming Task 3 ’12 Minutes’ Design / Paint a flying object which you will control in your game (we will program this next lesson) Design / Paint the ‘stationary’ background to make your game look more interesting.


Download ppt "Www.computerscienceuk.com Programming Computer Games Game Design."

Similar presentations


Ads by Google