Welcome to the World of Avatars

Virtual Worlds

Subscribe to Virtual Worlds: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get Virtual Worlds: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Virtual Worlds Authors: Kevin Benedict, AppDynamics Blog, David Dodd, Pat Romanski, Corey Roth

Related Topics: Virtual Worlds

Virtual Worlds: Article

Cover Story: The Division that Puts Director to Work

Director use in an educational institution, RIT

The Rochester Institute of Technology (RIT), and the Information Technology Department where I teach, has long been a user of Macromedia products, from Dreamweaver to Director and most things in between. Recently, there has been some debate as to the future of Director's role, considering the increasing use of Flash in the marketplace for Web graphics and interactive displays. While we have moved some of our efforts to Flash technologies, RIT and the IT Department remain committed to the use of Director, because currently no other product on the market can meet our specific needs for an easy-to-script, but performance-aware 3D system capable of delivery on the Web and via downloadable executable.

The shift to ECMAScript syntax represents a major advance in the Director product, and is important to us for a number of reasons. The primary reason for the inclusion of this feature seems to be to provide for a more common language and syntax between Flash MX and Director. We are capitalizing on the similarities in the new syntax to create a streamlined educational experience to bring the products as close together as possible. It also allows for a more complete object-oriented structure, and better tools for list management and string operations.

The Information Technology Department at RIT
Students and Majors

The Information Technology Department at RIT currently enrolls more than 1,000 undergraduate students and approximately 400 graduate students majoring in Information Technology, Networking & System Administration, Software Development & Management, and New Media. We are also hard at work in developing offerings in game programming (a concentration already exists; we are also pursuing plans for a masters degree) and Digital Security. The IT Department is housed within the College with Computer Science and Software Engineering. Courses are generally open to any of the students in any of these programs, as well as to select students in the College of Imaging Arts & Sciences (CIAS), and other students from other areas of campus.

Students and Educational Objectives
The direct effect of all of the different majors and minors available to students is that we have several different types of students in our courses. Some come from traditional computing backgrounds, heavily immersed in math, science, and programming, while others approach application building from disciplines like art, graphic design, and printmaking.

All of our students are required to learn some programming, but because they are majoring in different fields, their reasons for doing so are widely varied. Some of our students are directly concerned with operating systems and low-level driver design; others could care less, and are solely focused on the user experience. Some are designing pieces for back-end server rooms where performance is key; to others it's all about selling the client with look and feel.

Why Director?
Visual Programming

Given that we have students involved with the department with differing pre-requisite backgrounds, it is a challenge to ensure that all of them have the basic programming skills they will need to survive in the IT world. Every student majoring in information technology (but not New Media) is responsible for completing an introductory sequence in the Java programming language. In addition, each must complete an introductory course entitled Programming for Digital Media. This course uses visual tools like Director and Flash to allow students to create a visual application quickly, before they may be able to do so in Java or C/C++. It is a compelling educational experience to be able to create a visual application with graphics and sound in the first year of study.

We have found this to be particularly effective, as you might expect, in teaching students who come from visually oriented backgrounds (art, graphic design, etc.). But this is generally a course enjoyed by all students because of its visual nature: students want to know that they are creating "real applications" that look and feel like those they use on a daily basis. Creating command line-driven exercises has the ring of being false, and as such, it is my experience that students are more engaged and driven to learn in a visual environment. In fact, my team is working on software to allow students to do in Java some of the visual-style programming that makes Flash and Director so appealing.

Recently, we moved a lot of the coursework in Programming for Digital Media from Director to Flash. This is to give students the Flash experience, and because it seems to be the tool of choice for interface design and implementation. Flash handles buttons, sliders, and widgets with amazing ease, and the lightweight plug-in makes it a snap to use almost anywhere. We talked about moving all of the material to Flash, but in the end, this was not implemented for the following reasons:

Imaging Lingo
The first technology that Director contains that is important to us is Imaging Lingo. This is a collection of commands that deal with image manipulation, allowing the programmer to copy rectangles of one image to another, get or set a pixel of an image to a specific color, extract or set the alpha of an image, or apply ink effects to an image or a part of one. This is important to us because the Imaging Lingo operations, and the functionality they allow, are similar to the functionality employed in texture management in lower-level environments.

We teach several courses on game programming, including 2D and 3D Graphics using DirectX and OpenGL. Students develop engines in C/C++ and manipulate textures directly on the graphics card. But the operations, from loading images, copying bits, dealing with alpha, etc., have direct parallels in Imaging Lingo. Students who have taken the prerequisite coursework in digital media have almost no problem grasping what is going on inside a modern graphics engine because of their familiarity with the concepts.

Director makes a great play space and learning environment for exploring imaging concepts because it shields the programmer from the one thing they are most likely to encounter - access to undefined memory. If any of the coordinates that an image copies run amuck, then you are probably trying to read from or write to memory that you don't "own". Dealing with this in C/C++ can be a pain, so it is convenient to explore these concepts first within the protective shield of the Lingo framework.

Shockwave 3D
The single most important reason that the IT Department is using Director is by far Shockwave 3D. No other package on the market provides a cheap, easy way to script a 3D engine with hardware access that can be played back on a machine within a browser and without the latest in graphics hardware.

The ease with which a student can get a 3D engine up and running with Shockwave3D is almost mind-blowing: we left it in Programming for Digital Media as the one Director-based assignment because the ability to do anything in 3D is so important to the student mindset and really empowers them to think, "Hey, I can do this" well before their programming ability would allow them to get involved with 3D in a traditional sense. The 2D and 3D graphics courses, for example, are taught in the third and fourth years of study in the Information Technology program, and are also taught later in the Computer Science program.

To give you a sense of how easy it is to get something happening in 3D, the code presented in Listing 1 is a simple example of placing a cube at the world origin and then rotating a camera around it on a per-frame basis. With the new ECMAScript Syntax in DMX 2004, this is very similar to Flash programming, and our students can bounce back and forth with relative ease (see Listing 1).

Projects RIT Is Involved In
While the above project is a good example of how easy it can be to get involved in Shockwave3D, we are heavily involved in products of greater complexity. It is impossible to catalog all of the ways in which we use Director and other Macromedia projects, but the following are a small selection of things we have done recently with Shockwave3D:

Games and 3D Engines
Games are an important part of our curriculum, both as educational tools and as a concentration area. Some of our students have gone on to work in the games industry, at Microsoft, Electronic Arts, and several smaller studios. Exploring game programming and engine building is currently a very hot academic area, and Shockwave3D allows students to start building 3D games before they take the more traditional graphics courses. One of these projects, entitled "Project Broadsword", has been used in several papers at the Director Online User's Group as an example project for various techniques that were explored during its construction (see Figure 1).

In addition, because S3D offers access to hardware, we've capitalized on it in two ways. It is possible to write traditional 2D games in S3D by fixing the camera perspective. This allows us to design 2D games to the industry standard 60 FPS, which we were usually unable to accomplish using the traditional engines in either Director or Flash.

We've also been able to manipulate the access that Director provides to graphics hardware to add in support to the Nvidia Cg language. Using a custom Xtra we designed, we can use Director as an environment to explore vertex- and pixel-shader development. While this project has just begun, it has the potential to be a very useful prototyping tool (see Figure 2).

That Director allows us the XDK at no extra charge to develop in-house tools for the product is a great fit for us. In the future, hopefully more of the S3D XDK will be made publicly available.

Shared Extensible Learning Spaces
My colleagues, Professors Steve Kurtz and Nancy Doubleday, run an upper-division course every year entitled "Shared Extensible Learning Spaces," which is an evolving set of strategies for the representation of complex concepts in interactive media spaces. Today, the faculty and students are creating 3D spaces populated by smart actors to explore emerging behavior in self-organizing systems and document the cognitive experience of users in virtual worlds. They are developing tools using the Macromedia Director environment at three levels. At the top level are complete products: interactive simulations for learners and researchers. The bottom level is an extensible set of modules and components for the programming environment in which our tools are built. Our middle-level tools allow users/authors to participate in the SHELS project at a level appropriate to their skills and objectives. These components scaffold the experience of simulation building for content experts and learners whose purposes are best served by working at a higher level. We design our environments to facilitate active learning and encourage inquiry and scholarship at every level.

One of the early prototype worlds for the SHELS system was the "Tractor War" world, which allowed the user to observe an ongoing battle between teams of varying colors ("red team," "blue team," etc.) that had different evolutionary algorithms for obtaining and storing food. The teams were represented by tractors (which gathered food) and barns (which stored it) in a 3D world (see Image 3). Director allows a multiuser architecture and the ability to provide 3D front ends to the networked data was a key component in the design of this application.

Data Visualization Prototyping
Another way in which we use Shockwave3D is by prototyping data visualization. A team of students can get a prototype off the ground in just a few days, as opposed to building a complex system that may take months or even years to construct. Since experimentation in visualization is generally an unknown - i.e., you never know if your way of visualizing something will be effective until it's attempted - the need for rapid prototyping is paramount. We've used Director to simulate file system visualization (see Figure 4) as well as cellular automata growth (see Figure 5). In the file system example, it showed enough promise that we went on to develop a more robust system in C++/Java that we are currently still testing.

Conclusion
Director is a powerful tool for use in educational institutions. It allows students to ramp up quickly to create the applications they want to build, and provides building blocks for those that go further on to study lower-level programming languages. The new syntax afforded in DMX2004 allows a closer working relationship with FlashMX users, and has been advantageous to us in teaching students from a wide variety of backgrounds by providing a common language core.

We have been very impressed with what we have been able to accomplish with the existing Shockwave3D package, and hope to see its use grow both within the academic community and in the industry at large.

More Stories By Andrew M. Phelps

Andrew M. Phelps, a member of the Editorial Board of Web Developer's & Designer's Journal, is in the Information Technology Department at the Rochester Institute of Technology in Rochester, NY (http://andysgi.rit.edu/).

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.