sprites - gorski compscigorskicompsci.ca/ics2o/unit3/ppt5_sprites.pdf · a sprite is (a)an...

25
Sprites Inside GameLab

Upload: others

Post on 05-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

SpritesInside GameLab

Page 2: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

Previous Units This Unit

Page 3: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

A sprite is (a)An animation(b)Properties that

determine how the animation is drawn.

Why are they useful? By grouping all of the variables under one variable (the sprite

name), they are much easier to track and manipulate.

Page 4: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

A sprite is (a)An animation(b)Properties that

determine how the animation is drawn.

Each aspect of the sprite is controlled in a

different tab.

Page 5: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite
Page 6: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite
Page 7: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

This is an animation.

Page 8: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

This is an animation.

What is its name?

Page 9: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

This is an animation.

What is its name?

Fred

Page 10: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

This is an animation.

What is its name?

Fred How many frames does it have?

Page 11: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

This is an animation.

What is its name?

Fred How many frames does it have?

2

Page 12: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

How many animations

would need to be set up to make

this screen?

Page 13: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

How many animations

would need to be set up to make

this screen?

1

2

Page 14: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

How many animations

would need to be set up to make

this screen?

Page 15: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

How many animations

would need to be set up to make

this screen?

1

2

3

Repeat of 1

Repeat of 2

Page 16: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

Let’s say we want to make

this:

How many sprites?

Page 17: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

So the sprite tab looks like this:

Page 18: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite
Page 19: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite
Page 20: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

Animation NameSprite

Name

Page 21: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

Animation NameSprite

Name

Background First

Sprites on top

Page 22: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite
Page 23: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

Sprite Name Property

Dot Notation:

Keeps the code organized.

Page 24: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite

If you mouse over the items in the toolbox shows you what they mean.

Page 25: Sprites - Gorski CompScigorskicompsci.ca/ICS2O/Unit3/ppt5_Sprites.pdf · A sprite is (a)An animation (b)Properties that determine how the animation is drawn. Each aspect of the sprite