Presentation is loading. Please wait.

Presentation is loading. Please wait.

UFCEKU-20-3Web Games Programming Shockwave 3D Environment and Lingo Scripting Basics.

Similar presentations


Presentation on theme: "UFCEKU-20-3Web Games Programming Shockwave 3D Environment and Lingo Scripting Basics."— Presentation transcript:

1 UFCEKU-20-3Web Games Programming Shockwave 3D Environment and Lingo Scripting Basics

2 UFCEKU-20-3Web Games Programming Agenda Shockwave 3D Coordinate System Basics of Shockwave Cameras and Lights Lingo Scripting Review Getting Started Tutorial Overview of 3D World Tutorial Activites

3 UFCEKU-20-3Web Games Programming Director 3D Coordinate System z x + - + - Eye point y + -

4 UFCEKU-20-3Web Games Programming Shockwave Cameras Always in focus No given depth of field No aberrations e.g lens flare Could create some of effects when required but resource intensive

5 UFCEKU-20-3Web Games Programming 3D Viewing Frustrum

6 UFCEKU-20-3Web Games Programming Clipping Planes

7 UFCEKU-20-3Web Games Programming Camera Attributes transform (rotate and translate) projection (orthographic or perspective) fieldofview ( a value > 0 and < 180) orthoheight ( value > 0) hither (near clipping plane) yon (far clipping plane) background colour (rgb value)

8 UFCEKU-20-3Web Games Programming Camera Attributes Default camera is referenced as camera 1 Scene.camera[1].translate(0,70,0) (move in y plane) Scene.camera[1].rotate(-15,0,0) (rotate about x axis) Scene.camera[1].fieldofview = 22 (set lens angle) New cameras can be named on creation: --create new camera called closeup scene.newcamera(“closeup”) --position camera scene.camera(“closeup”).translate(100,200,75) --rotate camera scene.camera(“closeup”).rotate(-10,0,0) --set field of view scene.camera(“closeup”).fieldofview = 11

9 UFCEKU-20-3Web Games Programming Creating Lights Light Types - Point, Directional, Spot, General syntax member(“castmember”).newLight(“name”,#type) Example member(”spotlightOne”).newLight(“spotOne”, #spotlight)

10 UFCEKU-20-3Web Games Programming Light Node Attributes PropertyLight TypeValue Format ColorAllrgb(R,G,B) Rotation#directional, #spotvector(x,y,z) Position#point, #spotvector(x,y,z) Specular#directional, #point, #spottrue or false Spotangle#spot0-90 Spotdecay#spottrue or false Attentuation#point, #spotvector(C,L,Q) constant, linear, quadratic - default is (1,0,0)

11 UFCEKU-20-3Web Games Programming Spot Light Attributes Intensity - how much light emitted from the source light Decay - how much light diminishes away from the source light (fall -off) Cone Angle - width of the lights cone of influence - area outside cone not illuminated Penumbra Angle - fall off at edge of cone angle - more gives a softer edge to the light cone Drop-off - how much the light diminishes at the outer edges Colour - set an RGB colour for the light - affects colour of scene

12 UFCEKU-20-3Web Games Programming Lingo The Lingo scripting language features the usual facilities for declaring Variables of a given type and controlling logic via loops and branches. Syntax (structure), Keywords (reserved), variables, types int, float, string, if.. then, repeat while comments need to preceded by -- -- this is a comment Use the message window to evaluate Lingo code immediately via the put statement type in message window put 14 + 5 19

13 UFCEKU-20-3Web Games Programming Lingo Scripts Types Movie scripts - global across entire movie Behaviour (sprite) scripts - associated with an instance of a sprite or frame in the Score - active at given frame or frames to which assigned Parent scripts are special scripts that contain Lingo that is used to create child objects. You can use parent scripts to generate script objects that behave and respond similarly yet can still operate independently of each other. Object scripts which hold properties and methods (handlers)

14 UFCEKU-20-3Web Games Programming Lingo Handlers Director implements the event -driven programming model Lingo refers to what other programming environments call functions or methods ‘handlers’ Use Lingo handlers (function, method) to ‘handle’ the event -- mouseDown event handler on mouseDown beep end

15 UFCEKU-20-3Web Games Programming Lingo compared to other OOP Languages OOP TermLingo Equivalent Base ClassAncestor Script ClassParent Script Instance VariableProperty Variable Class Instance/ObjectChild Object Method / Member FunctionMethod Event ListenerHandler

16 UFCEKU-20-3Web Games Programming Lingo API Lingo has an extensive API for all aspects of multimedia development. Shockwave 3D has its own additional API for development of 3D navigable interactive environments which can be deployed on the web.


Download ppt "UFCEKU-20-3Web Games Programming Shockwave 3D Environment and Lingo Scripting Basics."

Similar presentations


Ads by Google