Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LAN multiplayer #293

Closed
cxong opened this issue Aug 20, 2014 · 2 comments
Closed

LAN multiplayer #293

cxong opened this issue Aug 20, 2014 · 2 comments
Assignees

Comments

@cxong
Copy link
Owner

cxong commented Aug 20, 2014

As part of #36 and after implementing #37 , we can build simple LAN multiplayer by having clients send commands to the server as if they are input devices. A POC of this has already been done so it should be feasible.

One nice feature to have would be a game browser; clients will search for existing servers on the LAN and the server will reply with details. Instructions for doing this:
https://en.wikipedia.org/wiki/Broadcast_address
http://lists.cubik.org/pipermail/enet-discuss/2009-August/001230.html

@cxong cxong added this to the 0.5.7 milestone Aug 20, 2014
@cxong cxong added the feature label Aug 20, 2014
@cxong cxong mentioned this issue Aug 20, 2014
6 tasks
@DavidKnight247
Copy link

For gcw zero it would be great if this was included and compatible with the D-Pad style controller for LAN (and WAN?).

@cxong cxong modified the milestones: 0.5.7, 0.5.8 Nov 9, 2014
@cxong cxong modified the milestones: Deathmatch, 0.5.9 Jan 27, 2015
@cxong cxong self-assigned this Jun 12, 2015
cxong added a commit that referenced this issue Jul 18, 2015
Fix stack overflow due to large game event
cxong added a commit that referenced this issue Aug 15, 2015
In game start menu, client will continuously
attempt to connect to a LAN server, and based
on the result, set the "Join LAN game" menu
to enabled/disabled
cxong added a commit that referenced this issue Aug 16, 2015
Change find LAN server timeout to 1s
@cxong
Copy link
Owner Author

cxong commented Jan 20, 2016

Here's some more details about how to find LAN servers, via UDP broadcast:

http://lists.cubik.org/pipermail/enet-discuss/2009-March/001072.html

Every server binds a UDP info socket (just used for pinging the server)
to the same exact port. Game traffic is done on a different port which
differs per server, only the info socket is the same port value for all
servers. The SO_REUSEADDR option is set on this info socket before the
address bind is done, which allows multiple info sockets to live on the
same ip address and port. SO_REUSEADDR causes any packets sent to the
broadcast address to be delivered to ALL sockets bound to that port.
This allows multiple servers to coexist on the same computer and be
pinged properly, so long as their game traffic is at least on different
ports. The server then replies back with information about which port
its actual game traffic is on and other info back to the client that
pinged it.

cxong added a commit that referenced this issue Jan 26, 2016
cxong added a commit that referenced this issue Jan 27, 2016
Allow multiple servers per host
cxong added a commit that referenced this issue Jan 29, 2016
cxong added a commit that referenced this issue Feb 2, 2016
@cxong cxong closed this as completed in 2eb626d Feb 3, 2016
cxong added a commit that referenced this issue Feb 6, 2016
Taking campaign name from Entry.Info is
incorrect since for autosaves, this is NULL
as it's meant to be used in the menus only.
cxong added a commit that referenced this issue Feb 6, 2016
cxong added a commit that referenced this issue Feb 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants