Author Topic: TCP/IP multiplayer combat animations  (Read 2919 times)

0 Members and 1 Guest are viewing this topic.

Offline Magitek

TCP/IP multiplayer combat animations
« on: October 25, 2015, 04:35:57 PM »
A year ago I tried to get animations working in multiplayer but had not been able to actually track the flag down because it was hidden behind a mess of bitarrays. Ultimately the flag wasn't even involved in skipping combat and movement in multiplayer.

Today I chased down a real-time multiplayer flag instead and after some hours managed to locate one. Bingo. Smooth movement and sensible combat animation.
I've done some basic testing in multiplayer on localhost and it seems to have no immediate issues. It was tested in both simultaneous turn-based and ordinary turn-based briefly. Unfortunately all of a sudden I'm no longer able to play SMAC over LAN for some reason so I was not able to test for any issues fully.

The MP flag that determines if you are in TCP multiplayer is located at terran.exe+549308 (0 - pbem/singleplayer 1- tcp/ipx/serial)
I suspect it could be used to lift other restrictions in TCP multiplayer, but I can't remember what else was missing in TCP multiplayer. I could probably bring back the story dialogues just by debug watching the access on the MP flag.

The assembly governing multiplayer animations:
Fast movement - terran.exe+170F35 (always on if the mp flag is active)
Combat animations - terran.exe+11D18F
Faster combat speed - terran.exe+119893 (doubles combat speed by default when MP is on)
Combat animation rendering - terran.exe+119AE3
Unknown animation check (could be artillery combat? doesn't seem to affect anything I noticed) - terran.exe+119AB8

Altering the SMAC executable
--------------------------------------

Visible combat:
Search for "0C 40 8D 14 88 33 C0 8B 0D 08 93 94 00" and replace it with "0C 40 8D 14 88 33 C0 B9 00 00 00 00 90"
Search for "6A 10 FF 15 5C B3 68 00 8B 0D 08 93 94 00" and replace it with "6A 10 FF 15 5C B3 68 00 B9 00 00 00 00 90"

Normal combat speed (singleplayer combat speed):
Search for "3B D8 0F 8D 9B 03 00 00 A1 08 93 94" and replace it with "3B D8 0F 8D 9B 03 00 00 B8 00 00 00 00"

Smooth movement:
Search for "8C 24 34 2F 00 00 8B 35 08 93 94 00" and replace it with "8C 24 34 2F 00 00 BE 00 00 00 00 90"

Altering the SMAX executable
--------------------------------------
It seems the MP flag (and everything else) is in a slightly different location terranx.exe+53CDB8

Visible combat:
Search for "8D 14 88 33 C0 8B 0D 60 F6 93 00" and replace with "8D 14 88 33 C0 B9 00 00 00 00 90"
Search for "C9 8A CC 84 C9 8B 0D 60 F6 93 00" and replace with "C9 8A CC 84 C9 B9 00 00 00 00 90"

Normal combat speed:
Search for "0F 8D 78 03 00 00 A1 60 F6 93" and replace with "0F 8D 78 03 00 00 B8 00 00 00"

Smooth movement:
Search for "09 F1 FF 8B 3D 60 F6 93 00" and replace with "09 F1 FF BF 00 00 00 00 90"

Enjoy playing real-time multiplayer without that confusing combat skip! :danc:

Other multiplayer stuff
----------------------------

These allow you to turn off auto-design in multiplayer (the game preferences still affect whether this is on or off)

SMAC Auto-design off:
Search for "8F 37 00 00 83 C4 18 A1 08 93 94 00" and replace with "8F 37 00 00 83 C4 18 B8 00 00 00 00"

SMAX Auto-design off:
Search for "8C 3C 00 00 83 C4 18 A1 60 F6 93 00" and replace with "8C 3C 00 00 83 C4 18 B8 00 00 00 00"

SMAC Story dialogues on (not sure if these catch all story dialogues, might just be the end of turn ones):
Search for "E8 C5 35 F3 FF A1 08 93 94 00" and replace with "E8 C5 35 F3 FF B8 00 00 00 00"

SMAX Story dialogues on:
Search for "E8 F0 C0 F3 FF A1 60 F6 93 00" and replace with "E8 F0 C0 F3 FF B8 00 00 00 00"

SMAX tutorial/tour on (still affected by the preferences setting, defaults to off in multiplayer):
"84 86 03 00 00 A1 60 F6 93 00" -> "84 86 03 00 00 B8 00 00 00 00" misc messages
"90 90 90 55 8B EC A1 60 F6 93 00 85 C0 74 04" -> "90 90 90 55 8B EC B8 00 00 00 00 85 C0 74 04" misc messages
"FF FF 89 4D FC A1 60 F6 93 00" -> "FF FF 89 4D FC B8 00 00 00 00" movement/terrain messages
"85 A4 1F 00 00 A1 60 F6 93 00" -> "85 A4 1F 00 00 B8 00 00 00 00" multiplayer tutorial message enable
"5D C3 90 90 55 8B EC A1 60 F6 93 00" -> "5D C3 90 90 55 8B EC B8 00 00 00 00" pre-combat message2 (possibly could cause desync because it stops combat temporarily?)
"C0 5E 89 45 C8 A1 60 F6 93 00" -> "C0 5E 89 45 C8 B8 00 00 00 00" base message
"84 B0 01 00 00 A1 60 F6 93 00" -> "84 B0 01 00 00 B8 00 00 00 00" combat message 1
"74 04 3B FA 75 7F 8B 15 60 F6 93 00" -> "74 04 3B FA 75 7F BA 00 00 00 00 90" combat message 2

SMAX executable with everything added (+Yitzi 3.4):
www.mediafire.com/?m2xkjlhuk8wa9or
« Last Edit: October 29, 2015, 01:40:46 AM by Magitek »

Offline Nevill

Re: TCP/IP multiplayer combat animations
« Reply #1 on: October 27, 2015, 09:49:02 PM »
How do you even play via TCP/IP nowadays?

With DirectPlay deprecated in Win7 x64, I have not found a way to play other than installing a Windows XP virtual machine and launching SMAC from there. Any other options?

Offline Magitek

Re: TCP/IP multiplayer combat animations
« Reply #2 on: October 28, 2015, 12:34:02 AM »
I played it recently on two Win7 x64 machines without issue. Fast forward a couple of months and I can't seem to get it work at all, one of my network adapters is probably interfering with things but I'm not sure.

Dplay definitely still works for most games, I play a number that use it still. SMAC itself seems to have a couple of issues but it's not impossible to get running over TCP. If anyone does have any tips for it, feel free to post. It's possible in future we may have to use IPX emulators if TCP stops working completely.

edit: IPX emulator for lan play certainly seems to work http://www.solemnwarning.net/ipxwrapper/
now at least I can do proper local testing.
As for actual TCP most people seem to use Tunngle successfully, though so far I haven't figured out why it's necessary.
« Last Edit: October 28, 2015, 01:38:57 AM by Magitek »

Offline Magitek

Re: TCP/IP multiplayer combat animations
« Reply #3 on: October 29, 2015, 01:13:46 PM »
Had a reasonable test today for around 3 hours today and didn't notice any issues using the IPX wrapper and all of the edits I posted, the game actually pauses for the dialogs rather than de-syncs which is great.

Offline Nevill

Re: TCP/IP multiplayer combat animations
« Reply #4 on: October 30, 2015, 04:50:40 AM »
I used it and I couldn't get it to work. The protocol is there, but there is no connection. What do you use to emulate a LAN Network between the PCs? Tunngle, Hamachi, something else?


I tried it with Hamachi, since Tunngle does not work for me for whatever reason, but in theory it shouldn't affect the result.

Offline Magitek

Re: TCP/IP multiplayer combat animations
« Reply #5 on: October 30, 2015, 06:13:59 AM »
I used the IPX wrapper (this was over a real LAN), you can attach it to specific devices (or everything). It should actually work through tunngle+IPX wrapper but I can't be sure. I should mention I could not get the IPX wrapper to work over a wireless lan.

Offline Nevill

Re: TCP/IP multiplayer combat animations
« Reply #6 on: October 30, 2015, 09:51:32 AM »
I should mention I could not get the IPX wrapper to work over a wireless lan.
I see. That's exactly my case.  :(

Offline Magitek

Re: TCP/IP multiplayer combat animations
« Reply #7 on: October 30, 2015, 10:21:43 AM »
I mailed the developer about the issue, but I'm fairly sure wireless lan's don't operate in the same way as regular lans and don't actually broadcast. You should still be able to use hamachi+ipx emulator though..

Offline Magitek

Re: TCP/IP multiplayer combat animations
« Reply #8 on: October 30, 2015, 12:48:38 PM »
Multiplayer bugs unrelated to my modifications:
(click to show/hide)
« Last Edit: October 30, 2015, 01:50:18 PM by Magitek »

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

It will happen, and it will happen in our lifetimes. Fusion Power isn't just the future. Fusion Power is now.
~ T. M. Morgan-Reilly, Morgan Metagenics

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 36.

[Show Queries]