Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
Introduction: Aliceand
ICSI110, Programming, Worlds and Problems
Alice is named in honor of Lewis Carroll’s Alice in Wonderland
Alice software
“Application” to make animated moviesand interactive games
Making animated (or other) movies isa fun but difficult and creative taska kind of programming, basically
Movie stars follow cues from director and each other—they INTERACT
AND they follow a SCRIPT.Your Alice creations will do those too!
1st half or so: mostly with Alice, a little html.2nd half: Java plus brief introductions to digital circuits, simulations for science, etc..Today, do 2 Alice “stencil based” tutorials...find out what Alice is about.This, like most CS courses, is a handson, “active learning” kind of course.You will become a 6wk Alice expert and use it to solve problems the same ways professionals do (with more complex tools).
Technologies in CSI110 course
Do This Now...Work in pairs today.Username: cetldw2Password: [get this from whiteboard]select UALBANY domaindoubleclick Alice icon on desktop..waitTutorial/Tutorial1; OpenFollow the directions..Do also Tutorial2(in a few screens, click next twice.)
Creating a movie, game, or play
What is the story??create a plan, scenario, etc.select your cast of characters
Create the scriptplan for audience interaction?
Learn, practice, get better at techniques and technologiesReplay,revise, repeat, rehearse,perfect!
How Pixar does it..
http://www.pixar.com/howwedoit/index.htmlNontrivial projects require
Goal setting, planning and design firstincreasing refinement and adding of details as the project progressesmany steps require test runs, rehearsals, retakes, reviewandimprove cycles, etc.
Interaction
Tutorial 3 introduces interaction.Programming interaction with Alice is almost like programming a starttofinish script.Alice also does (simulated!) simultaneous acting by different actors.
Techie lingo: concurrent, multiple threaded programs
Program and Events
Script == (Computer) ProgramAn event is something that happens because of
audience action (shout, mouse click, key, etc.)or program operation (actors bump, some
data changes, etc.), that causes the specialpart of the script, written for that kind of event, to be followed.
Event handler==such a special part.
What's nextpeculiarities of programming instructions involving our 3dimensional world
terminology, tips/techniques of Alice
First Encounter from Chapter 2.Control structures and InteractionInteresting/Creative scenario makingKeeping/Publishing your digital workOrganizing different or similar objects and behaviors using classes
Getting started (Thurs.)You will have read Alice book Ch. up to 2.2. Covers 3 storyboard options. We'll learn and use 2.2 stuff:
Create or copy initial scene of robot and moon on the moon.Write COMMENTS to say what we want. Write instructions (to run METHODS of our scene's OBJECTS)Use “do in order” and “do together”
instruction groupingsMake objects change their PROPERTIES
Assignment(before the next class session)read Chapter 2 intro and
Section 1 Scenarios and StoryboardsSection 2 First Program:Prepare to do this in class on Thursday.
Play with Alice in LC3 or in your own computer
begin finishing Chapter 2 and go on to Chapter 1..Do (try?) exercise 13..save jpg file on
LC3 computer's W: drive. Finish Chap 1 & 2 for Tuesday Tuesday, we begin Chap. 3 material.
How to read Boring Manuals..
For stepbystep instructions, try them out on the computer with the book in hand...don't try to memorize! (maybe make notes)
Identify the concepts, particularly when named by vocabulary words...and study THOSE carefully; but stop, ask questions, go back to studying later if you're confused.Details: read what they are for, plan to REFER to book WHEN (later!) needed.
Alice Concepts Chap 1
Help you create Alice worlds on your own.Virtual 3d WorldsAlice Objects==3d ModelsDimensions, directions, centers, distances, positionsThe scene editor
Creating a new virtual world
Create a new world File New Choose template
Picking from gallery and Adding objects using the Scene Editor
Galleries
Classes (3D models) are found in the galleries Local gallery (installed with the software)
Minimum or complete options
CD Gallery (only if CD is in the machine) Web gallery
Middletop World View WindowMouse is used to
approximately position objects in the sceneCamera Navigation is used to
look at world better and set the camera point of view
when scene editor is active:scene editor window lets you select
quadview which helps you position eachobject relative to others
Quadviews are used in fullfledged graphicsCheck out Blender in LC3!
Scene Editor FeaturesUpperleft World Outline window
shows all objects by nameMouse leftclick selects object so:
it is outlined in the viewerits methods appear in the window below
Mouse rightpress reveals Dropdown menus of methods useful to:resize or rotate objectsmore precisely position them in the scenerun methods “by hand,” to see what they do.
use the undo button after each trial!
The Camera Positioning Controls
“Move” camera—in the horizontal plane, not changing the direction it points.“Drive” cameraLeft/Right “steers,” changesthe direction in horiz. plane, Fwd/Back is speed control.“Tilt” camerachanges up/down direction
3 Dimensions, 6 DirectionsA 3D object has
3 dimensions: height, width, depth
6 degrees of freedom (independent motions)3 straight line directions3 kinds of rotation
Object Rotation Axis NAMES
Used by airplane pilotsAlice turn and roll methods do these
Yaw=turn left/right
Pitch=turn fwd/back
Roll left/right
Demonstration
The rotations that Alice objects can do around the 3 different axes.Each Alice object has 3 axes attached.aliceLiddell will demonstrate the 3 kinds of rotation....http:worlds/AliceAxesDemo.a2w
Moving one object around another
The “as seen by” option for various movements makes those movements be done around DIFFERENT AXES.That is handy to animate somebody going around something.Demo...http:worlds/AliceTurningDemo.a2w
Each Alice object has a Center chosen by its designer
At the center of mass
Where it stands on the ground
Where it is held (Depending the model's intended use.)(what's fun...invent a nonintended use.)
Alice Object PartsObjects may be composed of parts(also objects)
ObjectsAn "object" is
any thing that can be identified as unique from other thingsAlice objects are 3d models
How is an object unique? has a name has properties:
width, height, color, location can perform actions (methods):
associated actions it can performtasks it can carry out
What we'll do Thursday.Form teams of two.Follow instructions in Alice book 22Ask for HELP (after the storyboard is decided...)
Do “Incremental Development”make SURE each instruction does what
you want.write a line or 2, run it, another 12, run, etcFIND and FIX problems when they occur
Supplemental/Unused
supplemental or unused slides follow...
Are Pitch, Yaw and Rollreally independent??
????
Classes and ObjectsA class is a template (like a mould, rubberstamp, master copy, etc.) for creating an
object.The action of using the class to create an
object is called instantiating the class.The new object is called an instance of the
class.An object is a unique entity within a virtual
world that is the result of instantiating a class.
Class and Objects(instances)
Paid in Full Date_____signed___________
Paid in Full Date_____signed___________
Paid in Full Date_____signed___________
Paid in Full Date_____signed___________
ClassObjects are categorized into classes
Each object is an instance of the class.
An Alice class is a “master object” stored on the disk; you command Alice to make copies and put them in your world.
Person
Dogs
peter
mary
paul
spike
scottie
fluffy
Instantiating in AliceIn Alice, you instantiate a class by picking something from a gallery.
The new instance automatically goes in the center of the world..you then
move it to where you want.(and change size, color, parts, etc. from their
defaults.)
(Just in case you are wondering, Alice 2.0 does not let you program object instantiation in Alice
code.)
Techniques and Tools
Mouse is used toapproximately position objects in the scene
Camera Navigation is used toset the camera point of view
Dropdown menu methods are used torun methods “by hand”, to LEARN or USE themresize objectsmore precisely position objects in the scene
Quadview is used toposition one object relative to another object
Demo: Saving a worldWriting and testing an animation is an intense load on the computing system – a crash can occur.
Best solution: save your world every 15 minutes
(Or at least every half hour)
also save to a backup system (flash drive, CDR. itsnuix.albany.edu file system to be
explained in future lectures.)
I ALWAYS backup what I don't want to retype!