love.filesystem.getSourceBaseDirectory

love.filesystem.getSourceBaseDirectory Available since LÖVE 0.9.0 This function is not supported in earlier versions. Returns the full path to the directory containing the .love file. If the game is fused to the LÖVE executable, then the directory containing the executable is returned. If love.filesystem.isFused is true, the path returned by this function can be passed to love.filesystem.mount, which will make the directory containing the main game (e.g. C:\Program Files\coolgame\) readabl

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

ParticleSystem:setAreaSpread

ParticleSystem:setAreaSpread Available since LÖVE 0.9.0 This function is not supported in earlier versions. Sets area-based spawn parameters for the particles. Newly created particles will spawn in an area around the emitter based on the parameters to this function. Function Synopsis ParticleSystem:setAreaSpread( distribution, dx, dy ) Arguments AreaSpreadDistribution distribution The type of distribution for new particles. number dx The maximum spawn distance from the emitter along the

love.joystick.saveGamepadMappings

love.joystick.saveGamepadMappings Available since LÖVE 0.9.2 This function is not supported in earlier versions. Saves the virtual gamepad mappings of all Joysticks that are recognized as gamepads and have either been recently used or their gamepad bindings have been modified. The mappings are stored as a string for use with love.joystick.loadGamepadMappings. Function Saves the gamepad mappings of all relevant joysticks to a file. Synopsis mappings = love.joystick.saveGamepadMappings( fi

PrismaticJoint:hasLimitsEnabled

PrismaticJoint:hasLimitsEnabled Available since LÖVE 0.9.0 This function is not supported in earlier versions. Checks whether the limits are enabled. Function Synopsis enabled = PrismaticJoint:hasLimitsEnabled( ) Arguments None. Returns boolean enabled True if enabled, false otherwise. See Also PrismaticJoint

love.run

love.run The main function, containing the main loop. A sensible default is used when left out. Function Synopsis love.run( ) Arguments None. Returns Nothing. Examples The default function for 0.10.0, 0.10.1, and 0.10.2, used if you don't supply your own. function love.run()   if love.math then love.math.setRandomSeed(os.time()) end   if love.load then love.load(arg) end   -- We don't want the first frame's dt to include time taken by love.load. if love.timer then love.timer.step() en

FileData:getExtension

FileData:getExtension Available since LÖVE 0.7.0 This function is not supported in earlier versions. Gets the extension of the FileData. Function Synopsis ext = FileData:getExtension( ) Arguments None. Returns string ext The extension of the file the FileData represents. See Also FileData

Object:type

Object:type Gets the type of the object as a string. Function Synopsis type = Object:type() Arguments None. Returns string type The type as a string. Examples Printing the type of an object image = love.graphics.newImage("test.png") print(image:type()) -- outputs: Image source = love.audio.newSource("test.ogg") print(source:type()) -- outputs: Source See Also Object

Source:setAttenuationDistances

Source:setAttenuationDistances Available since LÖVE 0.9.0 It has been renamed from Source:setDistance. Sets the reference and maximum attenuation distances of the Source. The parameters, combined with the current DistanceModel, affect how the Source's volume attenuates based on distance. Distance attenuation is only applicable to Sources based on mono (rather than stereo) audio. Function Synopsis Source:setAttenuationDistances( ref, max ) Arguments number ref The new reference attenuation

SoundData:getBitDepth

SoundData:getBitDepth Available since LÖVE 0.9.0 It has been renamed from SoundData:getBits. Returns the number of bits per sample. Function Synopsis bitdepth = SoundData:getBitDepth( ) Arguments None. Returns number bitdepth Either 8, or 16. See Also SoundData