Game Development Reference
In-Depth Information
Chapter 11
LÖVE
LÖVE is an open source framework that uses Lua and OpenGL, similar to what most other
frameworks offer. It's available on Windows, Mac, and Unix operating systems. Although LÖVE can't
be used on iOS devices themselves, it's valuable for whipping up quick and easy prototypes of your
game or app on the desktop. Another advantage of LÖVE is that it can be used to create desktop
extensions to your application, which could communicate with mobile applications.
LÖVE can also be used to create a level editor for your games, and since it works with the Lua
language, you can keep to the single language of choice.
The Architecture
LÖVE, unlike other frameworks, relies on specific callback functions. As with other frameworks, there
is no specific structure to follow—with LÖVE there are special functions that need to be declared to
allow the application to run. With these callback functions , the interpreter looks for these functions,
and they're called if they're declared. The LÖVE application architecture is shown in Figure 11-1 .
Figure 11-1. The basic architecture of LÖVE and its callback functions
LÖVE works on the principle of callbacks, which can be in the form of custom functions that are
passed as callbacks, where the user sets them via code or as predefined functions that serve as
callbacks. With LÖVE, the callbacks are predefined functions. So if you define one of the functions, it
will be called as appropriate.
245
 
Search WWH ::




Custom Search