Nano Space

Show off your games, demos and other (playable) creations.
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Nano Space

Finally got it working! I had to rename the file and remove both the save folders (lovum and Lovum) and, again, change the loaded lib to /usr/lib/libcurl.so (which will always be the same architecture as LÖVE iirc, or at least in most cases; you can use /usr/lib32 and /usr/lib64 if you want to be sure and curl is a very common library/utility, so I think it's safe to bet it's already installed. Although location may vary (/usr/local/lib?).) but I finally got it working. The game looks neat and polished enough, although I'd probably "force" the dialogs from the captain to have a minimum duration (something short, such as half a second or less) since I skipped one by mistake as I was shooting with spacebar. I'd also recommend some proofreading by a native English speaker.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
li = love.image
lg = love.graphics

Luke100000
Party member
Posts: 231
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: Nano Space

Nixola wrote:
Mon Jun 12, 2017 6:35 pm
Finally got it working! I had to rename the file and remove both the save folders (lovum and Lovum) and, again, change the loaded lib to /usr/lib/libcurl.so (which will always be the same architecture as LÖVE iirc, or at least in most cases; you can use /usr/lib32 and /usr/lib64 if you want to be sure and curl is a very common library/utility, so I think it's safe to bet it's already installed. Although location may vary (/usr/local/lib?).) but I finally got it working. The game looks neat and polished enough, although I'd probably "force" the dialogs from the captain to have a minimum duration (something short, such as half a second or less) since I skipped one by mistake as I was shooting with spacebar. I'd also recommend some proofreading by a native English speaker.
Thanks for detailed info, I will use pcall to test "usr/lib" AND "usr/local/lib" if the first one fails. (Am I correct that only "lib/" without the architecture (32bit 64bit) will work always, or must I check all folders?)
You can only skip the first page after 0.5 seconds by clicking 2 times. I will increase the skipping cool-down to 1 second. After this period of time the user could spam a key to skip all pages.
Also I keep my eyes open for an English proofreader
Do you know if Mac OS works the same as Windows? "C = ffi.load(path .. 'bin/osx64/curl')" and it works?
Again, thank you for your time!

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

Re: Nano Space

No idea about Mac OS sadly, it's an OS I've never used. /usr/lib or /usr/local/lib (leading slash!) should work regardless, provided that 1) curl is installed on the system (my bet is it will be, it should be pretty common, if not considered a base package) and 2) LÖVE is the same architecture as the system (no idea if it's possible not to have this).
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
li = love.image
lg = love.graphics

Luke100000
Party member
Posts: 231
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: Nano Space

soo, update published, game launching fixed and hopefully the lib loading too, as long as this code here works:

Code: Select all

_, C = pcall(function() return ffi.load("/usr/lib/libcurl.so") end)
if not C then
_, C = pcall(function() return ffi.load("/usr/local/lib/libcurl.so") end)
if not C then
error("libcurl must be installed!")
end
end

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

Re: Nano Space

The new version seems to work out of the box for me!
(little tip: _, C = pcall(ffi.load, "/usr/lib/libcurl.so"))
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
li = love.image
lg = love.graphics

Luke100000
Party member
Posts: 231
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: Nano Space

Nixola wrote:
Mon Jun 12, 2017 9:24 pm
The new version seems to work out of the box for me!
(little tip: _, C = pcall(ffi.load, "/usr/lib/libcurl.so"))
oh, didn't know that will do this next time. I'm glad we fixed it now.

raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Nano Space

Ugh. Just you look at that mess. I would not be surprised to know there is a whole host of systems where it still doesn't work. This is precisely why you are discouraged from using binary libraries. Besides, the packaged Lua already has all the necessary networking facilities do there was no need to use a binary library to begin with.

Luke100000
Party member
Posts: 231
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: Nano Space

raidho36 wrote:
Tue Jun 13, 2017 12:12 am
Ugh. Just you look at that mess. I would not be surprised to know there is a whole host of systems where it still doesn't work. This is precisely why you are discouraged from using binary libraries. Besides, the packaged Lua already has all the necessary networking facilities do there was no need to use a binary library to begin with.
So, how to download files over https?

I've blocked you for about two years and the first thing I heard from you was a complaint of our solution Nixola and I found. You didn't help.

raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Nano Space

I didn't paid attention to that detail, my bad. Still, SSL is only some encryption on top of HTTP, it can be accomplished in Lua. And you would probably have better luck using LuaSec instead. Also, you don't need secure connection to download some public files.

Luke100000
Party member
Posts: 231
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: Nano Space

raidho36 wrote:
Tue Jun 13, 2017 6:48 am
I didn't paid attention to that detail, my bad. Still, SSL is only some encryption on top of HTTP, it can be accomplished in Lua. And you would probably have better luck using LuaSec instead. Also, you don't need secure connection to download some public files.
Public files on a secure server allowing only https, that's the problem. I did a lot of research, found several differents ways to do what I want and I came to the conclusion that libcurl is the best one because it has all the features I need. Then, AFTER I implemented it, I had the troubles with Linux. It's too late for LuaSec now.

Who is online

Users browsing this forum: Google [Bot] and 24 guests