Skip to main content

Execution

General

This page defines behavior that occurs when OBGX operations are performed. It does not prescribe an implementation language, runtime, or error-handling mechanism.

Unless explicitly stated otherwise, OBGX does not prescribe the concrete form used to perform an operation. An operation may be realized entirely through a programming language or another mechanism and does not require calling an OBGX function or interacting with an implementation or host at the time it is performed.

The types on which operations act are defined by the Type System.

Namespaces

A host must associate exactly one namespace with each pack. For every operation whose behavior depends on the namespace associated with its caller pack, a host must use the same namespace for operations originating from that pack, including operations performed through different implementations of that host. Multiple packs may be associated with the same namespace.

An OBGX operation must not change the namespace associated with its caller pack.

When a pack registers a game object through an OBGX interface, the host must register the game object under the namespace associated with the caller pack and the provided id.

A host's game object registrations are shared by its implementations. A game object registered through one implementation must remain the same registered game object when observed through another implementation of that host. Implementations may expose different representations of the game object, but those representations must preserve its OBGX-visible identity and behavior.

An operation that registers a game object or modifies an existing game object's registration must identify that game object with an id and must use the namespace associated with the caller pack.

An operation that can only target a game object under the namespace associated with the caller pack must identify that game object with an id. An operation that may target a game object under another namespace must identify that game object with a refid.

OBGX does not specify how a host handles multiple registrations with the same namespace and id.

OBGX does not specify how a host determines, stores, or internally represents the association between a pack and its namespace, including how the host determines whether operations performed through different implementations originate from the same pack.

Numeric Operations

Integer Arithmetic

When the result of signed integer arithmetic exceeds the maximum value of its type, it wraps through the minimum value. When it falls below the minimum value, it wraps through the maximum value.

When the result of unsigned integer arithmetic exceeds the maximum value of its type, it wraps through zero. When it falls below zero, it wraps through the maximum value.

Floating-Point Arithmetic

Floating-point arithmetic must follow the IEEE 754 standard for binary floating-point arithmetic, when observed from an OBGX interface. This includes the definition of special values such as NaN and infinities, as well as rounding, overflow, and underflow behavior.

Fault Completion

An OBGX operation completes normally or with a fault. The Faults page defines fault completion and the requirements for standard and implementation-defined fault types.