PDA

View Full Version : Multiplayer desync



R'as al Ghul
10-02-2006, 13:44
I'm collecting some thoughts and observations on our desync problem here.

The problem:
In Multiplayer mode we have seemingly random desync problems. It always happens after deploying, when the players start to move their units.
The deployment phase itself is unaffected, the map, the models and the units show up fine.

Possible reasons/ elements we have in beta_7 and not in beta_5
1. the startpos file we're using is too big or contains too many lines.
Pro: It is true that the startpos contains many more lines than we actually need. All MakeUnit, Makebuilding, Addoffice, Addtitle commands can be deleted.
Con: We're the only mod with a special MP era, while mods like nap mod use the same startpos as in campaign. Also, vanilla MTW eras seem unaffected and also contain many lines more than needed in MP.

2. The new textures we use for the maps
Pro: It is true that nobody has tried that before and the textures pose a large part of what is displayed.
Con: The texture tile files are exactly the same size as the original files. Their format and the dimensions match the original files. They also show up and play just fine in SP.

3. The new animations for Yari-Sam, No-Dachi and all Cav.
Pro: The units have large parts that carry faction colours. Not only the sashimono but the spear of the yari, the horses apparell (?) and the armour of the No-dachi show the faction colour.
We currently have a high resolution animation page that doesn't match the low resolution page. barocca argued that the low resolution page probably isn't used anyway due to high end graphic cards.
Con: It runs fine in SP, even with 8 factions in custom battle. (Although my machine has problems running battles that huge by its own.)

Here're some theories by others:

We may have a sometimes yes, sometimes no problem. It could be one wrong thing, but there's also the possibility that there are too many small overloadings/borderline possibilities. Fine by themselves, but together they make the whole thing unstable in MP. MP with 8 people is already balancing on a thin rope. May I suggest we try a startpos with 8-12 (?) factions only?


It's those DUX units that Alex is trying to slip in. :laugh4:


Dropped packets. The game will retransmit dropped packets, but if a client's connection is dropping too many packets, eventually the client's game will fall too far behind the host's game and the host will consider the client to be out of sync. If the host is using -strictserver, it will then drop the client from the game. I believe the time window was relaxed a bit in one of the MTW patches to reduce the number of desyncs.

We should have joiners make note of their latency to the host before they join a game because that can be an indicator of a poor network connection. Sometimes a player who has a poor connection to one host will have a good connection to a different host. Although in Alex's case, he had problems with Tosa and me hosting.

So, where're we right now? What to make of it?

My best guess and I uttered that last night is that the new animations cause this. Not so much the amount of faction colours used, but the mismatch between high and low animation pages. The low pages are from beta_5 and, for example, show the No-Dachi to wear red armour, not faction coloured armour. This would also explain why the desync happens when you move your army. A big contra point Imho would be that once the game gets rid of a few players, it runs just fine.

All of this doesn't affect the beta_7 SP version.
My suggestion would be that we make a new version. We take the beta_5, a minimal startpos and the new textures. Than we playtest that in all possible combinations. After that we can add the new animations but we've to make sure that by then we've matching low and high pages. I think we can leave aside any possible network problems as we can't really monitor them and they have affected us before beta_7.

My hope is that those players who joined us in MP aren't put off too much by the desync problems and that they'll return to join the Fun. I think we can all agree that in those instances where the game runs fine, 1v1 and 2v2 on several occassions, it's a really good game experience and a hell of a lot of fun. Of course I count on the usual suspects to help us sort this out. You know who you are....

:bow:


R'as

TosaInu
10-02-2006, 14:46
Iirc: erasing every line from startpos makes it unstable in MP as well, even when it's not used. Each faction should have a king, a startprovince and some units/buildings/cash. Call it a minimal set to be prolific.

R'as al Ghul
10-02-2006, 14:53
Right,

you need:
SetLeader
Placeleader and
Setmoney(?) to make a valid startpos.
Units or buildings aren't needed afaik, but we can give one to each to be sure.

If we want to use the limited startpos with beta7, we need to declare all factions that are in beta_7 or else the names will be messed up.
We can then set 8 of those to active/ playable.

:bow:

Puzz3D
10-02-2006, 17:10
We can check the maps and textures by deleting the \textures\ground\lush folder from the beta 7 and copying that folder from a standard MTW/VI install, and deleting the \battle\maps folder and copying that folder from a standard MTW/VI install. The maps in \savemaps can also be deleted.

R'as al Ghul
10-02-2006, 19:43
That's a good idea to eliminate the second point.
I guess all the regular players are able to do that without further help?

If all works nicely after that it's quite clear that the textures are the reason.

R'as al Ghul
10-06-2006, 13:22
copied my post from Jousting fields:


Hello.

I thought that when we meet on Sunday we could do some further testing.
We do know that beta_5 works perfectly and we are able to play it.

Is it possible that everyone copies the folder \Textures\Ground\Lush
from beta_5 to beta_7?
By doing that we would have a beta_7 version without the new textures.
If that version works fine we can pretty sure that the textures cause problems in beta_7.
If it doesn't work fine we can be pretty sure that the animations cause the problems.

R'as

R'as al Ghul
10-09-2006, 12:37
copied from Jousting fields:


Using the beta_7 with the vanilla or beta_5 textures worked fine in several games. Unfortunately we only were 4 players. To be really sure that the textures are causing the desyncs we need to play some bigger games.

I hope we can test that next weekend.

:bow:

Tomisama
10-15-2006, 17:45
OK, did the Lush swap.

The Mizulands maps look alright, but the other conversions on Lush are patch work (4th kawanakajima, etc.).

Is this what I should be seeing now?

Will try to make it today if possible :smile:

P.S. Oh:
The maps in \savemaps can also be deleted. I see, nm :blush:

TosaInu
10-15-2006, 21:06
hotfix http://www.mizus.com/files/files/MTW/Stats/SamWarsMP_fix1.exe

R'as al Ghul
10-22-2006, 13:51
Hot fix 2: http://www.totalwar.org/Downloads/Mtw_Uploads/MTWupload/SamWarsMP_fix2.exe

I'm quite certain that our desync problems have to do with the cavalry animation pages that are diferent from the beta_5.
beta_5 runs fine and uses 512*512 pages for all cav.
beta_7 desyncs and uses smaller 256*256 as high res image.

Using the smaller pages works nicely in single player and since you can't test MP alone it never showed up as a bug. We're in the process of making new high res pages for the beta_7 cav. Chances are that as soon as we have this problem fixed, we can even play MP with the new textures as planned originally.

R'as

R'as al Ghul
03-12-2007, 09:23
We did some tests with an unofficial beta_8 this weekend.
In SP mode all runs fine.
In MP however we still have desync issues. We've conducted three tests with these results:

1. beta_5 animations and beta_8 textures + models work good together
We can at least enjoy the new maps with new textures and models in a next version :jumping:
2. beta_8 animations, mixed armies, crashes when everybody starts moving after deployment
3. beta_8 animations, inf only (thought it was the cav giving desync), crashes when everybody starts moving after deployment

Points 2 & 3 indicate a problem with the infantry animations.
Changed infantry animations from beta_5 are: No-dachi, Yari-Sam, WarriorMonks, Sam_Archer, NaginataInf. Some with only minor changes, some with major, like No-Dachi's faction coloured armour.

I'm taking a closer look at the animation bif files now.
The amount of faction colour shouldn't matter, seeing how the vanilla animations often have plenty of faction colour on the clothing.

Possible further tests, provided somebody volunteers:
1. old beta_5 Cavalry + new infantry (should crash because of inf only test)
2. new Cavalry + old infantry (could work)
3. new Cavalry + selective new infantry until it crashes
4. suggestions?

I could prepare a version that includes all animations ever done and several startpos/unitprod combos that point at the different test combos 1-3

Opinions?

R'as

Puzz3D
03-12-2007, 13:12
With beta8, play a battle using only units that do not have modified animations. If that works, try another battle with one of the units that has been modified. You could work through all the modified units one by one. It's possible that none of the modified units work in MP. If some do work, it may be possible to see a common factor in the animations of those that don't work.

R'as al Ghul
03-12-2007, 13:21
Yes, I'd like to do that but it would need to be online and I need somebody to help. (In SP all versions of all animations work fine.) From looking at the files alone I can't find a common factor. There're some odd things I don't know about (mailed barocca) but those are also in beta_5 and work fine. :dizzy2:

Puzz3D
03-12-2007, 16:46
I could test after 20:00 gmt on a weekday, and any time on a weekend.

R'as al Ghul
03-14-2007, 12:13
Don't know how far this is known but the animation bifs use a colour table of 256 indexed colors. The first index color is always the green background and the last should be absolute white (255,255,255). Alas, some of our bifs don't have the absolute white but (248,248,248). That may cause problems. I'm about to redo them. Maybe it's that simple......

R'as al Ghul
08-20-2007, 13:16
Bumped for reference purposes.

Togakure
08-20-2007, 14:11
I'm available to help with testing. Contact me via MSN, my MSN e-mail account, or a PM here.

Note that I will be heading back west to Cali for a week in early September (likely missing our gathering on Sunday 9/9), and will not be able to play on Sunday, September 30th due to a business requirement.

I get home from work around 7 PM EST on weekdays, rather late for those of you in Europe. Puzz is here near me though, so perhaps he and I can help together.

The Receptionist
08-30-2007, 04:15
... Maybe it's that simple......
was it that simple??

R'as al Ghul
08-30-2007, 09:06
was it that simple??
No, unfortunately not. We still don't know exactly what causes the desyncs with beta_8. That's why we've switched back to beta_5 for MP.

R'as