View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Questions on Fall2001 P6 Milestone

Link back to Fall 2001 Milestone 6


Test Script Information


The link to the objects zip file, near the top of the assignment, is broken. Michael Kovash

I just tried it, and it worked for me just fine. Check your browser. Mark Guzdial


How do you create a plane in Wonderland (for walls, etc)? We tried looking at how the ground was created but it was dealing with meshes. Is there an easy way? Also, is there a way to move 2d morphs into Wonderland(such as a rectangle morph)?

Thanks,
Squeaky Clean Squeakers
Page 208 in the book: "makePlaneNamed:" Mark Guzdial



Just FYI.. this does not work in Linux :-(. We have spent many hours trying to get it to work. We finally tried it tonite on a windows box and it worked instantly. Sorry if it seemed like a stupid question.







What does this mean?



First, implement the adventure game as it was developed in P2 and P4.

AdventureDemo pseudoKitchenExample

"Use Cat for kitten; Hammer or Sword or Banana for knife;

Use Elvis or Groucho for Troll. Use the Table for the table."

Does that mean the example code from P2 and P4 must also work for this milestone, even though we might be redesigning the API?



The Goods



ABSOLUTELY NOT! You design your own code, no backward compatibility required. HOWEVER, you must be able to implement the same SEMANTICS. You have to have the same FUNCTIONALITY (plus more). So, demonstrate that you have the same functionality by re-implementing (in your system, in your API) the kitchenworld. Mark Guzdial







I have to think that the example code from previous incarnations would not be required to work, because the example code enforced some terrible design desicions. This is correct, yes? Ryan Dawe



exactamundo, you don't have to follow any old code - its totally your redesign, the only important thing is to show that it is capable of implementing the old KitchenWorld - any way you see fit - and make sure you define this and turn it in to demo. Webb



Like the man says... Mark Guzdial



oops...I seem to have accidentally deleted the 'add to this page' interface...I've downloaded the objects, and I've found that a few are waiting forever and not doing anything (cat.mdl, F15.mdl come to mind). Anyone else having this problem? note: other models pop up after a short time (like the toySoldier) but they do pop up. These are locked for over 10 minutes.



Ryan Dawe



Might be broken models. Try them in 3.1 and 2.8, and if they still don't work, give up on those. Mark Guzdial





I've been comparing the working models to the non-working models and I have discovered the flaw. MDL files that work contain a set texture command. In the files the files that are broke the set texture is missing and this nefarious piece of code runs in an infinite loop:



"Now pull in the texture to use"

startSubstr := name , '.SetTexture'.

[(line := aFile upTo: (Character cr)) beginsWith: startSubstr] whileFalse: [].



This code is straight out of the makeActorFrom: method in the Wonderland class (with the underscore changed to :=). As you can probably see, the last line of code keeps geting the next line until it finds the (name).SetTexture. It doesn't even bother to check for the end of the file, so it doesn't even give an error. It simply loops indefinitely. A fix would consist of making the texture definition optional or setting the texture map to a default value if the BMP file is missing. I'll post a fix later.

Unknown Assailant

The Unknown Assailant is back for the Wonderland fix. This fix alows you to load the cat into Wonderland without stalling the image idefinitely. Here it is...

Change the above code to:

"Now pull in the texture to use"
startSubstr := name , '.SetTexture'.
((line := aFile upTo: (Character cr)) beginsWith: startSubstr) ifTrue: [
texture := (line findBetweenSubStrs: '"') at: 2.
texture := (aFile directory pathName), FileDirectory slash, texture.
].

And for the rest of you, goto my page for the file out of Wonderland. It's exactly the same as your Wonderland, but with the above change made.
(For the lazy at heart!)




Is anyone else having the problem that the editor refuses to hide? i create the Wonderland, assign it's reference to w, and then execute "w getEditor hide", which it passes over fine, but lo and behold, it stays put. Am I missing something obvious?



Ryan Dawe



umm, nevermind. apparently I was missing something obvious.





Does anyone know of any thorough documentation for wonderland, I am having a tough time finding more than about a page on everything?



yes, try this Wonderland chapter from squeakbook, Webb

Which, by the way, has been linked to the Syllabus all semester long... Mark Guzdial





Also does anyone know how to resize the world. Thanks



Robert Schierholz



Resize the world? You can't, but you can resize the CameraWindowMorph. Mark Guzdial



I'm having trouble finding this alleged CameraWindowMorph. I have found a CameraMorph, but only see 1 way to access it (through an event). Have I just missed the correct class? Ryan Dawe

A-hah! The default camera allows you to get it's morph! ...although, I think we both had it wrong: I seem to be reading 'WonderlandCameraMorph' ;) Ryan Dawe



Also, does anyone know how to set the Wonderland's position to a particular position in the Squeak world? (The Wonderland chp that Webb posted was good, but can we have more???)Thanks.

MotherSqueakers



The Wonderland is virtual – it has no position in the Squeak world. The CameraMorph does have a position and it can be moved – some of the example code built into the image does that. Look at the 2-D/3-D example where the bunny comes "out" of the window. What's really happening is that the world is made invisible and the camera is moved around. Mark Guzdial



We have a question on the grading scale. According to the P6 specification, interaction with Wonderland is 5% of our final grade. Then there is a section worth 50% of stuff such as objects are takeable, containment, layering, etc. I assume that these points are only granted if these parts work in the Wonderland interface. If not it would appear you could implement the entire project without even touching Wonderland, and still land an A (or even a 100% as there is a total of 105%). Certainly this is not correct?



Yes, the rest of that must work in Wonderland Mark Guzdial







Also, a general question on what we should focus our effort on: redesigning API or 3D stuff. Our group has decided to direct pretty much all of our resources to Wonderland coding, and we're not sure if this is a good move or not. In other words, if our API does not change significantly, will be suffer a big point penalty?



Gark Muzdial and Associates



I want to see both. Mark Guzdial



Is there an easy way to make a copy of objects that refer to each other? In other words, if I create two AGRooms, and they're neighbors, can I use deepCopy to create copies of each? I've tried, and it seems to take up all my space doing what I assume is flipping between the pointers to each other. I could probably build to handle this sort of thing, but it would have to make an assumption like rooms all had different names.



Sounds very dangerous. Do the work and make the pieces separately. Mark Guzdial



We are having difficulty creating walls. The makePlaneNamed: method generates a plane, but it is invisible. How can we make a plane that is visible using this method? It is not an issue of merely calling the show method. Additionally we have tried overlaying textures on the plane with no success. Is there anything we are missing?

Squeaky Clean Squeakers

Mine isn't invisible at all. Have you tried setting its color? Maybe it's transparent? Have you tried in Windows? Mark Guzdial
It ends up that it does not work in Linux, but it does work in Windows. Doesnt this go against the cross-platform nature of Squeak? It seems like calls that only work on some platforms hurt Squeak tremendously, since one of Squeak's biggests strengths is its high portability. Squeaky Clean Squeakers

Just for the record, I can see planes just fine in linux. Using Squeak 3.1, Slackware 8.0, XFree86 4.1 David Raeman



What exactly constitutes a room? Does a change in texture/color of the ground/scenery? or do we have to find a way to make walls out of planes? Also is there a way to make the camera stationary, so it can't be moved by the player?

Thanks!

Gark Muzdial and Associates

Can we include our own .bmp files for textures in the turnin?

Gark Muzdial and Associates

You decide what makes up a room. Try loading some of the scenes in the objects file. I consider those "rooms". You don't HAVE to have walls to make a room. I don't know of a way to make the camera stationary, but if you don't give the user a command to move the camera, how will they be able to? Remember, you're still giving them a Telnet-like interface. Yes, you can provide you own .bmp files. Mark Guzdial



We're trying to implement some simple animations, but some are getting in the way of each other. Is there a way to have an Actor wait for his animations to be completed, then animate some more? Let's assume that doInOrder is inapplicable (doesn't work in our current design). When i try to getAnimations from the actor and wait until his animation Collection is empty, it seems that some animations are content to wait forever. any ideas? this is a really annoying problem. Ryan Dawe

You're trying to outfox Wonderland – bad idea. Fix your design so that you work WITHIN the Wonderland scheduler, not try to outsmart it. Mark Guzdial



Hmm...See, our design takes full advantage of mvc and object oriented design features. This makes it very difficult to have all actions at your disposal when you are animating. Animations can (, should and do!) happen automatically when events occur. However, these automatic animations don't occur one after the other, as they are intended (and chronologically programmed), yet you don't have them localized to use doInOrder. To have these locallized, it seems that absolutely everything would have to be coupled badly, making for a very bad design. Any hints? Ryan Dawe
And Wonderland isn't object-oriented?!? There's more than one way to do MVC and O-O design, and if you're doing it in such a way that you can't deal with Wonderland's scheduler, you're doing it wrong. Re-think your design. O-O means that you reduce coupling. You can't always get rid of it. We'll be talking this week in lecture about the kinds of things you can do when faced with a low-level limitation like the one you describe. Mark Guzdial


I was wondering where it says "Use Cat for kitten; Hammer or Sword or Banana for knife"...does this mean that these are the things we need to use in the wonderland or do we have to make aliases for knife, kitten, and so on. Bharti Agarwal
Those are the 3-D objects to use when implementing the KitchenWorld in your new environment. Mark Guzdial


ok it says that we are supposed to extend our functionality, and we are supposed to redesign our project. Up unti now, I assumed we did not actually need to implement our redesign. It seemed that we only needed to extend the functionality and develop CRC cards and UML diagrams for our new design. Is this correct? Or do you actually expect us to implement a new design for our project and incorporate the 3-d elements all at once?
"I want to see both. Mark Guzdial"
well Dr. Guzdial, I, for one, feel that the assignment statement for P6 could easily be construed to mean otherwise. At the top, it said there were two goals. Redesign your project. Implement 3d model stuff. It did not say implement your redesign. With only a few days left until the due date and the major project for this class's co-requisite(cs2335) due thursday night, it will be very difficult to complete this milestone by thursday morning. I hereby formally request an extension until monday morning at 10 am.(if this is out of line feel free to delete it)
Sign here if you agree:
Errol Summerlin

I'm not going to delete it, but I'm not going to give you an extension, either. How often do you think that it happens in the real world that (a) your Boss wants new features and (b) you hate the current design and want to fix it? You have to satisfice – you have to figure out how much you can do of each. If you redesign and don't implement it, you don't get credit for the redesign. You may have to back off on all the redesign that you wanted to do. Mark Guzdial

My point isn't that the work itself is too much. I just feel that it was unclear as to just how much was expected of this week's project. Errol Summerlin




Mark answering questions on changing scenes:

How to change size of camera window:


A couple other issues:
Mark Guzdial



What is the code which would quite or destory wonderland. ie instead of hitting quit on the scriptEditor what is the corresponding code? Thanks? Robert Schierholz
I don't know. Bring up the halos on the button, explore it, and figure it out. Mark Guzdial

Andreas Raab has a fix for the Wonderland bug that Chris reported:
Hi Mark, I recently submitted a fix for this problem. I don't know what Squeak version you're on so I'm attaching it as reference. But please note that the MDL file format has changed - effectively this means that you will get "empty actors" if you try to load any new .mdl files (but you won't hang in this endless loop ;-) Cheers, - Andreas
Here's the attachment: 4434MDLReadFix-ar.cs


In the pseudoKitchenExample, can we merely choose some other model file than cat.mdl instead of patching the code for Wonderland to get it to load in? Squeaky Clean Squeakers
Yes – you can fix your code, or use a different model. Your choice. Mark Guzdial

Do we have to handle the wrong .mdl path being sent in?
ShortBus
uh - should - you have control over it in your demo code but maybe you should make a note where and what filesystem is being used - Webb
Nope – you load everything yourself. See the path to the Objects description on the P6 page. Mark Guzdial
I remembered seeing that somewhere but overlooked it when checking the second time. Webb

CRC Card analysis of UI system: Classes considered and rejected, and CRC cards for each class in the user interface. It's REQUIRED to hand in xeroxed or generated-tables that represent your CRC cards rather than the actual 3x5 cards.

UML class diagram of UI classes with a description of each class and what it's methods do.

Does this mean that our underlying model classes should not be included in our CRC cards and UML diagram?
Gark Muzdial and Associates
Nope, that's a typo. I'll fix it now. Mark Guzdial


Do people know what "satisficing" means that I mentioned earlier? It's "satisfying under constrained resources" (where time is a resource). It's a work that describes how people problem solve most of the time – you don't have the resources to do an OPTIMAL job, so you do a good enough job within the resources that you have. The key is figuring out what to do first to get the best solution within the resource limitations. That's "satisficing" and it's an important engineering strategy. That's what you need to do on P6. There's not enough time to do everything. There's enough slop in the grading policy that you don't HAVE to do everything to get an A. But you have to decide what you CAN get done and well, in time. That's "satisficing." It's better to practice it here and learn about it than wait until your job is on the line when you first start exploring it. Mark Guzdial


I am finishing up with my graphics and I'm looking for a way to lay characters horizontally on the floor when they die. I have looked at alignWith and moveTo and things like that, could someone perhaps give me an idea of where I want to go with this? Team Rocket
READ THE PDF CHAPTER! There are explicit directions on this there. Mark Guzdial

Test Script Information



Ok so all the object/character images will be stored in a directory 'objects',(FileDirectory slash),'BLAH.mdl'.

My Question is do we have to account for the subdirectories like 'Furnishings' or will all the objects be in one directory with no subdirectories?

Tim Hardcastle
Well for it to work you have to assume that the mdl's are in this one folder, which is going to kill the subdirectories you may be used to like 'Furnishings'. For it to work we're asking you to turn in ALL your models in a zipped up file so everything loads up consistently. All the objects will be in one directory cause your'e gonna turn them in that way - even if you just use Snowwoman, the horse, and bunny; turn em in (if i'm reading the assignment correctly?) Webb
No, Webb. Students may assume that the Objects folder is loaded at the given point. Students need only send the files that they're changing. Mark Guzdial

How do you get access to the actors that are native to alice, specifically ground. Trying to place objects on top of ground, but cannot get its reference.

ShortBus
perhaps, you could do something like "(w getNamespace at: 'ground') destroy." This would destroy the ground object.. do whatever you like with it. Kevin Steely
Like Kevin says. Mark Guzdial


I am wondering if there is a better way to create objects in the wonderland than the way i'm doing it. first, i create the wonderland and then destroy the ground object. i then add the cat or whatever to the wonderland and manipulate it with resize, move, etc.. when it draws to the screen, i see the ground first, then the cat drawn, then the cat do its animations and then the ground destroyed. i tried using duration: #rightNow everywhere and it seesm to fix some things.. but its still not to my desired effect.

also, the rendering is quite slow on my machine. I have a 1.2ghz athlon with an ati radeon 32mb. i don't see why it should be so slow. I'm running 3.1 with openGL. any suggestions?
Kevin Steely
Why are you destroying the ground? That seems really odd. Mark Guzdial

How do you undo the last wonderland event in the code?
ShortBus
browsing the wonderland classes I found "WonderlandUndoStack" which has the method "popAndUndo", so you need "(w getUndoStack) popAndUndo" Webb


Webb, how about a way to pause an action for a short time. Like 2 seconds to look at an object.

ShortBus
READ THE PDF DOCUMENTATION! You can code delays. Mark Guzdial







Links to this Page