Some guy on IRC wrote:don't give me credit
[WIP]BeatFever Mania ~ osu! Engine reimplementation
Re: [WIP]BeatFever Mania ~ osu! Engine reimplementation
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: [WIP]BeatFever Mania ~ osu! Engine reimplementation
Sulunia wrote:Does love even have a IRC? Where?
https://love2d.org/ wrote:Community: (...) There is also an IRC channel: #love@irc.oftc.net.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: [WIP]BeatFever Mania ~ osu! Engine reimplementation
I'm not going to let down:
The tech variable checks if the complex lovelib call is needed or not, it is meant to be true only if the file is to be extracted from drop.
Code: Select all
local ffi = require('ffi')
ffi.cdef('int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath);')
local liblove = ffi.os == 'Windows' and ffi.load('love') or ffi.C
function love.filedropped(file)
local path = file:getFilename()
extractZip(true, path)
end
local lfs = love.filesystem
local function enu(folder, saveDir)
local filesTable = lfs.getDirectoryItems(folder)
if saveDir ~= "" and not lfs.isDirectory(saveDir) then lfs.createDirectory(saveDir) end
for i,v in ipairs(filesTable) do
local file = folder.."/"..v
local saveFile = saveDir.."/"..v
if saveDir == "" then saveFile = v end
if lfs.isDirectory(file) then
lfs.createDirectory(saveFile)
enu(file, saveFile)
else
lfs.write(saveFile, tostring(lfs.read(file)))
end
end
end
function extractZIP(tech, file, dir, delete)
local dir = dir or ""
local temp = tostring(love.math.random(1000, 2000))
if tech then
success = liblove.PHYSFS_mount(path, temp, false)
else
success = lfs.mount(file, temp)
end
if success then enu(temp, dir) end
lfs.unmount(file)
if delete then lfs.remove(file) end
end
Last edited by Davidobot on Thu Mar 31, 2016 8:30 pm, edited 1 time in total.
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: [WIP]BeatFever Mania ~ osu! Engine reimplementation
Now that's handy. Allright, the next "release" here will have drag and drop to install and a revamped selection screen UI.Davidobot wrote:I'm not going to let down:The tech variable checks if the complex lovelib call is needed or not, it is meant to be true only if the file is to be extracted from drop.Code: Select all
local ffi = require('ffi') ffi.cdef('int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath);') local liblove = ffi.os == 'Windows' and ffi.load('love') or ffi.C function love.filedropped(file) local path = file:getFilename() extractZip(true, path) end local lfs = love.filesystem local function enu(folder, saveDir) local filesTable = lfs.getDirectoryItems(folder) if saveDir ~= "" and not lfs.isDirectory(saveDir) then lfs.createDirectory(saveDir) end for i,v in ipairs(filesTable) do local file = folder.."/"..v local saveFile = saveDir.."/"..v if saveDir == "" then saveFile = v end if lfs.isDirectory(file) then lfs.createDirectory(saveFile) enu(file, saveFile) else lfs.write(saveFile, tostring(lfs.read(file))) end end end function extractZIP(tech, file, dir, delete) local dir = dir or "" local temp = tostring(math.random(1000, 2000)) if tech then success = liblove.PHYSFS_mount(path, temp, false) else success = lfs.mount(file, temp) end if success then enu(temp, dir) end lfs.unmount(file) if delete then lfs.remove(file) end end
Thanks to everybody so far! I'll be back with news soon enough.
https://github.com/Sulunia
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: [WIP]BeatFever Mania ~ osu! Engine reimplementation
Not gonna run around, and will just say, use love.math.random instead, for various reasons, including the here important fact that it's actually seeded in love.run, unlike lua's math.random.Davidobot wrote:I'm not going to let down:Code: Select all
local temp = tostring(math.random(1000, 2000))
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: [WIP]BeatFever Mania ~ osu! Engine reimplementation
To be fair, that's just a stupid way to ensure that there are no folder overlaps? If that makes sense. Anyways, I switched it out. This code was written before love.math.random was introduced, so it was justifiable.zorg wrote:Not gonna run around, and will just say, use love.math.random instead, for various reasons, including the here important fact that it's actually seeded in love.run, unlike lua's math.random.Davidobot wrote:I'm not going to let down:Code: Select all
local temp = tostring(math.random(1000, 2000))
EDIT: No it was not, filesystem.mount and love.math.random were introduced at the same time. No excuse
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: [WIP]BeatFever Mania ~ osu! Engine reimplementation
A wip to you guys:
Once the UI is in place, i'll cleanup the code and implement drag and drop install.
Shouldn't the code be cleaned up first? I guess, but since it'll get messy again, lemme finish EVERYTHING so i refactor just once xD
Once the UI is in place, i'll cleanup the code and implement drag and drop install.
Shouldn't the code be cleaned up first? I guess, but since it'll get messy again, lemme finish EVERYTHING so i refactor just once xD
https://github.com/Sulunia
Re: [WIP]BeatFever Mania ~ osu! Engine reimplementation
Just want to let you know that https://github.com/danielpontello/beatfever is no longer a thing..
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
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: [WIP]BeatFever Mania ~ osu! Engine reimplementation
C&D?
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: [WIP]BeatFever Mania ~ osu! Engine reimplementation
Oops.Davidobot wrote:Just want to let you know that https://github.com/danielpontello/beatfever is no longer a thing..
We forgot to unprivate the repo. I'll let him know.
@edit
Seens like github seriously has an issue with opening private repositories to the public. I guess i'll have to recreate it on my own profile
Last edited by Sulunia on Tue Apr 05, 2016 1:09 pm, edited 1 time in total.
https://github.com/Sulunia
Who is online
Users browsing this forum: No registered users and 2 guests