JOGS: JavaOne and the State of the Java Gaming Universe, Part II

by Kenn Flynn

In part one of this article, we discussed some of the common misconceptions about Java(TM) technology, and reviewed some of it's use in the gaming and open source communities, all while basking in the afterglow of JavaOne (TM). In part two of this article, we will examine the state of Java technology under the Linux operating system and consider some other Java technologies that might be useful to game programmers. First off, Linux.

Java Technology Under Linux

The word of the day was apology during at least one of the JavaOne sessions. While discussing the current state of the various versions of the Java platform under Linux, the first topic on the agenda was an apology to the Blackdown team. For those of you whom do not follow such things closely, during the release of the J2SE (Java 2 Standard Edition) for Linux, the fact that Blackdown had been a close collaborator and contributor to the product was oddly omitted from any of the press releases and online material. According to the Linux team, that is, the actual software engineers at Sun Microsystems, this was largely a marketing decision that they did not sanction and had no control over.

Once the apologies were out of the way, the forthcoming J2SE 1.4 (codenamed Merlin) was discussed. The Linux port of J2SE 1.4 will likely be out at approximately the same time as the Windows and Solaris versions. However, the J2EE (Java 2 Enterprise Edition) has been somewhat behind the other ports. They are working to reconcile this issue and henceforth release all three platforms (Windows, Linux, and Solaris) at the same time. Largely, it is a testing issue. There are relatively few changes between the Solaris port and the Linux port.

Next came a question and answer session. Of all the questions, "Why not sooner?" stirred the room up a bit. The answer: "Limited resources." That was not the answer the crowd wanted to hear, but it had to suffice.

XML

Many of the technologies available as part of the Java 2 Enterprise Edition are potentially quite valuable to game designers. Of these, perhaps the most easy to see is the use of XML. XML (eXtensible Markup Language) is the emerging standard for business to business communication. It does, however, have applications in many other fields. The idea of XML is to include information about the structure of data along with the data itself. This is somewhat similar to including the names of the fields in your struct along with their values. It is all done in plain text, and shares a common history with HTML. Consider the following example. Suppose we want to represent a world map of a TrollBridge-like game. We might do this somewhat like this:

<level type="Overworld" name="Desert" worldxsize=5 worldysize=4>
 <screen worldx=0 worldy=0>
  <obstacle type="cactus" x=2 y=3 />
  <obstacle type="cactus" x=3 y=3 />
  <obstacle type="rock" x=6 y=2 />
  ...

  <monsters>
   <monster type="scorpion" color="red" carrying="life" />
   <monster type="scorpion" color="blue" carrying="bomb" />
   ...
  </monsters>
 </screen>

 ...
</level>

To make XML truly useful, there must be standard available parsers. Refer to the resources section at the end of this article for several of the freely available parsers, particularly those from IBM and Apache (in no order of preference).

With such parsers, it would be possible to create save game formats that would be easily transferred between different platforms, as well as allowing the development of level content (as shown above) to take place in external tools without an intimate knowledge of the internal representation of the information in the actual game. The price, of course, is the increase in size over binary formats. There is something of a disadvantage, particularly in saved games, to having the format be so easily modified, if making cheating difficult is a prime goal. One possibility for a future article would be to modify an existing game to use an XML level format and measure the increase in size, issues of speed, and ease of use.

Java Web Start

Another technology of potential interest to game designers is the Java Web Start. This technology allows you to post your application to the web, include a link to a special XML file, and with merely a browser plug-in, those who wish to use your program can click on a single web link to download, install, and launch the newest version of your software. Your software is also cached locally so that the currently installed version can be used offline. This looks to be the next major innovation in software delivery technology. It has many of the advantages of applets, such as web-access, and easy distribution of updates.

Playlink

Commercially developed software to do something similar is used on Playlink , an online Java technology gaming site. Originally, I was going to review some of their software for this article, but the complexities of installation over a slow modem connection, as well as registration have convinced me otherwise. The folks who run this company spoke at a session at JavaOne, but really did not offer many insights into the gaming community, as their primary drive is to make a profit. Hence, the proliferation of "family" games. They were quite up-front about this during the Q&A at JavaOne.

That's all from JavaOne. Next time, we'll start with open source games based on Java technology, in the more traditional format for OGS. I intend to write this column every other month (on opposite months as Dennis's column), so until we meet again, have fun gaming!

Resources

W3C
IBM's Developer Web Site
Apache XML Project

About the Author

Kenneth Flynn is a computer programmer for the Naval Research Laboratory in DC, where unlike his many counterparts, he does not build bombs for food. He is also an astronomy graduate student at the University of Maryland, where he has promised not to write another bio about food. He is also an independent consultant, if intellectual property issues do not drive him insane. He was also, unfortunately, the roommate of Dennis for most of his undergraduate days, which contrary to what he occasionally says wasn't too bad an experience. Kenn specializes in Java development, with a bit of C++ on the side. He can be reached at flynnk@astro.umd.edu.

Back to OGS


Java, Sun, JavaOne are trademarks of Sun Microsystems. All other trademarks are the property of their respective owners; no infringement is implied.