tida.runtime

Runtime is a fundamental module for building two-dimensional games. It is he who connects to the window manager of the operating system, initializes the sound device and loads the necessary libraries for the game. Also, it is able to store program arguments in itself, in order to pass them later to other functions.

How do I create a runtime?: Creating a runtime is quick and easy. There is a class, it has a static method , which allocates memory, and then calls the internal functions of the object to execute its functions. This is done in the following way:

import tida;

int main(string[] args)
{
    TidaRuntime.initialize(args);

    return 0;
}

As you can see, the program arguments are passed to the function. This is necessary in order to later use them outside the main function.

Also, the second parameter can be a list of libraries to load. All kinds of libraries that runtime can load are described in .

import tida;

int main(string[] args)
{
    TidaRuntime.initialize(args, [FreeType, OpenAL]);

    return 0;
}

Or you can use AllLibrary to say that you need to load everything, or WithoutLibrary that you need to load nothing.

Next, to take advantage of the runtime, you can refer to the runtime function, which will give the runtime object as long as you can do something. All actions are described in .

Members

Aliases

LibraryUnite
alias LibraryUnite = int
Undocumented in source.

Classes

TidaRuntime
class TidaRuntime
Undocumented in source.
TidaRuntime
class TidaRuntime

The interface of interaction between the program and the window manager.

Enums

OpenAL
anonymousenum OpenAL
Undocumented in source.

Interfaces

ITidaRuntime
interface ITidaRuntime

The interface of interaction between the program and the window manager.

Manifest constants

AllLibrary
enum AllLibrary;

An array of library indexes. Indicates that all libraries should be loaded, when specified in the $(HREF ../tida/runtime/ITidaRuntime.initialize.html, initialization) of the runtime.

WithoutLibrary
enum WithoutLibrary;

An array of only important libraries. Loads only the necessary libraries (for connecting to the window manager) when specified in the $(HREF ../tida/runtime/ITidaRuntime.initialize.html, initialization) of the runtime.

Properties

runtime
TidaRuntime runtime [@property getter]

Global access to runtime. An object can be called from anywhere, but cannot be replaced.

Static variables

_runtimeObject
TidaRuntime _runtimeObject;
Undocumented in source.

Variables

NvOptimusEnablement
ulong NvOptimusEnablement;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta