Page 1 of 1

LAN game - Out of sync fix!!!!

PostPosted: 23 Feb 2011, 00:03
by Huggles
So its finnaly here! After hours analysing i finally found a fix for the sync failure in KaM TPR!

Ive only tested it for the latest version found on this forum, 1.60 beta 7.

Now what does this not mean:

-No1 has released any source code or anything in that form
-Online play is not yet implemented/working/tested
-I can not take requests and change the game to your likings
-I'm not god

Now by now you prolly pretty frustrated like....JUST GIVE IT! This was just tested on a local area network, all high end comps (both running windows 7, one 32bit and one 64bit. The game run for over an hour, WHILE CHEATENGINE had speedhack on 5x. Thus, in this hour we finished an entire game (builded a rather decent town (twice) with over 100 servants etc etc). and had some nice battles. But after all we finished a game! Even alt tabbed out and it all stayed sync


Here is the file

http://www.megaupload.com/?d=WA9KPVUK

No virus...i gurantee you.

Just copy fsgs.dll to your KaM main folder, read the readme if u still not sure.

The fix i used might cause issues when u quit the lan game, but alt f4 in that case is your best friend!

Questions can always be asked in this topic.

Be nice, dont flame, and if it actually works (!) do not hesitate to respond with a thank you. I dont get payed for this after all, just doing it out of good will :)


With a hearty goodbye!

~Huggles~

PostPosted: 23 Feb 2011, 03:27
by Lewin
Hi Huggles,
That's amazing work if you've really fixed it! I'm curius as to what you changed, did you disassemble and debug the networking DLL to find the error? Can you give us a few technical details for us nerds :wink:

Here's a link to the download for everyone:
http://megaupload.com/?d=XEYEF4HQ

However, I think there might be a problem with the file. I compared your DLL with the one in my KaM directory using a hex editor, and it said they were identical. I tried with a different program just to make sure, it also said they're identical. I wanted to compare them to see what you changed. Could you please check the download, perhaps you uploaded the wrong file?

I am not able to test multiplayer at this time, I only looked at the DLL files.

Thanks for your great contribution!
Lewin.

[RE:]

PostPosted: 23 Feb 2011, 11:30
by Huggles
Hey there Lewin!

The fact that it says they are identical can actually be correct, since i've only changed...well...one character.

There is actually a method(a group of instruction) in the dll i uploaded called shutdown, with as comment "stops the socket connection". Now what normally would happen is that if exit the lan game, the fact that u click on the button recalls this so called method using shutdown([parameters]) and shuts down the socket.

But, what i did now, is change the name of method shutdown. I simply recalled it shutdow.

Now if the game wants to close the socket, it calls a wrong method, says what the hell it doesn't exists, and goes on where it was.

This bug that made it out of sync actually was because of the closure of this socket. Now that the sockets can't be closed anymore (unless you exit the game ofcourse) this bug wont happen anymore and u can play until the end of time.

I'll now go and check whether i uploaded the right file.

PostPosted: 23 Feb 2011, 13:33
by Huggles
There we go!

Indeed, something was wrong

again, megaupload

but this time add

/?d=WA9KPVUK

worked for me plaing more than 30min

PostPosted: 23 Feb 2011, 13:35
by Huggles
Also changed link in the original post!

PostPosted: 23 Feb 2011, 15:14
by The Dark Lord
That sounds almost too easy! But it would be brilliant if it's true... Though I can only believe it when I see it with my own eyes, haha. This almost makes me install Hamachi again, despite my hate of it. :wink:

PostPosted: 23 Feb 2011, 15:25
by Huggles
Did some more research, the first change i did actually didn't apply on the original dll but on some copy of it which was not a dll after all.

Tried it with some other programs, ran a multiplayer game twice for nearly an hour. First time it all worked until on game crashed (Damn...)(Figured that fighting and all doesn't influence it), 2nd time it all worked until we started fighting, then the game got out of sync (they seemed to still listen to each other but just draw something else.., i moved a military unit on pc1, i saw it moving on pc2 in more or less the same way but just alittle bit off..., this was like before i suppose)

Dunno why it did work last night while apparantly nothing was changed. We finished a game we played over an hour with multiple fights etc etc.

Apparantly the 2nd dll i sent is worse as the first, i suggest you try the first (red 2nd post with an actual link).

~huggles~

PostPosted: 27 Feb 2011, 18:49
by harold
How did you find out how to fix it?

Re: LAN game - Out of sync fix!!!!

PostPosted: 13 Aug 2012, 21:33
by hori
since megaupload has been shut down, can someone upload the fix to any other page where we can download it?

Re: LAN game - Out of sync fix!!!!

PostPosted: 13 Aug 2012, 21:40
by T*AnTi-V!RuZz
since megaupload has been shut down, can someone upload the fix to any other page where we can download it?
Download KaM Remake. If you have KaM TPR installed, you can install this too. It has a great multiplayer feature!

Re: LAN game - Out of sync fix!!!!

PostPosted: 13 Aug 2012, 23:04
by Lewin
Yeah this fix didn't' actually work as far as I remember, the guy didn't really know what he was talking about and assumed it was fixed when he played a single game and it didn't go out of sync. But of course we all got excited back then before the KaM Remake had multiplayer because proper multiplayer KaM was just a dream.

Re: LAN game - Out of sync fix!!!!

PostPosted: 22 Aug 2012, 18:40
by hori
thank you for the hint. as soon as i have any feedback (which probably won't be for a while, but still) i'll tell you :)