Quick question regarding versions of Lua and LuaSocket and it being bundled with Love. Running `lua server.lua` of course returns an error because I haven't installed LuaSocket yet. Since LuaSocket is bundled with Love, am I able to just link to that? And which version is it? I'm currently browsing about my filesystem but can't find the Linux-path to bundled components.
I've got both Lua5.1 and 5.2. LuaSocket 2.0.2 says it is compatible with Lua 5.1 (Src Mirror), and whatever bundled version is compatible with 5.2. Also, has anyone used LuaSocket 3.0? I'm going to try with that first.
Looking forward to playing the KarmaExchange example, I read through it and just need to get the server going .
UDP Networking [Solved]
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: UDP Networking
It's completely built into the engine, starting from 0.9.0 you could probably get it by loading liblove.
Re: UDP Networking
Ok, so how would you run server.lua that doesn't use the LOVE framework?bartbes wrote:It's completely built into the engine, starting from 0.9.0 you could probably get it by loading liblove.
Check out my latest game: http://love2d.org/forums/viewtopic.php?f=5&t=33349
Re: UDP Networking
I'm not hosting an online server. I just need to know how I would run the server.lua if it doesn't use the LOVE framework.bekey wrote:Is this a viable solution? http://www.exitgames.com/
Check out my latest game: http://love2d.org/forums/viewtopic.php?f=5&t=33349
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: UDP Networking
So long as you have luasocket2 installed, you can write a server in pure Lua.
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Re: UDP Networking
Ok. But what if I want the user to create the server with a click of a button. How would you run the file from LOVE? Just require it?josefnpat wrote:
So long as you have luasocket2 installed, you can write a server in pure Lua.
Check out my latest game: http://love2d.org/forums/viewtopic.php?f=5&t=33349
Re: UDP Networking
For a push of a button, I think you only have to put a `require("server") in your main.lua, comment out `serverSetup()` at the bottom of server.lua, and make a button call to `serverSetup()`.spynaz wrote:Ok. But what if I want the user to create the server with a click of a button. How would you run the file from LOVE? Just require it?josefnpat wrote:
So long as you have luasocket2 installed, you can write a server in pure Lua.
And related to my question, at the moment, I've got LuaSocket3.0 running with Lua5.1, and'll post my solution when I get it working with 5.2.
How is liblove called, or where is it located? Is it just a folder when I upgrade from 0.8.0 to 0.9.0?bartbes wrote:It's completely built into the engine, starting from 0.9.0 you could probably get it by loading liblove.
Also, thanks Germanunkol for the Karma example, it was really helpful.
Re: UDP Networking
Ok, I see now. Thanks for you help.antivapor wrote:For a push of a button, I think you only have to put a `require("server") in your main.lua, comment out `serverSetup()` at the bottom of server.lua, and make a button call to `serverSetup()`.spynaz wrote:Ok. But what if I want the user to create the server with a click of a button. How would you run the file from LOVE? Just require it?josefnpat wrote:
So long as you have luasocket2 installed, you can write a server in pure Lua.
And related to my question, at the moment, I've got LuaSocket3.0 running with Lua5.1, and'll post my solution when I get it working with 5.2.
How is liblove called, or where is it located? Is it just a folder when I upgrade from 0.8.0 to 0.9.0?bartbes wrote:It's completely built into the engine, starting from 0.9.0 you could probably get it by loading liblove.
Also, thanks Germanunkol for the Karma example, it was really helpful.
Check out my latest game: http://love2d.org/forums/viewtopic.php?f=5&t=33349
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: UDP Networking
Linux: $libdir/liblove.so, defaulting to $prefix/lib/liblove.so defaulting to /usr/lib/liblove.so for packages and /usr/local/lib/liblove.so for source builds.antivapor wrote: How is liblove called, or where is it located?
Windows: love.dll (or liblove.dll, I always forget)
OSX: .. wherever you put libraries..
I'd like to mention that, considering your use case, it might be interesting to, instead of running your server separately, running it inside of a thread. That way you do have access to love's luasocket, the server will quit when the game quits, and it's still isolated.
@spynaz: Could you please stop quoting entire posts? It's in violation of the etiquette.
Who is online
Users browsing this forum: Google [Bot] and 10 guests