Re: Desired tutorial - multiplayer
Posted: Thu Jun 23, 2011 10:38 pm
I could never get that to work at all. And the current download seems to be for 0.5.0.... That was like forever ago! We need one for 0.7!
Well libraries are another thing. It took me a little while before I realized what libraries were and how to use them (I knew nothing of programming when I started love), so a tutorial explaining what they are, and even how to use them would be awesome too.Robin wrote:Didn't someone write a LUBE tutorial? I can't remember who, where or when, though.Wrinkliez wrote:Imho, I think a tutorial would be awesome. A nub is much more likely to check the wiki or a Love2D tutorial, especially if Love is their first language...
cool dood! I have a question, what are the pros / cons to using udp compared to lube? All I can see is that lube is apparently much easier lolElvashi wrote:Networking with UDP
^_^
Okay, its not that good. But its there, I made it, it exists...and will hopefully be a useful foundation for an article that will help many young lovers in the future (hopefully...maybe... )
I'll see what I can do about making one on TCP, though someone will probably beat me to it.
Lube is simply a library that makes it easier to work with sockets. UDP and TCP are protocols that can both be used via Luasocket (which is what Lube lies on top of).Wrinkliez wrote:cool dood! I have a question, what are the pros / cons to using udp compared to lube? All I can see is that lube is apparently much easier lolElvashi wrote:Networking with UDP
^_^
Okay, its not that good. But its there, I made it, it exists...and will hopefully be a useful foundation for an article that will help many young lovers in the future (hopefully...maybe... )
I'll see what I can do about making one on TCP, though someone will probably beat me to it.
The question hidden in your question is "UDP or TCP?"Wrinkliez wrote:cool dood! I have a question, what are the pros / cons to using udp compared to lube? All I can see is that lube is apparently much easier lol
That is the theory. I have yet to see any dropped UDP packet in my tests. In today's internet you can assume UDP is near 100% reliable (check for yourself). And it can get through NAT/firewalls easier than TCP.TechnoCat wrote: TCP is a reliable connection.
UDP is a faster connection, but of course, unreliable.
So no one responded yet? What a pity... So, I am attaching my sample code. This is not a real tutorial, but if someone is willing to write one, go ahead.Jasoco wrote:Yes please. I can't make heads nor tails of any of the already existing multiplayer games because there's way too much code I wouldn't need that hides the stuff I do.
Just give me a simple framework that demonstrates how to do simple sending and receiving.