Does anyone know about networking?

Ask here for technical assistance with installing, running, etc. Forum related issues should be reported here, too.
User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 183
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: Does anyone know about networking?

Post by Ubergeneral Grunt »

And maybe also focus on using Tggtt's patched GOG.com version with restored multiplayer support (at least where NetBIOs is supported) as a basis, as this will work best for modern OSes once multiplayer support is hopefully restored.

The patch is here: viewtopic.php?f=4&t=351
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...

User avatar
Tggtt
Mighty Colony Leader
Mighty Colony Leader
Posts: 224
Joined: Sun Oct 06, 2013 8:08 pm

Re: Does anyone know about networking?

Post by Tggtt »

Ubergeneral Grunt wrote:
Tue Sep 01, 2020 7:35 am
Tggtt's patched GOG.com version with restored multiplayer support
Thanks for reminding us about that, however, I don't see any trouble there, since the patch only changes DEADLOCK.EXE to make it work just like the updated 1.31 with CD but using the files provided by GOG's installer instead of looking for the CD.

MildewMan1 is replacing DLNET*.DLL, which is not affected by the patch. Therefore, what works for 1.31 with CD should work with GOG patched version.
Advice: DLNET used by 1.31 probably works with 1.20 as well.
Best 20x20 Map is elected.
Follow @OpenDeadlock.
Please help Deadlock Wikis by documenting buildings.
Note: OpenDeadlock Knowledge Gathering has been updated. Translation and Build Tools might fail. Send me a PM if you need help.

MildewMan1
Colonist
Colonist
Posts: 25
Joined: Sat Jun 27, 2020 3:02 pm
Favourite Race: Tarth

Re: Does anyone know about networking?

Post by MildewMan1 »

I'll probably end up just using tcp sockets for both.

The 1.31 dll might work with 1.20, but I recall reading in their patch notes that they changed something.

I'll see if I can post some pictures tonight of what I've got so far.

MildewMan1
Colonist
Colonist
Posts: 25
Joined: Sat Jun 27, 2020 3:02 pm
Favourite Race: Tarth

Re: Does anyone know about networking?

Post by MildewMan1 »

Sorry for the delay in getting these pictures uploaded.
HostTCPGame.JPG
HostTCPGame.JPG (25.87 KiB) Viewed 218 times
JoinTCPGame.JPG
JoinTCPGame.JPG (28.73 KiB) Viewed 218 times
MultiplayerSetup.JPG
MultiplayerSetup.JPG (30.44 KiB) Viewed 218 times

MildewMan1
Colonist
Colonist
Posts: 25
Joined: Sat Jun 27, 2020 3:02 pm
Favourite Race: Tarth

Re: Does anyone know about networking?

Post by MildewMan1 »

Here's a couple more.
Listening.JPG
Listening.JPG (27.32 KiB) Viewed 218 times
JoinMyGame.JPG
JoinMyGame.JPG (20.57 KiB) Viewed 218 times

User avatar
Tggtt
Mighty Colony Leader
Mighty Colony Leader
Posts: 224
Joined: Sun Oct 06, 2013 8:08 pm

Re: Does anyone know about networking?

Post by Tggtt »

Congratulations on the progresses.
Thanks for sharing that, MildewMan1.
Best 20x20 Map is elected.
Follow @OpenDeadlock.
Please help Deadlock Wikis by documenting buildings.
Note: OpenDeadlock Knowledge Gathering has been updated. Translation and Build Tools might fail. Send me a PM if you need help.

MildewMan1
Colonist
Colonist
Posts: 25
Joined: Sat Jun 27, 2020 3:02 pm
Favourite Race: Tarth

Re: Does anyone know about networking?

Post by MildewMan1 »

I think I'm close to having this working. I added something to my network debugging app where I can send what I call a "Net Message" to the game over the network to simulate things that a real player would do. I am able to select a race using my debugger and select a landing site, which gets me into the game. In the photo below, my debugger is the game host (Cyth), and I am a slave player in the game.

I access some memory locations directly in Deadlock with this, so to get this working with 1.31, I will need to go through and find the corresponding memory locations that I am using in 1.20.

Still have some work to do, but once I am ready, hopefully someone can help me test out a real game to check for bugs.
InGameMap.JPG
InGameMap.JPG (148.66 KiB) Viewed 145 times

User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 183
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: Does anyone know about networking?

Post by Ubergeneral Grunt »

Tggtt and I did have success with Deadlock II multiplayer games using TCP/IP and Hamachi, so that will probably work here for testing with other players too.

Maybe it would be possible to add play over the internet directly? Still, that might be a bit too difficult.
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...

MildewMan1
Colonist
Colonist
Posts: 25
Joined: Sat Jun 27, 2020 3:02 pm
Favourite Race: Tarth

Re: Does anyone know about networking?

Post by MildewMan1 »

That's what I'm working on is direct internet play using TCP sockets. Anyone should be able to connect to someone else if they have their IP and Port number.

Eventually I want to take my debug server and make it into an independent server that would handle all of the games. Instead of having to share your IP and port, you'd just connect to the server (would happen automatically from Deadlock like if you had used TEN or MPlayer back in the day), and then the server would facilitate connecting players that want to play together. Of course connecting with an IP address would still be an option.

I setup a virtual box with windows 10 today and installed everything to test out what I have so far between 2 games and found a pretty nasty bug that was only affecting Deadlock, and I didn't see it when testing with the debug server. I am using multithreading for a lot of this to prevent the UI from freezing while the sockets are doing stuff, and my code was calling the Net code directly from the staticly linked version, and then Deadlock was calling it from the DLNETNT.dll, so they were deadlocking (haha) each other.

I got that corrected though by hijacking the function where Deadlock loads the dll and just feeding it the memory addresses to the staticly loaded functions.

MildewMan1
Colonist
Colonist
Posts: 25
Joined: Sat Jun 27, 2020 3:02 pm
Favourite Race: Tarth

Re: Does anyone know about networking?

Post by MildewMan1 »

FINALLY!! I got 2 games to work together after many frustrating hours! I need to polish up some of the stuff to make it more efficient, but I'm pretty stoked that I was able to get this far with 0 networking experience 2 months ago.
2PlayerGame.JPG
2PlayerGame.JPG (422.65 KiB) Viewed 113 times

Post Reply