A few suggestions for Löve 0.10.0

General discussion about LÖVE, Lua, game development, puns, and unicorns.
jjmafiae
Party member
Posts: 1333
Joined: Tue Jul 24, 2012 8:22 am

A few suggestions for Löve 0.10.0

Post by jjmafiae » Thu Jun 11, 2015 7:36 pm

So far it sounds like Löve 0.10.0 is gonna be great (https://love2d.org/wiki/0.10.0) and thankful that Slime (and everyone else who contributed in some way) are putting alot of effort into it however there a few things I'd like added in if possible:

1. Microphone support (this would be great for multiplayer games, I'm working on a multiplayer game myself atm)
2. Audio compression codec (this ties into the one above)
3. Zip file extraction (Would be great for launchers, it is already possible to do however takes a bit time)

User avatar
Nixola
Inner party member
Posts: 1940
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: A few suggestions for Löve 0.10.0

Post by Nixola » Thu Jun 11, 2015 7:56 pm

About 3), you can already [wiki]love.filesystem.mount[/wiki] zip files.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics

jjmafiae
Party member
Posts: 1333
Joined: Tue Jul 24, 2012 8:22 am

Re: A few suggestions for Löve 0.10.0

Post by jjmafiae » Thu Jun 11, 2015 7:58 pm

Nixola wrote:About 3), you can already [wiki]love.filesystem.mount[/wiki] zip files.
yes but I need extraction, mounting only allows reading and that isn't what I need. Since the OS can't launch .exe files with .dlls properly in Zip files (trust me I have tried)

User avatar
slime
Solid Snayke
Posts: 2832
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: A few suggestions for Löve 0.10.0

Post by slime » Thu Jun 11, 2015 10:42 pm

You can copy files into the save directory if you need to make sure something is in the 'real' filesystem. Or for fused games you can use the technique described in the [wiki]love.filesystem.getSourceBaseDirectory[/wiki] page.

User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: A few suggestions for Löve 0.10.0

Post by Kingdaro » Fri Jun 12, 2015 1:07 am

slime wrote:You can copy files into the save directory if you need to make sure something is in the 'real' filesystem. Or for fused games you can use the technique described in the [wiki]love.filesystem.getSourceBaseDirectory[/wiki] page.
About this... is there a reason why mounting the source base directory only works with fused games? (Apparently when running love games/folders with --fused as well, which makes sense to some extent...) In a game I'm working on, I'd have gladly used the appdata directory for storing songs (custom charts of songs, think like Stepmania), but with this, distribution becomes somewhat cumbersome, as the player would have to download a separate zip of the songs that actually come with the game. I can pack them with the actual game, but I can't write files inside of a .love or .exe file, so making edits of a song from there becomes difficult, because I have to move it from the AppData directory every time I want to distribute the game.

I fixed the issue myself by just making the songs folder come with the game itself in the source base directory, then mounting and reading from that. The only problem here is that, to mount the source directory, I have to make sure both the source and the .love file are all started with the --fused derivative. Why not just always have the ability to mount the source base?

User avatar
Positive07
Party member
Posts: 1005
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: A few suggestions for Löve 0.10.0

Post by Positive07 » Fri Jun 12, 2015 8:01 am

jjmafiae wrote:
Nixola wrote:About 3), you can already [wiki]love.filesystem.mount[/wiki] zip files.
yes but I need extraction, mounting only allows reading and that isn't what I need. Since the OS can't launch .exe files with .dlls properly in Zip files (trust me I have tried)
Here you have an amazing snippet :D

Code: Select all

local lf, recursive = love.filesystem

recursive = function (from, to)
    if not lf.isDirectory(to) then lf.createDirectory(to) end
    for _,v in ipairs(lf.getDirectoryItems(from)) do
        local name = from.."/"..v
        local result = to.."/"..v
        if lf.isFile(name) then
            lf.write( lf.read(name), result)
        elseif lf.isDirectory(name) then
            recursive(name, result)
        end
    end
end

local unzip = function (zip, dir)
    local ok, err = lf.mount(zip, "zip")
    if not ok then return nil, err end
    recursive("zip", dir)
    lf.unmount(zip)
end
Writing .zip would be nice (I already made an issue... but I say it again :P)

And I also consider that --fused could be the default behaviour... Is there something to lose?
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(Github.com/Positive07)

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: A few suggestions for Löve 0.10.0

Post by Robin » Fri Jun 12, 2015 10:26 pm

Positive07 wrote:And I also consider that --fused could be the default behaviour... Is there something to lose?
Two things right off the bat:
  1. Easier to make mistakes in distribution if you forget to include stuff in the .love but it still works on your computer
  2. Weird shit going on if you're like me and you have a lot of .loves in your download folder
Help us help you: attach a .love.

User avatar
s-ol
Party member
Posts: 1076
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: A few suggestions for Löve 0.10.0

Post by s-ol » Fri Jun 12, 2015 11:10 pm

jjmafiae wrote: 1. Microphone support (this would be great for multiplayer games, I'm working on a multiplayer game myself atm)
2. Audio compression codec (this ties into the one above)
both of these can be archieved with the ffi afaik. I'm not sure whether microphone input can be abstracted/simplified to a level that matches the rest of the LÖVE Api whilst keeping it variable enough to actually be useful.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end

User avatar
I~=Spam
Party member
Posts: 206
Joined: Fri Dec 14, 2012 11:59 pm

Re: A few suggestions for Löve 0.10.0

Post by I~=Spam » Sat Jun 13, 2015 12:27 am

S0lll0s wrote:both of these can be archieved with the ffi afaik. I'm not sure whether microphone input can be abstracted/simplified to a level that matches the rest of the LÖVE Api whilst keeping it variable enough to actually be useful.
As a small counter-argument the entire (or at least most of it) LOVE API could be written with the ffi but that doesn't mean we shouldn't.
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610

bobbyjones
Party member
Posts: 717
Joined: Sat Apr 26, 2014 7:46 pm

Re: A few suggestions for Löve 0.10.0

Post by bobbyjones » Sat Jun 13, 2015 3:24 pm

Shots fired
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests