Week 2 - Friday

spongemintΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 3 χρόνια και 4 μήνες)

47 εμφανίσεις

Week 2


What did we talk about last time?

3D graphics

Most modern 3D video games use
time rendering

3D scenes are (somewhat)
realistically rendered on the fly as
characters move throughout the

Scenes usually contain tens of
thousands of triangles

The quality is much worse than
offline rendering

But it's still pretty good

Transforming, texturing, and lighting tens of
thousands of triangles is too much work for your CPU

Most computers have special purpose graphics
with a
powerful processor called a Graphics
Processing Unit (GPU)

Really great at the kind of math needed for graphics

Because GPUs are so common, Windows Vista, 7, 8
and Mac OS use GPUs to make regular desktop
animations smoother and faster

Some computer scientists use GPUs to solve other
problems like simulations and DNA sequencing

Texturing is gluing a (usually) 2D image onto a polygon

This is fully supported by GPUs

Large numbers of realistic textures are the reason that
graphics cards need so much memory

3Dfx Interactive was a huge developer in the
field until they went bankrupt in 2002

Bought by


is a current manufacturer, famous for
its GeForce gaming line

AMD bought ATI in 2006 and manufactures
the Radeon line of gaming processors

Intel is also a major player in GPUs but
focuses on a budget models

One issue, in both offline and
time rendering, is the
uncanny valley:

We can relate to abstract
representations of human

We can relate to realistic
depictions of human beings

But somewhere in the middle,
it's not real enough to be
convincing, but it is real enough
to freak us out

Video games generate more
revenue than Hollywood movies

In 2009, video games brought in $10.5
billion compared to the $9.4 billion of

99.4 million Wiis

75.3 million Xbox 360s

74.3 million PS3s

PC games are a small part of the pie

One way to get user input is to use an
key pressed


You'll notice that this is a starting block (it
doesn't go after other blocks)

You can add different when key pressed
blocks to respond to different keys

Each sprite has its own set of behaviors

But you can create as many sprites as you

If you want several sprites to behave in a
similar way, first make one that does what
you want

Then right
click on the sprite and choose the


Duplicating the sprite will make a copy of the
sprites appearance and scripts

Sprites can't control each other

If you want a sprite to interact with another sprite,
you have to


A message tells anyone who is listening that some
event has happened

Messages have no contents, they just have names

You can create as many different named messages as you

A sprites needs a
when I receive block

to act on a

Make it so that the user can move the Scratch
Cat to the right side of the screen step by
step using the right arrow key

Send a message when the Scratch Cat
reaches the right side of the screen

Make a new sprite that cheers when it gets
the message

Duplicate the sprite so that lots of sprites
cheer when the Cat reaches the right

We will talk about bits and bytes

Read Chapter 1 of
Blown to Bits

Start working on Project 1

Read Chapter 1 of
Blown to