LOVE 0.2.1
Posted: Sun Mar 30, 2008 2:00 am
Yay release!
So we've finally released 0.2.1 ... the reason this took so long is that we simply had to spilt up the code into multple SWIG-modules (this wasn't really planned).
Overview:
The different modules (love.graphics etc) are now actual SWIG-modules. This means that when accessing the functions in a module, a dot should be used in place for the comma:
Another major change is that the love.objects "device" has been removed. Objects are now created by their "logical" devices:
Where objects are created should be obvious, but if it isn't:
Note that love.filesystem.include has been changed:
Enough for now.
Development on 0.2.2 has begun. Main focus for next release will be error handling, <pun>in-LÖVE</pun> console and development experience. Much of this is done already, so it will probably be out soon.
So we've finally released 0.2.1 ... the reason this took so long is that we simply had to spilt up the code into multple SWIG-modules (this wasn't really planned).
Overview:
- It's now possible to save files to a "safe" dedicated directory on the user system via love.filesystem.
- Improvements to ImageFont. (Mike: please elaborate)
- Better interface for primitive rendering.
- Added image optimization and padding functions. This makes sprites prettier when scaled, rotated or drawn in floating point positions.
- Added love.timer.sleep.
- Added love.graphics.getWidth/Height.
- Added functions for drawing sections of images.
- Escape does not close window. (Try Alt+F4).
- Added functions for setting the mouse position.
- Changed getFps to getFPS.
- love.filesystem.include has been renamed to love.filesystem.require. (Include now does something else. Keep reading).
- + forgotten changes. 8-)
The different modules (love.graphics etc) are now actual SWIG-modules. This means that when accessing the functions in a module, a dot should be used in place for the comma:
Code: Select all
-- Old:
love.graphics:draw(image, 50, 50)
-- New:
love.graphics.draw(image, 50, 50)
Code: Select all
-- Old:
img = love.objects:newImage("yay.png")
-- New:
img = love.graphics.newImage("yay.png")
- love.graphics.newImage
- love.graphics.newAnimation
- love.graphics.newFont
- love.graphics.newImageFont
- love.graphics.newColor
- love.audio.newSound
- love.audio.newMusic
- love.filesystem.newFile
Code: Select all
function save_highscore()
local file = love.filesystem.newFile("highscore.lua", love.file_write)
love.filesystem.open(file)
love.filesystem.write(file, "highscore = { jane = 500, bob = 1000 }")
love.filesystem.close()
end
function load_highscore()
if( love.filesystem.exists("highscore.lua") then
love.filesystem.include("highscore.lua")
end
end
Code: Select all
-- This always includes. (Useful if you actually want to replace certain tables in Lua).
love.filesystem.include("file.lua")
-- This includes only if the file hasn't been included already.
-- (Should perhaps be named "include_once", but everyone hated the name)
love.filesystem.require("file.lua")
Development on 0.2.2 has begun. Main focus for next release will be error handling, <pun>in-LÖVE</pun> console and development experience. Much of this is done already, so it will probably be out soon.