Advanced API
When to Use It
Use the managed API for ordinary gameplay: jolt_start(), managed objects, jolt_update() and jolt_stop(). Use the raw layer when you deliberately need an isolated explicit world or direct bridge control. It does not automatically supply managed registries, instance binding or helper lifecycles.
| API | Contract |
|---|---|
| Managed constructor | Returns a wrapper or undefined; default world implicit. |
| Raw constructor | Usually returns a numeric handle > 0 or zero on failure; world supplied explicitly. |
| Private __jolt_* helpers | Implementation details, not a supported gameplay interface. |
Verified operation contracts#
These contracts distinguish units, return values, errors and lifetime according to the current implementation. Check results: false, 0 and undefined can mean different things for different methods.
| Symbol / owner | Signature | Operation contract |
|---|---|---|
| jolt_api_version | jolt_api_version() | Numeric DLL transport API version, not the asset JSON version. Low-level calls use numeric handles; scalar failure returns 0 and sets jolt_get_last_error_code/message. Zero may also be valid: inspect the error state immediately. |
| jolt_default_world | jolt_default_world() | Reads managed state without stepping: started Boolean / world handle / fixed_dt s / cumulative step count / valid body-wrapper count. Wrapper count is not a validation of every native handle. |