DLL

From ENIGMA

Jump to: navigation, search

In computer science, DLL stands for "Dynamically Linked Library" (Also "Dynamic Link Library" [*.dll] on Windows, [*.dylib] on OS X; "Shared Objects" [*.so] on Linux). This means they can be compiled outside of ENIGMA, but ENIGMA games can make calls to them at runtime. Additionally, they are often used for storing pieces of the game's code that may be changed out frequently. Linking the code dynamically allows patches to be made to games to change the behavior of a wide range of events. There is also an article about External Functions

ENIGMA itself also takes the form of a DLL for interacting with LateralGM as a Plugin.

Use

In Game Maker, DLLs served mostly as a means of extending the engine. In ENIGMA, however, C++ can already be used to amend or append the engine, and so DLLs will not so frequently be necessary for the sole purpose of extending language functionality.

Part of ENIGMA's philosophy is to not require DLLs in a stand-alone game[citation needed].

There are presently no solid plans for DLLs in terms of modularizing individual objects in the game, though in the future it is likely for there to be a method of exporting individual objects and functions to separate modules[developer confirmations: 1].

Reading DLLs

For the purposes of emulating Game Maker's external_define(), a method needs to be used that allows loading DLLs without knowing anything about them at compile time. This presents an issue in a type-safe language such as C++. Originally, small pieces of assembly were used to pull off the feat, but LibFFI later proved to be a more elegant, more encompassing solution.

LibFFI

On Windows, ENIGMA interfaces with [*.dll] link libraries via LibFFI[1]. LibFFI is described as a "Portable Foreign Function Interface Library." It allows calls to be made to external libraries by manually setting up the calling convention when passed a sequence of values and a type index. ENIGMA uses only char* and double, making the calls to FFI (and the defining of a function from EDL) relatively trivial.

Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox