Thanks so much for this release! Can't wait to try it out. : D
If you won't tell anyone, Internet, I'll admit that I jumped up more than once while reading this summary and did a stupid little dance.
LÖVE 0.9.0 released
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: LÖVE 0.9.0 released
Besides the Clipboard stuff, is there anything we can actually do with love.system? I mean, getting the OS could be useful, but what about the power supply or processor count ones? What can we do with this information?
Also, can we get some examples of some of the new stuff, like mesh's?
Also, can we get some examples of some of the new stuff, like mesh's?
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: LÖVE 0.9.0 released
Power supply info is mostly only useful for laptops right now, for example if you have a fullscreen game you might want to display a warning if the computer is on battery and about to run out of power.Jasoco wrote:what about the power supply or processor count ones? What can we do with this information?
The processor count function might be useful when using threads, to optimize the amount you have running in some situations.
Yeah, I'll make some examples sometime after I wake up tomorrow.Jasoco wrote:Also, can we get some examples of some of the new stuff, like mesh's?
Re: LÖVE 0.9.0 released
Congratulations to everyone who has contributed! I'm very thankful for all the hard work that the Löve devs do to make Löve as awesome as it is. Can't wait to try out and learn some of the new features.
Email: ic4ruz39@gmail.com
Re: LÖVE 0.9.0 released
Awesome news! I'm going to work on adding 0.9.0 support to StackMachine ASAP.
Re: LÖVE 0.9.0 released
Wow, I just casually missed this post...
Great job guys! Keep up the good work!
Great job guys! Keep up the good work!
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: LÖVE 0.9.0 released
It's about time, slime!
Great work to everyone involved. I'm glad I can finally stop getting made fun of for having outdated code!
Great work to everyone involved. I'm glad I can finally stop getting made fun of for having outdated code!
Re: LÖVE 0.9.0 released
URAH!
Congrats on the release! ~@u@~ <3
Congrats on the release! ~@u@~ <3
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: LÖVE 0.9.0 released
Finally!
Re: LÖVE 0.9.0 released
Jasoco wrote:Besides the Clipboard stuff, is there anything we can actually do with love.system? I mean, getting the OS could be useful, but what about the power supply or processor count ones? What can we do with this information?
Also, can we get some examples of some of the new stuff, like mesh's?
You CAN get the OS filesystem. Here is one possible way of doing so:
(Only tested on OS X... but might run on Windows as well)
Code: Select all
-- Hack by jack0088
-- Get access to filesystem outside the love2d sandbox.
-- Known issues:
-- Not supported: Alias, dead Symlink
Filesystem = {}
function Filesystem.getDirectoryItems(dir, wanted_type, wanted_file, ram)
dir = tostring(dir) or os.getenv("HOME") --define entrypoint
dir = dir:gsub("\\?%s", "\\ "):gsub([[["']*]], "") --handle (already escaped) whitespaces!
if #dir > 1 and dir:sub(#dir) ~= "/" then dir = dir .. "/" end --end always with slash
local files = ram or {}
for file in io.popen("ls -F " .. dir):lines() do
if file ~= dir then
local file_indicator = file:sub(#file)
local file_type = Filesystem.type(file)
local file_name = file:sub(1, #file-1)
-- symlink
if file_indicator == "@" then
if (not wanted_file) or (wanted_file and wanted_file == file_name) then
for link in io.popen("readlink " .. dir .. file_name):lines() do
local link_parent_dir = link:match(".*/")
local pre = link_parent_dir:sub(1, 3)
if pre:find("%.%..") then
link_parent_dir = dir:sub(1, #dir-1):match(".*/") .. link_parent_dir:sub(4)
elseif not pre:find("/") then
link_parent_dir = dir .. link_parent_dir
end
Filesystem.getDirectoryItems(link_parent_dir, wanted_type, file_name, files)
end
end
else
if -- folder
((file_type == "folder") and (not wanted_type or wanted_type == "folder"))
or -- file
((file_type == "file") and (not wanted_type or wanted_type == "file"))
then
-- .exe and .app file
if (file_indicator == "*") or (file_type == "folder" and file:find(".app")) then file = file_name end
if not wanted_file or (wanted_file and file:find(wanted_file)) then
table.insert(files, dir .. file)
end
end
end
end
end
return files
end
function Filesystem.updated(sec)
if not Filesystem._tmr then
Filesystem._tmr = love.timer.getTime()
return true
end
local time = love.timer.getTime()
if time >= Filesystem._tmr + (sec or 1) then
Filesystem._tmr = nil
return true
end
return false
end
function Filesystem.type(file)
return file:sub(#file) == "/" and "folder" or "file"
end
(all parameters are optionally, therefor I wrote them inside [] )
Code: Select all
require "Filesystem"
function love.draw()
if Filesystem.updated(3) then --gets called every x seconds, in this case, each three sec.
files = Filesystem.getDirectoryItems("/", "folder") --lists (/update) all folders inside system's root
--do with files what ever you need... loop through them and display or whatever...
end
end
Code: Select all
function love.load()
files = Filesystem.getDirectoryItems() --lists all files of type "file" and "folder", inside the "/" root directory
end
Blog herrsch.de
Who is online
Users browsing this forum: Ahrefs [Bot] and 8 guests