EDL - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

EDL stands for Enigma Development Language. It is the high-level language that Enigma provides to game developers to program in, while still providing access to lower level C and C++ calls.

Inherited Features

EDL offers the following features of the popular language GML:

  1. No need for semicolons or parentheses. ENIGMA is, in fact, less picky about symbol use than GML, as semicolons are not required after declarations, parenthesis are not required around for loops, and colons are not required after case labels.
  2. Simple-to-use API. GML's functions are simple to remember and often easy to think up. ENIGMA strives to offer them all across any platform.
  3. Integer-based resource management. All the resources your game needs are loaded for you automatically, and can be referenced by aliased integer.
  4. Scope change using with() constructs. The scope can be changed in EDL dynamically by using with (object/instanceID).

EDL also brings in much-needed functionality from the well-known language C++:

  1. Any function from the standard library. ENIGMA can parse C libraries and make the functions declared in them available in EDL scripts.
  2. Any type or template. ENIGMA can also work with any type defined or available in C++, or the C++ STL.
  3. Operators ++ and --, and operator ?:. ENIGMA brings all the C++ operators missing in GML to the table.

Some new features result from the merge of the two languages. These follow:

  1. Defaulted template parameters. Any non-specified, non-defaulted template parameter is defaulted to variant by the compiler.
  2. Missing colon in ternary. The colon in a ternary expression is basically extra information, and so isn't required in EDL.

Philosophy

Why EDL? Why not JavaScript or plain C++? Why salvage anything from GML or C?

One of the most compelling benefits to maintaining EDL as a separate entity is the ability to cleanly change out the code behind functions--but not the behavior--when compiled from platform to platform. Whether it is making a call to glBegin or d3dDevice->DrawPrimitive, users can expect draw_text() to produce a string of characters on the screen. EDL's implementing headers often jump through a good deal of loops to ensure consistency between platforms.