When beginning to write games using LÖVE, the most important parts of the API are the callbacks: [[love.load]] to do one-time setup of your game, [[love.update]] which is used to manage your game's state frame-to-frame, and [[love.draw]] which is used to render the game state onto the screen.

More interactive games will override additional callbacks in order to handle input from the user, and other aspects of a full-featured game.

LÖVE provides default placeholders for these callbacks, which you can override inside your own code by creating your own function with the same name as the callback:

<source lang="lua">
-- Load some default values for our rectangle.
function love.load()
    x, y, w, h = 20, 20, 60, 20
end

-- Increase the size of the rectangle every frame.
function love.update(dt)
    w = w + 1
    h = h + 1
end

-- Draw a coloured rectangle.
function love.draw()
    love.graphics.setColor(0, 0.4, 0.4)
    love.graphics.rectangle("fill", x, y, w, h)
end
</source>

== Modules ==
{{#ask: [[Category:Modules]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

== Third-party modules ==
{{#ask: [[Category:Libraries]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

== Functions ==
{{#ask: [[Category:Functions]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

== Types ==
{{#ask: [[Category:Types]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

== Callbacks ==
All callbacks are only called in main thread.
=== General ===
{{#ask: [[Category:Callbacks]] [[Subcategory::General]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

=== Window ===
{{#ask: [[Category:Callbacks]] [[Subcategory::Window]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

=== Keyboard ===
{{#ask: [[Category:Callbacks]] [[Subcategory::Keyboard]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

=== Mouse ===
{{#ask: [[Category:Callbacks]] [[Subcategory::Mouse]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

=== Joystick ===
{{#ask: [[Category:Callbacks]] [[Subcategory::Joystick]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

=== Touch ===
{{#ask: [[Category:Callbacks]] [[Subcategory::Touch]] [[parent::love]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?PrettyDeprecated
}}

[[Category:Modules]]
{{#set:Description=The root module which contains all the other modules.}}
{{#set:Since=000}}

== Other Languages ==
{{i18n|love}}