Desired tutorial - multiplayer

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Taehl
Dreaming in associative arrays
Posts: 1024
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Desired tutorial - multiplayer

Post by Taehl »

I just realized that we don't have a decent networking tutorial yet, which is a shame.

It would be really nice if someone wrote one which covered the following:
1) Start by making a simple "game" where each player is a randomly-colored circle on a screen with some walls or something
2) Using LuaSocket (or maybe Lube), make a server and client (maybe as separate .love files)
3) The client would connect to the server and then tell the server when a player pressed movement keys. Note: I definitely think we should impress the values of non-authoritative clients even on this simplest of networking tutorials.
4) The server would take the client's movement requests, simulate them (i.e., make sure they don't go through walls), and then upload the new positions of each player's circle
5) When a client disconnects, the server removes their circle. Likewise, if the server quits, gracefully disconnect the clients.

It wouldn't need to cover lag-compensating systems or the like, it would just be a simple thing meant to familiarize people with networking and the (non-authoritative) client / server model.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
Jasoco
Inner party member
Posts: 3655
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Desired tutorial - multiplayer

Post by Jasoco »

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.
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: Desired tutorial - multiplayer

Post by tentus »

I also would find this very useful: I took a close look at Volleybrawl once and couldn't make heads or tails of it. A tutorial for how to make networked pong or something would be fantastic.
Kurosuke needs beta testers
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: Desired tutorial - multiplayer

Post by TechnoCat »

User avatar
Jasoco
Inner party member
Posts: 3655
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Desired tutorial - multiplayer

Post by Jasoco »

Do any of those tell you right out how to do it with Löve?
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: Desired tutorial - multiplayer

Post by TechnoCat »

Jasoco wrote:Do any of those tell you right out how to do it with Löve?
No, but LOVE also doesn't abstract anything network related.
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: Desired tutorial - multiplayer

Post by tentus »

But Lube does, as mentioned in step 2. (Unless I'm woefully confused.)
Kurosuke needs beta testers
User avatar
Wrinkliez
Prole
Posts: 33
Joined: Tue Mar 15, 2011 4:56 am

Re: Desired tutorial - multiplayer

Post by Wrinkliez »

TechnoCat wrote:
Jasoco wrote:Do any of those tell you right out how to do it with Löve?
No, but LOVE also doesn't abstract anything network related.
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...
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Desired tutorial - multiplayer

Post by Robin »

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...
Didn't someone write a LUBE tutorial? I can't remember who, where or when, though.
Help us help you: attach a .love.
User avatar
visionpol
Prole
Posts: 1
Joined: Wed Jun 22, 2011 11:04 pm

Re: Desired tutorial - multiplayer

Post by visionpol »

Technocat has a post on page 22 of the LUBE thread with attached .love files to start a server and a client. There are links to bartbes's LUBE-demo in the post that lead to NetPong server/client files. I can't honestly say that I've taken the time to look through all of the NetPong code, but I wager that it's the kind of thing you're looking for.
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests