Glk (software)

Last updated

Glk is a portable application programming interface (API) created by Andrew Plotkin for use by programs with a text interface; these programs mostly include interactive fiction (IF) interpreters for Z-machine, TADS, Glulx, and Hugo games, and IF games written in more obscure file formats such as those used by Level 9 Computing and Magnetic Scrolls.

The Glk API specification describes facilities for input, output, text formatting, graphics, sound, and file I/O.

Glk does not describe a virtual machine. Glulx is a virtual machine designed to be implemented using the Glk functions, [1] and Glulxe is an interpreter for Glulx. Interpreters for other virtual machines may use Glk while being unrelated to Glulx: for example, Nitfol is an interpreter for the Z-Machine that uses Glk. [2]

The Glk API has many implementations, including GlkTerm, ScummVM's Glk, WindowsGlk, XGlk. [3] Implementations are available on the following platforms:

The existence of the Glk API has made possible the creation of "universal translator" IF interpreters, programs such as Gargoyle and Spatterlight which can run all popular IF formats and almost all of the more obscure ones. Such programs are very useful for newcomers to the medium who are unsure of which interpreter to choose, and to experienced players who may possess games in a variety of formats.

Related Research Articles

<span class="mw-page-title-main">Document Object Model</span> Convention for representing and interacting with objects in HTML, XHTML and XML documents

The Document Object Model (DOM) is a cross-platform and language-independent interface that treats an XML or HTML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document. Nodes can have event handlers attached to them. Once an event is triggered, the event handlers get executed.

<span class="mw-page-title-main">Java virtual machine</span> Virtual machine

A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes what is required in a JVM implementation. Having a specification ensures interoperability of Java programs across different implementations so that program authors using the Java Development Kit (JDK) need not worry about idiosyncrasies of the underlying hardware platform.

<span class="mw-page-title-main">Adobe Flash</span> Deprecated multimedia platform used to add animation and interactivity to websites

Adobe Flash is a multimedia software platform used for production of animations, rich web applications, desktop applications, mobile apps, mobile games, and embedded web browser video players. Flash displays text, vector graphics, and raster graphics to provide animations, video games, and applications. It allows streaming of audio and video, and can capture mouse, keyboard, microphone, and camera input.

The Z-machine is a virtual machine that was developed by Joel Berez and Marc Blank in 1979 and used by Infocom for its text adventure games. Infocom compiled game code to files containing Z-machine instructions and could therefore port its text adventures to a new platform simply by writing a Z-machine implementation for that platform. With the large number of incompatible home computer systems in use at the time, this was an important advantage over using native code or developing a compiler for each system.

Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.

X3D is a royalty-free ISO/IEC standard for declaratively representing 3D computer graphics. File format support includes XML, ClassicVRML, Compressed Binary Encoding (CBE) and a draft JSON encoding. X3D became the successor to the Virtual Reality Modeling Language (VRML) in 2001. X3D features extensions to VRML, the ability to encode the scene using an XML syntax as well as the Open Inventor-like syntax of VRML97, or binary formatting, and enhanced application programming interfaces (APIs).

SableVM was a clean room implementation of Java bytecode interpreter implementing the Java virtual machine (VM) specification, second edition. SableVM was designed to be a robust, extremely portable, efficient, and fully specifications-compliant Java Virtual Machine that would be easy to maintain and to extend. It is now no longer being maintained.

Glulx is a 32-bit portable virtual machine intended for writing and playing interactive fiction. It was designed by Andrew Plotkin to relieve some of the restrictions in the venerable Z-machine format. For example, the Z-machine provides native support for 16-bit integers, while Glulx natively supports 32-bit integers.

<span class="mw-page-title-main">Andrew Plotkin</span> Interactive fiction programmer and writer

Andrew Plotkin, also known as Zarf, is a central figure in the modern interactive fiction (IF) community. Having both written a number of award-winning games and developed a range of new file formats, interpreters, and other utilities for the design, production, and running of IF games, Plotkin is widely recognised for both his creative and his technical contributions to the homebrew IF scene.

Blorb is a package format for interactive fiction games. Many such games incorporate resources such as sound effects, music, or pictures. Blorb's purpose is to bind these together into one file. The format was devised by Andrew Plotkin and is used in both the Z-machine and Glulx virtual machines, as well as by the Glk library.

Ajax is a set of web development techniques that uses various web technologies on the client-side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behaviour of the existing page. By decoupling the data interchange layer from the presentation layer, Ajax allows web pages and, by extension, web applications, to change content dynamically without the need to reload the entire page. In practice, modern implementations commonly utilize JSON instead of XML.

Comet is a web application model in which a long-held HTTPS request allows a web server to push data to a browser, without the browser explicitly requesting it. Comet is an umbrella term, encompassing multiple techniques for achieving this interaction. All these methods rely on features included by default in browsers, such as JavaScript, rather than on non-default plugins. The Comet approach differs from the original model of the web, in which a browser requests a complete web page at a time.

<span class="mw-page-title-main">Java (software platform)</span> Set of computer software and specifications

Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers. Java applets, which are less common than standalone Java applications, were commonly run in secure, sandboxed environments to provide many features of native applications through being embedded in HTML pages.

Interactive television standards are standards for television broadcasting that relate to different modes of interaction and feedback mechanisms. This interaction system is what creates the television experience.

The Java Development Kit (JDK) is a distribution of Java Technology by Oracle Corporation. It implements the Java Language Specification (JLS) and the Java Virtual Machine Specification (JVMS) and provides the Standard Edition (SE) of the Java Application Programming Interface (API). It is derivative of the community driven OpenJDK which Oracle stewards. It provides software for working with Java applications. Examples of included software are the virtual machine, a compiler, performance monitoring tools, a debugger, and other utilities that Oracle considers useful for a Java programmer.

This article compares the application programming interfaces (APIs) and virtual machines (VMs) of the programming language Java and operating system Android.

Windows Runtime (WinRT) is a platform-agnostic component and application architecture first introduced in Windows 8 and Windows Server 2012 in 2012. It is implemented in C++ and officially supports development in C++, Rust/WinRT, Python/WinRT, JavaScript-TypeScript, and the managed code languages C# and Visual Basic .NET (VB.NET).

<span class="mw-page-title-main">WebAssembly</span> Cross-platform assembly language and bytecode designed for execution in web browsers

WebAssembly defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating interactions between such programs and their host environment.

References

  1. http://www.eblong.com/zarf/glk/glk-spec-070_0.html#s.2 Archived 2009-06-25 at the Wayback Machine : 0.2: What About the Virtual Machine? (retrieved 2009-08-23)
  2. http://ifwiki.org/index.php/Nitfol: "Uses the Glk API for I/O.", "Supports versions 1 through 8 of Z-machine" (retrieved 2009-08-23)
  3. http://www.eblong.com/zarf/glk/: section "Liberation" (retrieved 2009-08-23)
  4. http://www.russotto.net/jglulx.html: Java Glulx and Java Glk (retrieved 2009-08-23)
  5. http://eblong.com/zarf/glk/glkote.html: GlkOte: a JavaScript library for IF interfaces (retrieved 2012-05-03)