Z-Machine Preservation Project -> Comparison with Zplet

Comparing ZMPP to Zplet

General information

I wrote this comparison primarily because people often compare ZMPP to ZPlet. Since the target group is the same this is understandable.

ZMPP is not Zplet (But I did not want to call it "ZinZ")

Even though they both target the same platform, ZMPP has no similarities to Zplet, neither codewise nor in its project goals. ZMPP in fact shares more similarities with "Frotz" and "Zoom", initially there was not even an applet version planned, but the project turned out to progress pretty well and so the applet functionality was added as an option.

Different Java versions

Zplet was the first project that allowed interactive fiction using Z-code to be played online using a Java applet and for a long time, it has been the only one. It has one big advantage: It is implemented using Java 1.0 which is the Java standard implemented by the virtual machine in Internet Explorer, so it is already available in Windows systems (the security model in this version of Java also allows Zplet to save the game state to the file system). However, Java 1.0 is heavily outdated and it is expected that Microsoft will pull support for Java in future versions of Windows/Internet Explorer.

ZMPP requires at least a Java 5 system which at the time of the project start is the most current version of Java.

Note: If Java 5 is not an option, Zplet is the project of choice.

Features

Below is a summary of the features of Zplet and ZMPP compared:

Zplet ZMPP
Java version >= 1.0 >= 5.0
Java plugin required no (IE, Netscape)/yes (other browsers) yes
License Artistic license GPL
Size of jar file small medium
Story file versions 3, 5 and 8 1-8 (including V6)
runs in browser yes yes
runs standalone yes yes
Colors yes yes
Supports accents input/output (with "JL patch") input/output
Save game state Quetzal 1.4 in IE (restricted on other browsers) Quetzal 1.4, signed applet/save to memory
Timed input no yes
Blorb files no yes
Graphics no both V6 graphics and Inform cover art (Treaty of Babel)
Sound no yes (AIFF)
Metadata no Cover art and bibliographic information (Treaty of Babel)
Overridable default colors yes yes
Overridable font sizes no yes
Antialiased fonts no yes

Statistics

Since ZMPP supports a larger feature set, it comes at no surprise that the jar file is significantly larger than Zplet's. The number of classes also indicates that ZMPP has its focus on an object-oriented structure. In practice, it makes each source file in ZMPP easier to maintain because the average file size is smaller. On the other hand the sheer number of classes would make the system as a whole less managable.

ZMPP overcomes this with a test set of about 500 test cases which mainly test the core functionality. A problem spotted by the test suite is usually fixed very quickly and as functionality is being added and bugs are spotted, more tests are being added as well.

It should be pointed out that this also affects the downloading time of the applet which can take 3-4 times longer due to the larger file size. On fast servers and internet connections this would not be an issue, but would be most noticeable on a dialup connection in combination with a slow web server.

Note that ZMPP was not primarily designed to be run as an applet that supports a subset of the specification, but rather a full-featured Z-machine implementation.

Interpreter Size of jar file (bytes) # of packages # of classes # of code (with comments, not including test code)
Zplet 53248 7 33 6559
ZMPP 198958 10 150 24839

Focus on modern software development methodologies

ZMPP first and foremost is a project for me to try out things that I can not try at work, such as trying how to improve unit tests, how to effectively structure my design or how to use the latest features of the Java platform. Some of the results flow back to my daily work again, so developing it has already paid off.

Conclusion

It might pay off to evaluate which system is most suitable to your needs. It is mostly a tradeoff between features and size of download and Java version.

Both interpreters are freely available and can be compared and chosen according to the specific requirements that you might have.

ZMPP was not created to replace Zplet, but to offer an additional option on the Java platform using contemporary tools, standards and methods. It's great to have options. Z-machine users live in a nice world.


-> Privacy