Alice Community Comprehensive Explanation Needed
 User Name Remember Me? Password

 Thread Tools Display Modes
 Comprehensive Explanation Needed
 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. Comprehensive Explanation Needed - 12-02-2008, 05:36 PM I have been working with Alice for quite some time and I've scoured the textbook I have and have not found any explanation as to how some of the built-in functions in Alice work. Could someone explain: World Functions 1. mouse distance from left edge/top edge (tried to use but didn't understand how numbers were calculated) 2. IEEE Remainder of A/B (probably some math I haven't learned yet) 3. right, up forward (no idea at all about this one) Object Functions 1. Object's quaternion (????) 2. object's part named key (does that have to do with subparts?) 3. object's variable named variablename and of class valueclass Also, all of the seldomly used properties for objects would be nice, especially specular highlight exponent
 Functions and Seldom Used Properties
 DrJim Guest   Status: Posts: n/a Functions and Seldom Used Properties - 12-02-2008, 08:13 PM This is just off the top of my head to get you started - and may not be totally correct. It should, however, give you a start to experiment with. It's also probably worth searching the forum and Dick Baldwin's tutorials for more definitive answers. World Functions 1. mouse distance from left edge/top edge (tried to use but didn't understand how numbers were calculated) This is just the distance the cursor is from the top left edge of the viewing window in pixels. Note values outside the viewing window are allowed. 2. IEEE Remainder of A/B (probably some math I haven't learned yet) Nothing I'd worry about. It refers to an IEEE standard for floating point math but probably won't be too significant with modern machines. Basically it handles things like 4/3 = 1 1/3 = 1.3333333.... (very messy when one was working with 8-bit machines and big numbers ) 3. right, up forward (no idea at all about this one) Essentially the same as the more conventional (x,y,z) coordinates. There are a couple of good forum postings on this. Object Functions 1. Object's quaternion (????) A complex notation for 3-dimensional movement which is widely used in games. Wikipedia has a good article as a starting point for information. I really don't think you can use them within Alice 2.0 very effectively - suspect they were included for debug. 2. object's part named key (does that have to do with subparts?) 3. object's variable named variablename and of class valueclass Both of these can be used to pass parameters to methods. They can be a bit tricky to use as all of the names have to be exact! I believe there is an example in the Dunn, et al text. Also, all of the seldomly used properties for objects would be nice, especially specular highlight exponent. The first few are pretty self explanatory. "is First Class" determines whether or not an object can be selected by the mouse - very useful for something like the ground that you don't want to select. "Emmisive color" is the color of light coming from an object (like a glowing ball). "Spectral Highlights" refers to light from other sources reflected from the an object. The color is a combination of the selected color and the color of the source while the exponent sets the intensity of the reflection. Experimenting here is the best approach, although there are tutorials on the web. Both emmisive color and the spectral parameters, as well as flat vs. smooth shading (experiment with these also) are subsets of the general subject of rendering 3D objects - most 3D modeling programs go into these in some detail. Blender has some of the best tutorials - but they can be pretty difficullt to follow. I have no idea what "eventsStopAscending" does. (Anyone?) An opacity map should allow you to modify a texture with a second image but I've never figured out how to make it work. As I said at the beginning, this is just a first pass. Additions and corrections are welcome and encouraged. Added note: Just after I posted this, a mouse control program that illustrates the first function was posted - see http://www.alice.org/community/showthread.php?t=1931 . Last edited by DrJim; 12-02-2008 at 09:24 PM. Reason: Added reference
 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. 12-02-2008, 10:50 PM i tried to experiment with is pivot showing, but it didn't change anything visibly also, i tried using right,up,forward, but it wont go anywhere. what methods/functions accept it? otherwise this was excellent help thank you Dr. Jim
DrJim
Guest

Status:
Posts: n/a
12-03-2008, 05:01 PM

The attached example should help with both issues.

1. It moves the chicken using right,up and forward coordinates. You can add an "as seen by" reference to make the coordinates absolute but I don't remember the exact details (either the ground or the world sets the (0,0,0) cordinate reference). A forum search on offset or something similar should find it and I think there is an explaination in Dick Baldwin's tutorials - or it's not too hard to figure out with a couple of experiments.

2. I also toggled viewing a pivot (origin and axis) on and off. This works fine on a PC but I believe the axis are not visable on a Mac for Alice 2.0 - though I think this is fixed in 2.2b
Attached Files
 Offset - RightUpForward.a2w (230.0 KB, 46 views)

 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. 12-03-2008, 10:56 PM strange, I'm not using a Mac (I hate Macs, but that's neither here nor there) and I actually have another question: Is there any way to include audio clips in Alice 2.2 in such a way so as not to freeze the video when the clip is played? I've included music and small sound effects before with no problems, but for some reason it froze when i tried to have it play a voiceover for a character. The file is in .wav format and is only 28 seconds long...
 Audio in Alice
 DrJim Guest   Status: Posts: n/a Audio in Alice - 12-04-2008, 09:47 PM Personally I gave up on trying to do any audio other than the very basic stuff in Alice (actuallly this was also the recommended approach in the first edition of the Dunn, et al text). The timing never seems to work right and for videos I usually use a screen capture program and go into a movie editor anyway. You might look at a program called music box that was posted in the forum a while back. Think it solved some of the problems.
 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. 12-05-2008, 03:14 AM Yeah I actually just finished a very large movie (31+MB i think, not sure as i am half asleep) and exported it into Microsoft moviemaker so I could add voiceovers to the characters. That was fun and easy, I recommend it to anyone having any problems with Alice 2.2. Also, has anyone came up with the solution to the "Unable to load world" bug yet? I had it happen to my movie and checked the forums for help and got nothing but a bunch of people who had the same thing happen to them. Fortunately, I got some help fixing it (from Dennis Cosgrove himself!), but I also came up with a way to fix the glitch later. Unzip the .a2w file with the error (I used 7-zip) and save the contents to a folder. Check inside the folder to see all of the objects and methods used by your world, and simply analyze the error message Alice gives you to find the offending method or object and delete the folder with that method/object in it. Finally, zip-up the folder and run it using Alice, the world should now load, but with the components in the folders you deleted gone. (A small sacrifice compared to the loss of the entire program).
 jediaction Senior Member     Status: Offline Posts: 5,064 Join Date: Jul 2009 Location: Bel Air, Maryland 04-21-2011, 06:27 PM Sorry to bump an old thread, but X, is this your first thread? Website: www.salokingames.com FaceBook: www.facebook.com/SalokinGames
 reuben2011 Senior Member     Status: Offline Posts: 489 Join Date: Sep 2009 Location: Hawaii 04-21-2011, 08:19 PM I know this is a really old thread but x2495iiii, did you get all your questions answered? Projects -Escape the Kitchen -That ninja animation -Hill Collision Upcoming Projects -Some penguin adventure game?
 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. 04-23-2011, 12:49 AM To answer both questions: I don't know, probably.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops     Alice Player and VR General Discussion     Questions and Comments     The Lounge

Copyright ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.

 Contact Us - Alice.org - Archive - Top