Retera / WarsmashModEngine

An emulation engine to improve Warcraft III modding
GNU Affero General Public License v3.0
256 stars 45 forks source link

[Suggestion] Implementation of a P2P server setup (instead of just LAN) #60

Open ben132 opened 2 months ago

ben132 commented 2 months ago

I don't know whether this is a good place (and I can be ignored and removed if not). But it is more of a suggestion on how to implement a modern "LAN" setup enable it as a P2P connection. Also in the far future someone could create a P2P MMO game hint hint xD. I know that there is still the requirement of Verses AI.

Retera commented 2 months ago

I have published some YouTube videos of a WoW simulator on Warsmash. But, other than the technological similarity with World of Warcraft's render subsystem, Warcraft III or an emulator of it are not a great choice for building an MMO. Case in point, the lock-step networking model for an RTS is not a good mechanism for building an MMO.

I have played Warsmash on LAN using the "gaming network" server system. Basically, if you click the "Battle.net" button on the Warsmash simulation of Frozen Throne, it connects to a server of your choice. The default version of the warsmash.ini connects to my server on warsmash.net, but this is not necessary. The full source code of the entire server is in this same Warsmash code repo.

In my life, if I am in an area with a LAN but no good connection to the warsmash.net server in North America, what I typically do is launch a new instance of the same server program here in the WarsmashModEngine repo. After launching the server on the LAN, if we suppose it is running on a device like my phone at IP address 192.168.1.14, then I will enter this LAN address in the warsmash.ini configuration, such as the following:

[GamingNetwork]
Server=192.168.1.14

After doing this, then the laptops can all connect and host a game and play it, served through the "GamingNetwork" server on the LAN. And even though the "Local Area Network" menu button is disabled and doesn't actually run, this gives us the ability to play games on LAN. In my experience, when I do this, the latency is also a lot better so the multiplayer experience is generally smoother.

ben132 commented 2 months ago

When it comes to the MMO Network

I know that it would not be the best for a MMO's network system, it is more so an idea that I have loved to create (even if that part is ignored), the idea is more so for a a single player instance for a MMO (I know that it defeats the purpose of MMO) but it would also allow you to invite people to join you instance or join a dungeon with other random single player instances.

With the normal "LAN" it could launch the server component and like to it for a "LAN" network that can still be connected to outside of the LAN network.

I am not 100% sure if this makes sence, hopefully it does (I know what I am thinking)

Finally the work that is required to make it into a WoW client is still ungodly, but this project is still Mind Blowing.