Is it possible to use love to create a program opens files?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply

Do you think it's possible to use Love2D to open a minecraft server?

Yes, I've heard about a project that do this kind of job.
1
20%
Yes, but I didn't try it.
3
60%
No, LOVE2D is for 2D Game Creation only, not for your own interest(Operating Minecraft Server)
0
No votes
No, It's not possible since Love2D can't do sth like open files in the computer except specified folders like the program files folder.
1
20%
 
Total votes: 5

m31317015
Prole
Posts: 2
Joined: Mon Nov 17, 2014 2:14 pm

Is it possible to use love to create a program opens files?

Post by m31317015 »

---Rubbish---
When I touch java, I met Minecraft.
When I touch Minecraft, I touch Forge.
When I touch Forge, I touch ComputerCraft.
When I touch CC, I touch Lua.
When I touch Lua, I touch Love2D.
When I touch Love2D, I wonder what I can do with Minecraft using Love2D? Then I got an idea - Minecraft Server Operation.
---Rubbish---

Well Don't care about those pieces of rubbish, throw them to the rubbish bin (Although they are true). The main point is is that possible to create a program which can open files with a specified program, like use java to open a minecraft server, with LOVE2D.
I love Minecraft and Lua(& Love2D of course), so can I combine these two together?
btw I'm a noob of Lua and LOVE2D, I just play around LOVE2D in my own interest.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Is it possible to use love to create a program opens fil

Post by Nixola »

While it is possible, you'd want to practice both your Lua and your networking skills before ever trying to create a game server.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Is it possible to use love to create a program opens fil

Post by s-ol »

m31317015 wrote:---Rubbish---
When I touch java, I met Minecraft.
When I touch Minecraft, I touch Forge.
When I touch Forge, I touch ComputerCraft.
When I touch CC, I touch Lua.
When I touch Lua, I touch Love2D.
When I touch Love2D, I wonder what I can do with Minecraft using Love2D? Then I got an idea - Minecraft Server Operation.
---Rubbish---

Well Don't care about those pieces of rubbish, throw them to the rubbish bin (Although they are true). The main point is is that possible to create a program which can open files with a specified program, like use java to open a minecraft server, with LOVE2D.
I love Minecraft and Lua(& Love2D of course), so can I combine these two together?
btw I'm a noob of Lua and LOVE2D, I just play around LOVE2D in my own interest.
Your line of argument would mean running Love2D in minecraft. Not the other way around.

Also I don't see why the heck you would want to do either - love2d is a graphics toolkit - plain lua can do the rest anyway.

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
m31317015
Prole
Posts: 2
Joined: Mon Nov 17, 2014 2:14 pm

Re: Is it possible to use love to create a program opens fil

Post by m31317015 »

S0lll0s wrote:Your line of argument would mean running Love2D in minecraft. Not the other way around.

Also I don't see why the heck you would want to do either - love2d is a graphics toolkit - plain lua can do the rest anyway.
I didn't mean that, I just want to know is that possible to do something like open files in the real computer (Windows) using LOVE2D. I'm too lazy to do some more advanced thingy.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Is it possible to use love to create a program opens fil

Post by s-ol »

m31317015 wrote:
S0lll0s wrote:Your line of argument would mean running Love2D in minecraft. Not the other way around.

Also I don't see why the heck you would want to do either - love2d is a graphics toolkit - plain lua can do the rest anyway.
I didn't mean that, I just want to know is that possible to do something like open files in the real computer (Windows) using LOVE2D. I'm too lazy to do some more advanced thingy.
Of course. Love is lua and lua can do things. But why do you ask if you don't want to do anything?

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
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Is it possible to use love to create a program opens fil

Post by zorg »

Then your question's answer is a simple "yes, but with lua's own io functions; but you shouldn't, since they are either not friendly to the end-users, or not wholly cross-platform, or has some other problem; probably all three."
Me and my stuff :3True 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.
natev
Prole
Posts: 14
Joined: Thu Nov 20, 2014 3:55 pm

Re: Is it possible to use love to create a program opens fil

Post by natev »

There's justifiable reasons to want to do this! For instance, loading a wiki page in the user's browser, whatever that may be. I would personally love to launch a default text editor for the users to edit important lua files (really, the easiest way to execute one-time scripts, things like console commands).

Here's a post from stackoverflow that may help. Sounds like there are problems with the implementation, so maybe not.
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Is it possible to use love to create a program opens fil

Post by slime »

natev wrote:loading a wiki page in the user's browser, whatever that may be.
You can use [wiki]love.system.openURL[/wiki] for that.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests