Views: 28,310,486 Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 12-10-25 09:10 PM
Guest:

0 users reading Multiplayer over LAN | 1 bot

Main - General - Multiplayer over LAN Hide post layouts | New reply


AyCe
Posted on 04-03-24 08:06 PM (rev. 2 of 04-03-24 08:12 PM) Link | #6507
Cute lil emulator thing that's just a single EXE. Nice!

I would like to play Advance Wars Days Of Ruin against a friend via LAN.

We struggled for hours to even find out if that was possible, and if so, how.
We tried to build the "season2" branch that promises to have that (no download was available sadly), but the build instructions did not work or required QT which isn't free.

Ultimately we had to use the "open 2 windows on one PC" method and just turned around one of the screens, lol. But it wasn't very convenient.

But surely there HAS to be a way to play a simple LAN game?
I mean, the code to pass stuff between instance seems to already exist, to pass messages between instances on the same machine! Just send those messages over the network, no?

I read that timing requirements make playing over internet difficult - but we have <1ms latency on a LAN, so no problem there.

Like, fake "local" DSes via a networking layer?
Like, just enter the other computer's IP address.
Start a master server and all connect to that one.
Or a UDP broadcast for ****s sake.

Is this really not implemented yet? Or have we missed the obvious?

If it's not implemented yet, why? What are the technical hurdles? Isn't it just wrapping and passing packets from the real network to the DS fake layer and vice versa?
I would like to help with that if I can, but since there hasn't been a release in 2 years, is the project dead?

Thanks for reading this. (:

Generic aka RSDuck
Posted on 04-03-24 08:26 PM Link | #6508
Posted by AyCe
or required QT which isn't free.

QT is licensed under LGPLv2 thus, it is free (as in freedom) and open source. There is an alternative proprietary license which costs money if you want to link it with closed source software statically.

If you follow the build instructions properly it will download it just fine.

Posted by AyCe
Like, fake "local" DSes via a networking layer?
Like, just enter the other computer's IP address.
Start a master server and all connect to that one.
Or a UDP broadcast for ****s sake.



melonDS used to just throw UDP packets around, so older versions work on on a single computer, in a LAN or even with Hamachi across the internet. Though work is a bit of an overstatement, because it barely did even on one computer.

The reason for this were a few accuracies issues and more importantly that the instances ran completely with no synchronisation. Thus they would "miss" each other as they emulators would be on different emulated points in time.

0.9.5 fixed both of these issues and to better implement synchronisation started using IPC to communicate between instances, because it is faster and easier compared to having to do all communication via packets.

____________________
Take me to your heart / never let me go!

"clearly you need to mow more lawns and buy a better pc" - Hydr8gon

LEGO_Vince
Posted on 04-11-24 09:40 PM Link | #6522
So does it no longer work in tandem with Hamachi? I'd like to try and play mario party DS with friends without having to port forward.

____________________
THE LEGO MAN

Arisotura
Posted on 04-11-24 10:43 PM Link | #6524
There is a proof-of-concept branch (season2) where I was experimenting with features such as LAN and netplay. The branch is outdated, because we are in the middle of a big refactor related to this, but regardless it is promising.

LAN was fairly close to a finished product. There were still issues to iron out but it seemed to work fairly well over a reliable (ie. ethernet) network. Wifi is another affair.

Netplay was a clunky proof of concept at best. It worked somewhat, but was very rough and unfinished. Netplay will also benefit the most from our refactor -- it would greatly simplify the process.

These features should entirely negate the need for things like Hamachi, while providing far more reliable multiplayer support than the old UDP-based system ever did.

As Generic said, the old system was basically just tossing packets over the network with zero guarantee. In the best case scenario it happened to work, but as it made no attempt at synchronizing the various players, it was doomed to fail. Local multiplayer in the old days was finicky, required workarounds like disabling the framerate limiter, and was overall not very good -- several games just refused to connect entirely, and those that did tended to lag a lot. By comparison, local multiplayer in 0.9.5 is smooth as butter -- improvements to wifi emulation, but there's also a whole synchronization system in place to keep all the players running at the same pace, so no data gets lost.

Also, an important fact regarding local multiplayer comm is that the protocol relies on low latency. When the host sends a data frame, clients are given a specific time window (expressed in microseconds) where they need to respond. The replies may not be late, they either arrive on time or they don't -- that is how it works in the real world. Emulating this is already quite complex, and if you have to deal with added network lag (often measured in hundreds or thousands of microseconds), it doesn't bode well.

Around the 0.9.5 release, we experimented with multiplayer over LAN by backporting the old UDP comm layer. With a fast enough network, it mostly works. However, the new comm layer introduced in 0.9.5 add several checks and smarts to make sure the aggressive synchronization only kicks in when needed and doesn't cause lag spikes. I had to work around the weirdness that some games exhibit.

The LAN feature in the season2 branch was a renewed attempt at this sort of thing, but using enet instead of raw UDP comm, and trying to replicate the checks and smarts of the shared-memory based system, with moderate success.


Regarding season2: the builds were deleted because apparently there is an expiration time to CI builds.

If you're running Windows, Nadia provided a build: https://kuribo64.net/get.php?id=QCFE5vdbQtwNtqWP

____________________
Kuribo64

lihosow484
(post deleted) #7277


Main - General - Multiplayer over LAN Hide post layouts | New reply

Page rendered in 0.046 seconds. (2048KB of memory used)
MySQL - queries: 29, rows: 87/87, time: 0.025 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.