Alice: A Visual Introduction to Programming - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

Alice: A Visual Introduction to Programming

Description:

... 1-* The World is an Object Contains all other objects Also has its own properties Atmosphere color Lighting Fog 1 ... Camera Controls Drive forward ... – PowerPoint PPT presentation

Number of Views:107
Avg rating:3.0/5.0
Slides: 35
Provided by: Anthon189
Category:

less

Transcript and Presenter's Notes

Title: Alice: A Visual Introduction to Programming


1
Alice A Visual Introduction to Programming
  • Chapter 1 Part 2

2
Objects
  • Alice uses objects
  • Tent
  • Soldier
  • Princess
  • Objects perform actions
  • Turn
  • Move
  • Fly
  • Wave

3
The Alice System
4
Open SnowLove in Examples
5
Executing Alice Program
PLAY
6
Controlling Runtime Speed
  • Can increase speed of program
  • Move slider of speed control
  • Useful when troubleshooting to skip over parts of
    program that work
  • Max of 10x normal

7
The Alice Environment
Toolbar
Object Tree
Tile
Tile
Details Panel
8
Review
  • How do you control the speed of an Alice program
    that is being played?
  • What part of the Alice environment displays a
    view of the world?
  • What part of the Alice environment displays a
    list of objects in the world?
  • What is a tile?

9
Objects
  • Anything that can be identified as unique from
    other things
  • How is an object unique?
  • Its name
  • Its properties
  • The custom methods or actions it can perform

10
Properties
  • Values that specify an objects characteristics
  • Can adjust them in the properties part of the
    details pane for an object
  • Examples Color, opacity, etc.

11
Object Properties
Object Selected
Object Selected
Change Properties
12
Opacity
  • How transparent an object is
  • Less opaque an object, more transparent
  • Opacity of 100, cannot see through the object
  • Opacity of 0, object is completely transparent
  • Like clear glass
  • An object with opacity of 0 is invisible
  • A partially transparent object can be used to
  • Make something look far away in water
  • Give a ghostly appearance

13
Objects and Object Parts
  • Objects are made of other subparts
  • Snowman made of
  • head
  • topHat
  • leftEye
  • rightEye
  • carrotNose
  • mouth
  • leftArm
  • rightArm
  • Bottom
  • Objects named in camel Case format
  • 1st letter is lower case
  • Upper case next words 1st letter

14
Methods
  • Methods
  • Set of instructions to perform task
  • Can just be one
  • Default method
  • world.my first method

15
Methods
  • Each object and its subparts can be manipulated
    with methods
  • Move
  • Turn
  • Roll
  • Say

16
The World is an Object
  • Contains all other objects
  • Also has its own properties
  • Atmosphere color
  • Lighting
  • Fog

17
Review
  • What are properties?
  • What is the name of a property that
  • Determines an objects color?
  • Allows you to see through an object?
  • What is a method?
  • What do you call a part of an object that can
    moved independent of the main object?

18
Alice has Class(es)
  • Objects are created from classes
  • Blueprint that describes a particular type of
    object
  • Defines a particular kind of object

Animals Collection
19
Classes
  • Gallery - collection of different object types
    (animals, beach, people, etc.).
  • Class - each item found in the Gallery
  • Two galleries are used
  • Local gallery (stored on computer)
  • Web gallery (maintained by creators of Alice)

20
Class Instance in Alice
  • Class Chicken
  • Instance An object that is created from a class
  • Examples
  • Chicken
  • Chicken2
  • Chicken3
  • Each instance has its own properties, methods,
    functions
  • Can manipulate each one individually

21
Creating a New World
  • Create a new world
  • File ? New
  • Choose template

22
Adding Objects
Click on Add Object
23
Adding Objects Scene Editor
Click on People collection thumbnail
24
Add Coach
  • Place object in scene editor by
  • Clicking on it
  • Placed in default position
  • Or drag it
  • You choose the place to position it

1-24
25
Coach Object With Bounding Box
26
Saving Alice World
  • Click on File then Save World
  • Has .a2w extension

27
Demo Saving a world
  • Writing and testing an animation is an intense
    load on the computing system
  • Crashes can occur
  • Best solution
  • Save your world every 15 minutes
  • Also save to a backup system
  • Ex USB flash drive

28
Review
  • What is a class?
  • Are classes or objects stored in Alice galleries?
  • What are two ways to add an object to a scene?
  • What appears around an object when selected?
  • Where do you find an objects properties?

29
3D Objects and the Camera
  • Alice world and objects are three-dimensional
  • Height
  • Width
  • Depth 3rd dimension

30
3D Movement
Forward is perceived as the object getting larger
as it gets closer to us. Backward is perceived as
the object getting smaller as it gets farther
away from us.
Motion is based on OBJECTs perspectiveour left
is the Coachs right
31
The Camera
  • When you create an Alice world a camera is
    automatically placed in the world
  • Displays image of world in Scene Editor window
  • Called camera viewpoint

32
Camera Controls
  • Drive forward, backward, turn left and right
  • Move camera up, Tilt camera up, down
  • down, left, right
  • You can make camera move faster by dragging mouse
    pointer away from center of camera control

33
Different World Perspectives
  • Sometimes it is difficult to tell where object is
    in relation to other objects
  • Fish looks like it should be in water
  • Change world perspective
  • Look at fish from perspective of water instead of
    sky
  • Also called Camera control or point of view

34
Homework
  • Read chapter 1
  • Do tutorials
  • Tutorials 1-1, p 6
  • Tutorials 1-2, p. 19
  • Tutorials 1-3, p. 34
  • Due one week after assigned
Write a Comment
User Comments (0)
About PowerShow.com