Advertisement: Support SunWorld, click here!

September 1999
Next Story
Printer-Friendly Version
Subscribe, It's Free
Topical Index
Letters to the Editor
Events Calendar
TechDispatch Newsletters
 Technical FAQs    
Solaris Security
Secure Programming
Performance Q&A
SE Toolkit
 SunWorld Partners    
Software Store
Career Central
Sun Microsystems
 About SunWorld    
  SunWorld FAQ
Advertising Info
SunWorld Editors
Editorial Calendar
Writers Guidelines
Privacy Policy
Link To Us!


Xanadu from the wilderness

Scripting takes hypertext and games to the limits

Xanadu debuts (finally!) and scripting's role in the wonderful world of gaming. (1,100 words)


By Cameron Laird and Kathryn Soraiz
Scripting is making inroads in surprising places.

In the first Regular Expressions installment of each month, we usually feature an example of scripting in the real world. While a few readers have criticized our liberal interpretation of this category, we tend to focus on applications that connect to physical devices, and/or are realtime, and/or are mission-critical in an appropriate sense. We enjoy power plant or medical instrument applications, but document management sorts of applications don't fit, and we know little about gaming software.

This month is different, though. Two of the biggest recent news items having to do with scripting involve hypertext and games.

Ted Nelson returns
Imagine Mickey Mantle coming out to match long balls with McGwire and Sosa, or Jimi Hendrix returning to Woodstock, and you can imagine the atmosphere when Ted Nelson announced the release of Xanadu at the O'Reilly Open Source Software Convention in Monterey, CA (also see, "A report from the Open Source Convention").

While it's hard to convey briefly the historical weight Xanadu hefts, its Web site summarizes it nicely: "Founded 1960: The Original Hypertext Project." That's right -- 30 years before Tim Berners-Lee passed around his Web proposals, Ted Nelson was working out a hypertext system from which we still have a lot to learn.

It's not just that Xanadu is a fantastic creative achievement, though; it's also infamous as the tardiest software ever. It's been nearly ready to ship numerous times since the 1970s.

And it finally happened, just a few days ago. Nelson and his team demonstrated Xanadu and passed out its source code(!). After a sojourn through the wilderness nearly as long as the Israelites', Xanadu is real, and it works (well, partially).

A full description of Xanadu's history and functionality will fill at least a book. All we can do now is to showcase scripting's role in the product release.

Xanadu and scripting
Xanadu is ambitious. Very, very ambitious. It's a client/server application designed to be bigger than the Web itself. Much of the Xanadu coding in the last 20 years has been in C, C++, and Smalltalk. Nelson's team released a slightly more modest form of the project, called Udanax Green, coded in C on the server side, and pure Python for clients. The choice of Python, of course, gives outstanding portability, rapid and safe development, and an excellent basis for programming teamwork. We've worked with the release only long enough to notice that it mixes both procedural and object-oriented segments a bit inconsistently. Otherwise, it seems clean and certainly is readable.

In any case, Xanadu will receive a lot of attention over the next few months. It promises to be an excellent demonstration of how Python fares in a high-performance, large-scale, complex role that many programmers believe is reserved for C++ and Java.

Two other connections between Xanadu and scripting are topical this summer. The week before Nelson's announcement, Montreal hosted a pair of hypertext conferences: MetaStructures 99 and XML Developers' Day. Most of the contents of these events was at or beyond the leading edge; the domain of the former, for example, is "the evolving abstractions that underlie modern information management solutions, how they enhance human productivity, and how they are being applied by expert information managers." Much of the working code discussed there was written in Python, along with C++ and Java.

Finally, Larry Virden, maintainer of the official FAQs for Tcl, has long had an eye on the Xanadu project. He's experimented through the years with all the hypertext and collaborative software he's been able to find. The only systems that have kept his interest for long are the Web, Usenet newsgroups, and Wiki. The Tcl community has now constructed a fascinating and high-quality Wiki introduction to Tcl -- itself programmable with Tcl, of course! (See Resources for pointers to all these topics.)

Scripting good enough for games
One question for which Nelson likes to take credit is, "Why are video games so much better designed than office software?" The answer he intends, of course, is that programmers like to play games, but are indifferent to word processing and spreadsheet manipulation. Their best efforts go toward the projects that matter to them.

For the most part, game engineering has meant assembly language, C, and C++, with highly nonportable coding "down to the metal." Over the last few years, though, several of the savviest game developers have realized that scripting has a role even in this demanding domain.

More precisely, scripting has a role because it's such a demanding domain. The usual attitude has been that coding in an expressive language takes too many cycles, and game developers are always hungry for performance. Think, though, about the "split-level" model we often advocate, where an application is built from pieces coded in at least two different languages. The processor-intensive components are best done in assembly or C, while scripting manages the architectural "glue." Scripting is able to bring its benefits of rapid development, flexibility, and dynamic configurability at an insignificant cost in speed.

Gamasutra, an online game magazine, recently reprinted a couple of quality articles on just this subject: the role of scripting, or highly expressive languages, in high-performance games. If you're not a games programmer, take a moment to put yourself in their shoes. Most of us spend our time fussing with ingeniously mistake-prone end users, clients uncertain of what they want, and vendors who deliver faulty products for which we have to compensate. Gamers don't have the luxury of slowing down for any of these annoyances. They live in a simplified Darwinian struggle where only the hottest, fastest, splashiest products survive.

It's particularly meaningful then when Robert Huebner, a senior programmer at LucasArts Entertainment, introduces his detailed explanation of "Adding Languages to Game Engines" with this:

The best way to stay competitive in the race for bigger and better games and game engines is to keep the engine as flexible, expandable, and robust as possible. An internal scripting language allows you to create a separate, crash-proof environment inside your game engine.

Whatever your problem domain -- monitoring interbank transactions, creating user interfaces for consumer appliances, launching communications satellites, or just keeping the wall of servers in the back room healthy -- the same lesson probably applies to you. You can see more of the same on Ward Six Entertainment's News pages for late August and early September. This gaming company is adopting Tcl as a scripting interface, and describing the results as they go (see Resources).

Looking ahead
Coming up next month, we'll shine a different light on Oracle's involvement with high-level languages and provide a "hands-on" tutorial for obtaining the latest fixes to your favorite tools. Stay tuned!

About the author
Cameron Laird and Kathryn Soraiz manage their own software consultancy, Network Engineered Solutions, from just outside Houston, TX.

Home | Next Story | Printer-Friendly Version | Comment on this Story | Resources and Related Links

Advertisement: Support SunWorld, click here!

Resources and Related Links

Other SunWorld resources


Tell Us What You Thought of This Story
-Very worth reading
-Worth reading
-Not worth reading
-Too long
-Just right
-Too short
-Too technical
-Just right
-Not technical enough

(c) Copyright 1999 Web Publishing Inc., and IDG Communication company

If you have technical problems with this magazine, contact

Last modified: