Desired tutorial - multiplayer
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Desired tutorial - multiplayer
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!
Re: Desired tutorial - multiplayer
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.
^_^
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.
Last edited by Elvashi on Tue Jun 28, 2011 12:15 am, edited 1 time in total.
"We could make a program for doing this for you, but that is for the LÖVE IDE, planned to be released in March 2142." ~mike
Networking with UDP uLove Proposal CCG: Gangrene
Networking with UDP uLove Proposal CCG: Gangrene
Re: Desired tutorial - multiplayer
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...
@rynesaur
Re: Desired tutorial - multiplayer
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.
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: Desired tutorial - multiplayer
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.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Desired tutorial - multiplayer
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
TCP is a reliable connection.
UDP is a faster connection, but of course, unreliable.
TCP is constantly checking and making sure it gets all of the messages in order.
UDP just kind of dumps them all out and hopes the other end gets them...
Note: Depends on implementation of course.
http://www.gutgames.com/post/TCPIP-vs-UDP.aspx
Re: Desired tutorial - multiplayer
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 most probably you want to use UDP.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Desired tutorial - multiplayer
UDP is nearly always the preferable option for time-sensitive information like position, velocity etc. in a real-time game.
Re: Desired tutorial - multiplayer
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.
I wrote 2 helper libraries which try to hide everything unimportant away from you, so you can concentrate on the game logic. So:
- - unzip the file
- point your browser to doc/index.html
- open stage1/*.lua and then stage2/*.lua in your editor
- have fun
- Attachments
-
- MultiCircles.zip
- Multiplayer example with UDP networking
- (311.93 KiB) Downloaded 443 times
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Desired tutorial - multiplayer
I used the tutorial on the wiki to create a networked connect-4 game. Thanks elvashi. It took me about 2 hours to write.
Who is online
Users browsing this forum: No registered users and 3 guests