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

Team Us M6 Case Study

Other Cases: Team Us M3 Case Study Team Us M4 Case Study Team Us M5 Case Study

The Problem:

Check out the problem description: Sp2002 P6 - Make it 3D and allow for tours

Our Approach

Apart from the lectures that discussed Wonderland, our understanding of how wonderland truely works was marginal at best. Our first step was to research how exactly we would display our map in this new and foreign 3D world. For this we went to and several other help sites as well as the Wonderland tutorial found in the release image. We also spoke with other groups about high level implementation strategies. We learned quite a bit from hearing what other groups were doing at the Design Roundtable.

We knew essentially what we had to do: make another view or display for our map. All along we had been planning for this, and in this planning, we always tried to make our design generic enough that we could deal with Wonderland, even though we didn't know how we were going to deal with it at the time. Almost all the data was there already: the buildings, streets, route finding, etc. Our task was to add tours and speach and make a 3D display with its own interface. We realized it was a daunting task and started working early, much earlier than we had in previous projects.

We first started with a prototype: we built a small first 1 building, then 2, then we added streets and finally we were loading in the entire datafile. For each new element type (street, roadsign, etc.) we would cut back to only a few instances primarily to reduce load time and make for faster debugging, but also to keep things simple and develope incrementally. For example, when we first started implementing tours, we had no buildings or street signs on the map - this kept things simple and easier to develope. We unit tested with only a small number of elements, then with integration testing we added more and more elements. Finally, we turned on everything: all buildings, streets, signs, and tours.

Our Solution

In our solution, the representation of buildings changed from a flat image to a image pasted on 4 planes arranged in a square. Streets changed from lines drawn on a form to black planes resized to the appropriate length. Street labels became text pasted on small planes that hover over the appropriate intersection.

On the backend, routes were handled identically. We added a Tour builder API that allowed tours to be created from the workspace (or inside another class). The Tour builder works by queueing the buildings, as they are input, and then using the route finder to associate a collection of points that must be traversed for a particular leg of the tour. Each of tour leg is then associated with a textual description. Upon the running of the tour, animations are created for each collection of routes and the speach synthesizer parses the descriptive text into sounds. We then use a carefully timed loop to execute the animations for the tour leg, then read the corresponding text.

Screenshot of our user interface:
Uploaded Image: m6screenshot.gif

Our Code:
Uploaded Image: m6diagram.gif

Class Descriptions

Team Us Class Descriptions - final draft

Reflections on our Solution

Overall, our design worked very well. Since we had been planning for this transition from 2D to 3D since the beginning, our system was flexible enough to integrate with wonderland. The most difficuilt part of the solution was figuring out the quirks of wonderland - the way it likes to rename objects in the namespace, the way it handles animations and timing. Our breakthrough was to use the 'waitUntilDonePlay' method from the Playwriting Workbench case study in the Squeak book. It is what finally allowed us to space out the speaking and the animation so that they did not occur simultaneously.

Refactoring Ideas

Our solution needs optimization. That became apparent when it took 20 minutes to load all 170+ buildings for the first time. There must be a way to decrease load time. I realize that it is loading 170 buidings X 4 sides per building + 60 street signs, but there has to be a fix there. If we had had more time, we would have spent it trying to find this solution.

Links to this Page