PDA

View Full Version : Bugs with Alice 2 and ST Alice


hehe
12-05-2007, 10:17 AM
Inspired by Randy Pausch's speech, I started to teach my kids Alice. But first, I had to learn it myself. And in doing that, I found these bugs. I searched this forum and have not seen any of them reported.

1. In ST Alice, some characters can walk, etc., but when they do, they all of a sudden drop to "ground level". Imaging the characters on a castle bridge, high from the ground. If you tell one to walk or straighten up, it essentially disappears.

2. For the "magician" character in ST Alice, at least, if you ask it to say something, the words seem to come out of the apparent center of the object. As an example, imagine her one arm is outstretched to the right. The place where the "say" bubble comes out seems to be below her outstretched arm, instead of her mouth!

3. In a reloaded world, if a character/object is added in scene 2, the listing appears in the global branch (default for scene 1).

4. In the PictureFrame object, if one changes the texture map of the matte, which is a reasonable place to insert a picture of one's own choosing, only a small portion of the picture is shown, and this small portion (about 1/2 x 1/3 the original size, assuming the aspect ratio is right) is not even centered!

5. The font sizes seem to be absolute. So if one changes the player size setting, the words will not be displayed the same way. This seem to apply to both the subtitle and say/think strings.

6. I don't know whether there is a better way to do this, but if I do a while (not var1) {do nothing;} Alice hangs. The reason for this construct is so that a main story line can wait for some key/mouse action to change the var1 value, before moving on. I know this is an obvious dead loop in conventional programming. But because Alice is designed to run many things in parallel (no?), with built-in do-together support, etc., I was hoping for some magic.

7. Alice seems to be afraid of complexity. I had a knight holding a sword in his right hand in scene 1. In scene 3 this is not possible any more. The best I can do is to use his right upper arm as the vehicle for the sword.

8. Differentiation between functions and methods. I'd like to have a boolean function to do these things: (a) ask (through an on-screen character) a question; (b) display the yes/no buttons; (c) give some visual feedback when one of the buttons are clicked; (d) hide the yes/no buttons; (e) return the answer. But apparently this cannot be done. Some of these statements (I forgot which one) cannot be in a function, apparently. This is contrary to the common structures of most, if not all, modern computer languages.

9. Mismatched functions and methods. In ST Alice I can get the position and orientation of a character, but I cannot find a way to make use of these, such as returning a character to a known position to repeat a scene.

I'd be happy to give more detailed descriptions if anyone find one of these hard to duplicate.

Thanks for reading and best wishes.

(BTW, is the "Sharing Worlds" forum the right place to share ST Alice stories? Mine contain no object/world of my own, 'cause I don't have the tools to make them.)

hgs
12-06-2007, 09:06 AM
(not two shillings and sixpence!)
2 you could make the magician->head say the words...
6 You can use the event facilities on the right of the picture view to do this, "when a variable changes" -- I forget the exact words. You could also try putting a pause into your wait loop.
HTH

hehe
12-07-2007, 12:59 PM
Thanks, hgs (HTH).

For 2 I was already doing what you suggested. I was just reporting this as a bug for future improvements.

For 6 presently I trigger the next stage of events through the "on mouse click" event. I believe your first suggestion is equivalent, as both end up breaking the flow of a main storyline. I thought of your second suggested workaround as well, but (a) I cannot find an "infinite pause till something happens" method, (b) "wait n seconds" is not elegant or efficient (compared to regular multi-process/thread processing) enough for me to want to introduce to young children, so I decided to break up the storyline any way. The concepts are not too hard for kids to understand, but the story I write in Alice is now rather hard for kids to follow as a model for their stories. That's the reason I report the bug here, in hope of greater things to come.

hgs
12-07-2007, 01:55 PM
OK. I'm not sure what is being done about bugs in Alice 2 at the moment, so I thought I'd try to help out anyway...

I accept the point about breaking up the storyline, but Alice isn't really meant to represent narrative threads as such: it is to introduce programming, and the structures not being as one would wish is quite common. Languages lack features that others have, and sometimes you have to do inelegant things like using many "if" statements because there is no "switch"/"case" statement, or once you are used to iterators that hide all the indexing of an Array, then having to write a "for" loop is simply pain. The idea of waiting for an event is all very well, but if there are lots of them you can get into real-time programming issues, which are very complex, and many professional programmers get them wrong.

You might be able to take this issue about having to break up the flow as an opportunity to explore how programs might be structured when they are not simple straight line problems. Loops that are long are difficult to think about, if ...else... statements that are long have similar problems. (cf Rolf Harris's "Court of King Caractacus": "Now if you came to see the witches who put the stitches[....]Caractacus, [then] you're too late...") You can use this as an opportunity to talk about methods, subroutines etc and why they are important in programming. Just because you are using this with young children, doesn't mean you can't do that. "Get ready for bed" is a "procedure" consisting of many actions which they'll know are contained in the one idea. Similarly, "wait n seconds" isn't too bad really, it's just like looking at the clock every so often to see if your favorite TV program is about to start. You can even talk about what the computer is doing most of the time "Has the mouse moved? No. Has a key been pressed? No. Has the disk turned round to where that file is yet? Oh yes, so I'll read that." and you could discuss interrupts, and why it's a good thing that you don't have to pick up the phone every 5 minutes to see if there's someone on the line who wants to talk to you :-) [I recently heard of a musician who took the bells out of his phone, so he'd only answer it at the exact time he'd been told he'd get the call!]

HTH wasn't an alternative set of initials for me, merely "Hope That Helps".