Skip to content


Subversion checkout URL

You can clone with
Download ZIP


BlackBulletIV edited this page · 13 revisions

ammo is the main module which manages, mainly there to manage the current world. The table itself and ammo.path are defined in init.lua, while the rest of its functionality is defined in core/init.lua. If core/init.lua is imported directly, without init.lua, it will define ammo and ammo.path itself.


default This is the world that will default to if it is set to nil. This is by default a blank world created via World:new(). If you set this to nil, Ammo will set it to a new blank world.

A table with which extensions can indicate they are loaded. For example, ammo-physics would set ammo.ext.physics to true.

The package path specifying where Ammo is located, relative to your game's path. This is used internally to load the other files in the library.

The currently active game world, which must be an instance of [[World]]. If this is set to nil, it will default to ammo.default. When you set this, the world (and thus the actual value of isn't actually changed until the next frame.


Calls the current world's draw callback. If you haven't already defined love.draw, Ammo will set it to this function (as in, love.draw = ammo.draw). If you do need to define a custom love.draw, remember to call ammo.draw inside it.

Updates the value of, if needed, and calls the current world's update callback. The same information from ammo.draw applies to this function, except it's with love.update.

dt: The delta time.

Something went wrong with that request. Please try again.