A game engine which provides a simple and easy to learn Lua API.
OB Namespace Reference




struct  _ob_curl_body
struct  _ob_waiting_task
class  AssetLocator
class  AssetResponse
class  BitStream
class  ClassFactory
class  ClassMetadata
class  OBEngine
class  OBException
class  OBInputEventReceiver
class  OBLogger
class  OBRenderUtils
class  OBSerializer
class  Plugin
class  PluginManager
class  TaskScheduler


typedef void(* InstanceInitFnc) (OBEngine *eng)
typedef std::function< void(irr::video::IVideoDriver *)> post_render_func_t
typedef int(* ob_task_fnc) (void *metad, ob_uint64 startTime)


enum  OBLogLevel {
  OLL_Debug, OLL_Information, OLL_Warning, OLL_Error,
enum  empties_t { empties_ok, no_empties }


int luaO_typeerror (lua_State *L, int arg, const char *tname)
ob_uint64 currentTimeMillis ()
bool ob_str_startsWith (std::string str, std::string prefix)
bool ob_str_endsWith (std::string str, std::string suffix)

Typedef Documentation

◆ InstanceInitFnc

typedef void(* OB::InstanceInitFnc) (OBEngine *eng)

◆ ob_task_fnc

typedef int(* OB::ob_task_fnc) (void *metad, ob_uint64 startTime)

This typedef describes the type of function accepted by the TaskScheduler. When queuing a task, you specify a function of this type, and any type to be used as metadata. That type is cast to a void*, which will be passed as the first parameter of this function on invocation. The second parameter, startTime, is the time, in milliseconds, that the task was queued.

The return code of this function is very important, as each return code signals a different handling in the TaskScheduler. If you don't know what you're doing, just return 0 and you'll be fine. Other return codes are described here:

0 - Signals success, removes this task from the scheduler and the TaskScheduler continues processing tasks.

1 - Signals that this task either did not complete its' job or has not run yet, and that it should be left on the scheduler. The scheduler continues processing further tasks, but this task is left to be processed later.

2 - Signals success, same as a response code 0, except the TaskScheduler should stop processing tasks for this tick.

3 - Signals that the task did not complete its' job, same as a response code 1, except the TaskScheduler should stop processing tasks for this tick.

◆ post_render_func_t

typedef std::function<void(irr::video::IVideoDriver*)> OB::post_render_func_t

Enumeration Type Documentation

◆ empties_t


◆ OBLogLevel

All possible log levels. OLL_Debug means to log everything, OLL_None means to log (just about) nothing. When used to print messages, messages marked OLL_Debug have the lowest priority, while OLL_None has the highest. Messages marked OLL_None will always be printed, regardless of log level.

John M. Harris, Jr.

Used for printing information used for debugging


Used for printing useful information such as hardware information


Used to print warnings, such as something unexpected occurring


Used to print critical errors


Messages with this log level will always be printed.

When used as a filter, nothing other than messages with the level 'OLL_None' will be logged.

Function Documentation

◆ currentTimeMillis()

ob_uint64 OB::currentTimeMillis ( )

Returns the current time in milliseconds.

Current time in millis
John M. Harris, Jr.

◆ luaO_typeerror()

int OB::luaO_typeerror ( lua_State *  L,
int  arg,
const char *  tname 

◆ ob_str_endsWith()

bool OB::ob_str_endsWith ( std::string  str,
std::string  suffix 

Returns true if str ends with suffix.

John M. Harris, Jr.

◆ ob_str_startsWith()

bool OB::ob_str_startsWith ( std::string  str,
std::string  prefix 

Returns true if str starts with prefix.

John M. Harris, Jr.