love.lowmemory

love.lowmemory Available since LÖVE 0.10.0 This function is not supported in earlier versions. Callback function triggered when the system is running out of memory on mobile devices. Mobile operating systems may forcefully kill the game if it uses too much memory, so any non-critical resource should be removed if possible (by setting all variables referencing the resources to nil, and calling collectgarbage()), when this event is triggered. Sounds and images in particular tend to use the m

love.load

love.load This function is called exactly once at the beginning of the game. Function Synopsis love.load( arg ) Arguments table arg Command line arguments given to the game. Returns Nothing. Examples Establish some variables/resources on the game load, so that they can be used repeatedly in other functions (such as love.draw). function love.load() hamster = love.graphics.newImage("hamster.png") x = 50 y = 50 end   function love.draw() love.graphics.draw(hamster, x, y) end See

love.keyreleased

love.keyreleased Callback function triggered when a keyboard key is released. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis love.keyreleased( key, scancode ) Arguments KeyConstant key Character of the released key. Scancode scancode The scancode representing the released key. Returns Nothing. Notes Scancodes are keyboard layout-independent, so the scancode "w" will be used if the key in the same place as the "w" key on an American key

love.keypressed

love.keypressed Callback function triggered when a key is pressed. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis love.keypressed( key, scancode, isrepeat ) Arguments KeyConstant key Character of the pressed key. Scancode scancode The scancode representing the pressed key. boolean isrepeat Whether this keypress event is a repeat. The delay between key repeats depends on the user's system settings. Returns Nothing. Notes Scancodes are

love.keyboard.setTextInput

love.keyboard.setTextInput Available since LÖVE 0.9.0 This function is not supported in earlier versions. Enables or disables text input events. It is enabled by default on Windows, Mac, and Linux, and disabled by default on iOS and Android. Function Synopsis love.keyboard.setTextInput( enable ) Arguments boolean enable Whether text input events should be enabled. Returns Nothing. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis love.

love.keyboard.setKeyRepeat

love.keyboard.setKeyRepeat Enables or disables key repeat for love.keypressed. It is disabled by default. Function Available since LÖVE 0.9.0 This variant is not supported in earlier versions. Synopsis love.keyboard.setKeyRepeat( enable ) Arguments boolean enable Whether repeat keypress events should be enabled when a key is held down. Returns Nothing. Notes The interval between repeats depends on the user's system settings. This function doesn't affect whether love.textinput is called

love.keyboard.isScancodeDown

love.keyboard.isScancodeDown Available since LÖVE 0.10.0 This function is not supported in earlier versions. Checks whether the specified Scancodes are pressed. Not to be confused with love.keypressed or love.keyreleased. Unlike regular KeyConstants, Scancodes are keyboard layout-independent. The scancode "w" is used if the key in the same place as the "w" key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are. Function

love.keyboard.isDown

love.keyboard.isDown Checks whether a certain key is down. Not to be confused with love.keypressed or love.keyreleased. Function Synopsis down = love.keyboard.isDown( key ) Arguments KeyConstant key The key to check. Returns boolean down True if the key is down, false if not. Function Available since LÖVE 0.7.2 This variant is not supported in earlier versions. Synopsis anyDown = love.keyboard.isDown( key, ... ) Arguments KeyConstant key A key to check. KeyConstant ... Additional k

love.keyboard.hasTextInput

love.keyboard.hasTextInput Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets whether text input events are enabled. Function Synopsis enabled = love.keyboard.hasTextInput( ) Arguments None. Returns boolean enabled Whether text input events are enabled. See Also love.keyboard love.keyboard.setTextInput love.textinput

love.keyboard.hasKeyRepeat

love.keyboard.hasKeyRepeat Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets whether key repeat is enabled. Function Synopsis enabled = love.keyboard.hasKeyRepeat( ) Arguments None. Returns boolean enabled Whether key repeat is enabled. See Also love.keyboard love.keyboard.setKeyRepeat love.keypressed