From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
Not to be confused with Game Maker Language, a non-esoteric language developed by Yo Yo Games Ltd.

GML is the programming language defined for ICFP contest 2000. The goal of the contest is to implement a ray tracer. The GML language is thus used to describe a scene as input to the raytracer. The description of the language is available in HTML, PDF and postscript format.

GML is a simple pure functional language with syntax somewhat similar to postscript. It has an argument stack and an implicit execution stack. It has lambda syntax that creates functions with read-only variables bound to names. Types of values supported are: boolean, integer, floating point number, point (triples of floats), read-only array containing arbitrary values, function (closure), object, light.

The objects are built using constructive solid geometry. The base objects are sphere, cube, cylinder, plane. The texture of a base object is defined by a "surface function", a GML function that takes surface coordinates as input and returns the color and texture properties at that point of the surface. Objects can be transformed and combined with union, intersection and difference operators. GML has an operator to render a ray-traced image from objects and lights, so a single program may generate any number of images by calling the operator in a loop.