love (Français)

C'est le module racine qui contient tous les autres modules. Le plus löve des modules...

Quand on commence à scripter avec LÖVE, la partie la plus importante est celle des «Call Backs», love.load pour charger les paramètres initiaux, love.update pour gérer le status du jeu entre chaque «Frame» et, love.draw pour appliquer des dessins à l'écran.

La plupart des jeux interactifs réécrivent certains callbacks pour gérer les actions de l'utilisateur ainsi que tout les aspects d'un jeu complet.

LÖVE dispose de remplacements par défaut pour ces callbacks que vous pouvez simplement réécrire dans votre propre code, simplement en spécifiant leur nom complet:

function love.load()
   hamster = love.graphics.newImage("hamster.png")
   x = 50
   y = 50
end
function love.draw()
   love.graphics.draw(hamster, x, y)
end

Modules

love.audio (Français) Fournit une interface pour créer des bruitages avec les haut-parleurs de l'utilisateur.
love.event (Français) Gère les événements comme les frappes de touches.
love.filesystem (Français) Fournit une interface pour le système de fichiers des utilisateurs.
love.font (Français) Permet de manipuler les polices de caractères.
love.graphics (Français) Dessins de formes et d'images, contrôle de l'agencement de l'écran.
love.image (Français) Fournit une interface pour décoder les données d'images codées.
love.joystick (Français) Fournit une interface du joystick pour l'utilisateur.
love.keyboard (Français) Fournit une interface du clavier pour l'utilisateur.
love.mouse (Français) Fournit une interface vers la souris de l'utilisateur.
love.physics (Français) Peut simuler la physique 2D des corps rigides de manière réaliste.
love.sound (Français) Ce module est responsable du décodage des fichiers audios.
love.thread (Français) Vous permet d'utiliser les threads.
love.timer (Français) Fournit une interface vers l'horloge de l'utilisateur.

Types

Data (Français) Super classe de tous les objets de données.
Object (Français) Super classe de tous les objets.

Fonctions de Rappel

Géneral

Config FilesGame configuration settings.
love.drawCallback function used to draw on the screen every frame.
love.errhandThe error handler, used to display error messages.
love.focusCallback function triggered when window receives or loses focus.Added since 0.7.0
love.gamepadaxisCalled when a Joystick's virtual gamepad axis is moved.Added since 0.9.0
love.gamepadpressedCalled when a Joystick's virtual gamepad button is pressed.Added since 0.9.0
love.gamepadreleasedCalled when a Joystick's virtual gamepad button is released.Added since 0.9.0
love.joystickaddedCalled when a Joystick is connected.Added since 0.9.0
love.joystickaxisCalled when a joystick axis moves.Added since 0.9.0
love.joystickhatCalled when a joystick hat direction changes.Added since 0.9.0
love.joystickpressedCalled when a joystick button is pressed.
love.joystickreleasedCalled when a joystick button is released.
love.joystickremovedCalled when a Joystick is disconnected.Added since 0.9.0
love.keypressedCallback function triggered when a key is pressed.
love.keyreleasedCallback function triggered when a key is released.
love.loadThis function is called exactly once at the beginning of the game.
love.mousefocusCallback function triggered when window receives or loses mouse focus.Added since 0.9.0
love.mousepressedCallback function triggered when a mouse button is pressed.
love.mousereleasedCallback function triggered when a mouse button is released.
love.quitCallback function triggered when the game is closed.Added since 0.7.0
love.resizeCalled when the window is resized.Added since 0.9.0
love.runThe main function, containing the main loop. A sensible default is used when left out.
love.textinputCalled when text has been entered by the user.Added since 0.9.0
love.threaderrorCallback function triggered when a Thread encounters an error.Added since 0.9.0
love.updateCallback function used to update the state of the game every frame.
love.visibleCallback function triggered when window is shown or hidden.Added since 0.9.0

Joystick

Config FilesGame configuration settings.
love.drawCallback function used to draw on the screen every frame.
love.errhandThe error handler, used to display error messages.
love.focusCallback function triggered when window receives or loses focus.Added since 0.7.0
love.gamepadaxisCalled when a Joystick's virtual gamepad axis is moved.Added since 0.9.0
love.gamepadpressedCalled when a Joystick's virtual gamepad button is pressed.Added since 0.9.0
love.gamepadreleasedCalled when a Joystick's virtual gamepad button is released.Added since 0.9.0
love.joystickaddedCalled when a Joystick is connected.Added since 0.9.0
love.joystickaxisCalled when a joystick axis moves.Added since 0.9.0
love.joystickhatCalled when a joystick hat direction changes.Added since 0.9.0
love.joystickpressedCalled when a joystick button is pressed.
love.joystickreleasedCalled when a joystick button is released.
love.joystickremovedCalled when a Joystick is disconnected.Added since 0.9.0
love.keypressedCallback function triggered when a key is pressed.
love.keyreleasedCallback function triggered when a key is released.
love.loadThis function is called exactly once at the beginning of the game.
love.mousefocusCallback function triggered when window receives or loses mouse focus.Added since 0.9.0
love.mousepressedCallback function triggered when a mouse button is pressed.
love.mousereleasedCallback function triggered when a mouse button is released.
love.quitCallback function triggered when the game is closed.Added since 0.7.0
love.resizeCalled when the window is resized.Added since 0.9.0
love.runThe main function, containing the main loop. A sensible default is used when left out.
love.textinputCalled when text has been entered by the user.Added since 0.9.0
love.threaderrorCallback function triggered when a Thread encounters an error.Added since 0.9.0
love.updateCallback function used to update the state of the game every frame.
love.visibleCallback function triggered when window is shown or hidden.Added since 0.9.0


Autres langues

Personal tools