Page 1 of 3

So.. about networking...

Posted: Sun Jul 25, 2010 2:54 am
by Jasoco
So, how would I, either through Lua Sockets, or LUBE (Which isn't available anywhere I can find right now), make a game that can play a networked game with another running copy of my game on another computer, either on the same network, or even on the internet? If possible?

TNTBasic had this functionality, and I know Lua has Sockets and Löve has Sockets built-in, but on the Lua Sockets site I can't make heads nor tails of it, it all looks like connecting to web sites, nothing about just sending a variable across the network to another computer. Which is really the gist of it.

Can we do that? Are we able? Do we have the power?

I already had Updater, which I could probably use to make a "Custom map downloader" feature, but I'd really like to play with networking. Especially since I have three computers to play with.

Re: So.. about networking...

Posted: Sun Jul 25, 2010 8:21 am
by Robin
Jasoco wrote:Can we do that? Are we able? Do we have the power?
Yes. That's the power of LÖVE.

I'm not sure whether there are current implementations, but I think Epic Volley (by bartbes and Nevon) has a networked multiplayer mode?

Re: So.. about networking...

Posted: Sun Jul 25, 2010 8:36 am
by nevon
Yeah, we have networked multiplayer both over LAN and over tha internetz. The code is MIT if IIRC, so feel free to check it out. http://github.com/bartbes/Epic-Volley

Re: So.. about networking...

Posted: Sun Jul 25, 2010 9:23 am
by bartbes
Here it is: http://love2d.org/forums/viewtopic.php?f=5&t=230. If you have any questions about networking, just ask.

Re: So.. about networking...

Posted: Sat Jul 31, 2010 6:09 am
by Jasoco
So I'm trying to see how this works so I launched the Volleyball game on both my MacBooks to try and set up a networked game, but I can't get it to work at all.

This all seems confusing. More confusing than it should be in 2010.

Not sure how to use it. LUBE that is, and networking in general.

Re: So.. about networking...

Posted: Sat Jul 31, 2010 8:39 am
by bartbes
How did you (fail to) set up the networked game?
Did you use LAN or Internet, do you have a firewall, etc?

Re: So.. about networking...

Posted: Sat Jul 31, 2010 10:46 pm
by Jasoco
There is no Firewall. It is off. I don't use OS X's Firewall. This is local, so I used LAN. But the game refused to discover the other computer. I tried many combinations.

Can you tell me how, step-by-step, it should work? Obviously I launch the game on both computers. I assume go into Multiplayer and click LAN. After that, what is supposed to happen? Scanning didn't work. Typing an IP didn't work. And nothing in the box on the left was clickable. So I am at a loss here.

Re: So.. about networking...

Posted: Sat Jul 31, 2010 11:18 pm
by bartbes
Well, you should click host on one of them, go through the game setup, and then it tells you it's waiting for a connection, at that point the server does show up in the list.

Re: So.. about networking...

Posted: Sat Jul 31, 2010 11:27 pm
by Jasoco
Nope. Not working. The slime wanders back and forth forever while the other computer sits at the LAN settings screen. Nothing ever happens.

Re: So.. about networking...

Posted: Sat Jul 31, 2010 11:47 pm
by TechnoCat
Jasoco wrote:Nope. Not working. The slime wanders back and forth forever while the other computer sits at the LAN settings screen. Nothing ever happens.
I opened up two instances on the same computer and it networked and played.