Game Development Reference
In-Depth Information
end
-- using event.poll
for event, arg1, arg2, arg3, arg4 in love.event.poll() do
if event == "quit" then -- Quit!
-- In LÖVE 7.0, you would look for 'q'
end
end
love.event.wait is a blocking function (i.e., it will stop the application and wait till it finds an event).
event, arg1, arg2, arg3 = love.event.wait( )
Note There are some differences between LÖVE 0.7.2 and 0.8.0 regarding the number of parameters
returned in love.event functions.
love.filesystem
This provides an interface to the user's file system. This is sandboxed, in a manner of speaking, and
the access is granted to only two directories:
.love archive (or source directory)
The root folder of the game's
The root folder of the
save directory .
The write access is provided to only the game's save directory. This directory can be found in the
following places on the various operating systems:
Windows XP : C:\Documents and Settings\user\Application Data\Love\ or
%appdata%\Love\
Windows Vista and 7 : C:\Users\user\AppData\Roaming\LOVE or %appdata%\Love\
Linux : $XDG_DATA_HOME/love/ or ~/.local/share/love/
Mac : /Users/user/Library/Application Support/LOVE/
love.font
This provides a series of functions that allow for working with fonts. The functions in this namespace
allow for creating or using custom fonts.
love.graphics
This namespace provides a very large number of graphics-related functions. This is where all the
functions for graphical functionality reside.
 
 
Search WWH ::




Custom Search