Skip to content

Utilities

selimanac edited this page Oct 8, 2024 · 3 revisions

daabbcc.reset()

Removes all AABBs, groups, and game objects, resetting to the initial state. It is recommended to reset the DAABBC when you're done with it (e.g., when your game or level is over).

Example

daabbcc.reset()

daabbcc.run(state)

Pause or resume the internal game object position update iteration. This is enabled by default but will not iterate if no game objects are registered. Pausing the iteration can free up compute power (e.g., when the game is paused).

Parameters

  • state (boolean) - Pause or resume

Example

local state = true
daabbcc.run(state)

daabbcc.update_frequency(frequency)

It is possible to set an independent update frequency for the game object position update iteration. The default value is taken from the display.frequency setting in the game.project file. The update loop follows the same structure as in the Defold source.

This can be very useful if you're running a headless build on a server.

Parameters

  • frequency (int32) - Update frequency

Example

local frequency = 60
daabbcc.update_frequency(frequency)