ChaiLove API  0.13.0
ChaiLove API

This is the API documentation for ChaiLove. For more information about ChaiLove itself, see the ChaiLove homepage.

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

global logo
global x
global y
def load() {
logo = love.graphics.newImage("logo.png")
x = 10.0f
y = 10.0f
}
def update(dt) {
x += dt * 60.0f
y += dt * 30.0f
}
def draw() {
love.graphics.print("Hello World!", 100, 100)
love.graphics.draw(logo, x, y)
}

Modules