[ssam] Serious Sam: The First Encounter - Linux Vs. Windows

Ryan C. Gordon icculus at icculus.org
Sat Jun 28 21:44:35 EDT 2008


> On the other hand when a linux user is hosting the server through wine 
> the linux clients can connect, but not the windows clients. Maybe this 
> is not only related to wine's network code emulating windows behaviour, 
> but probably the problem lies deeper (since you mention floating point 
> matching; recently a D3D bug was fixed that had to do with FP math: 
> http://bugs.winehq.org/show_bug.cgi?id=13225 - this one came to my mind 
> when I read your post).

Without research, I'd guess that Wine doesn't change the FPU precision 
(which DirectX does by default behind the scenes). But I could be wrong.

It was a terrible, inexcusable design decision on Microsoft's part, and 
has caused everyone trouble: Windows developers, Linux people, Wine 
people...

The Sacrifice bug report is possibly related, but it's hard to say. 
Precision issues are nasty.

As far as Serious Sam goes: basically, one machine adds two numbers and 
comes up with 0.385419, the other comes up with 0.385420, and it's fine 
for game play, but since it's not a perfect match, the game thinks you 
have incompatible data and refuses to connect. It's not an FPU precision 
setting, or a bug in gcc...if you shuffle around the order that the math 
instructions run, you'll get a different result, so even a Debug and 
Release build of the Windows version probably became incompatible with 
each other.

There was discussion of ways to fix this with Croteam, many years ago, 
but they were already done with Serious Engine 1 when we got to that 
point, and didn't want to patch the Windows client to fix it.

My guess is that Wine, vmware, the Linux port, and probably the official 
win32 binaries on some yet-unannounced version of Windows will all have 
this problem. It's not a bug in Wine, it's just a bug that never bit 
Croteam on Windows.

--ryan.





More information about the ssam mailing list