Trespasser under Linux update

A discussion and "how to" of running Trespasser under the Linux operating system. You do not have to be registered for posting in this forum!

Moderators: scallenger, Dapper Dan, TresCom Support Team

User avatar
Dapper Dan
-=TresCom Elder=-
-=TresCom Elder=-
Posts: 2010
Joined: Tue Nov 12, 2002 7:43 am
Location: South Carolina
Contact:

Re: Trespasser under Linux update

Post by Dapper Dan »

Thanks machf and Dragonlord for your input. I got it up and going very nicely with ATX current. Here's a shot at 1024x768 with draw distance set to maximum...

Image

In software, Trespasser just runs perfectly in Linux under the latest Wine. There are no problems I can detect. I think most would be hard pressed to find any differences in running it in software between Linux and Windows.

machf, my card is a GeForce 7300 with 512mb running the latest Nvidia driver - 169.09
"I have discovered an ancient tribe of those who still hold a candle for this dead, and forgotten Videonic Gamen... the Forgotten people."
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Trespasser under Linux update

Post by Dragonlord »

Maybe this explains it a bit better. This is the default OpenGL way of handling fog. As you can see an exponential formula is used. In the game they calculated the fog themselves. I assume this had been because the way DirectX allowed to do fog in that old version has not been flexible enough. OpenGL does not accept manual fog itself but using the EXT_fog_coord extension it is possible to do so. I don't know though if WineHQ does use OpenGL extensions if present or not.
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Trespasser under Linux update

Post by machf »

Well, fogs in Trespasser can be either linear or exponential, but aside from that, we'd need access to the source code to find out how it was being handled internally.

Nice screen, Dan. I've been going through your older screen (the ones which are still online) and from what I can see, in the past if was handled better, becoming progressively worse... screenshots of TC Isle with its heavy use of fog showed the worst problems.

I think ATX has an option to disable fog... maybe try that?
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
User avatar
Dapper Dan
-=TresCom Elder=-
-=TresCom Elder=-
Posts: 2010
Joined: Tue Nov 12, 2002 7:43 am
Location: South Carolina
Contact:

Re: Trespasser under Linux update

Post by Dapper Dan »

The very first shots were the best wineX ran Trespaaser. I'm fairly certain I was able to run TC_Isle without too many problems with it even in hardware. Let's see....

...yes, here we go. Tc_Isle in an earlier version of WineX in software, fog and all...

Image


And look how WineX does the window panes in the B-29 in hardware...

Image


Found this one too. A little later version of WineX when the problems began. Good fog but no foliage in hardware...

Image
"I have discovered an ancient tribe of those who still hold a candle for this dead, and forgotten Videonic Gamen... the Forgotten people."
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Trespasser under Linux update

Post by machf »

Looked good, overall. The windows probably were being treated as RGB555 or RGB565 instead of RGBA444. What happened to that version?
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Trespasser under Linux update

Post by Dragonlord »

In fact the texture format doesn't matter and has no influence on the result. OpenGL has a generic system hence any texture format you throw at it works as long as the creation process for said texture is not borked. Chances are somebody messed up this creation process there. OpenGL can be very picky when it comes down to incorrect texture creation.

Maybe I should once upon time take a look at the source files of WineHQ. Looks to me like a small problem ( although it could be also rather severe :D )

EDIT:
I took a first look before hitting bed. As it looks like the manual fog is not the problem. What happens in this case is only that they use a slower strided render call which is as the name implies slow but correct. Hence this is not the problem. I also noticed that they are using FBOs ( Framebuffer Objects ). FBOs are rather new and have for sure hit WineHQ a couple of revisions ago. FBOs are a tricky beast to handle especially what goes for texture creation. In the specifications a lot of possibilities exist but unfortunately in reality ATI and nVidia have their very own idea of what is possible ( and it's not documented ). Hence from my glance at the code I suspect that the missing transparent elements are due to the usage of a non-supported texture format. For some silly reason they opted to not check OpenGL error codes which is the reason why they slipped such a vital thing. I'm going to plug in some error checks once and see which format causes the beast to die. This is one of the reasons I use OpenGL error checking always in my game engine ( costs next to no speed and tells you instantly what you did wrong ).
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Trespasser under Linux update

Post by machf »

This is what it looks like in TresEd:

Image

TresEd is a native OpenGL app, BTW.

As I said, the 16-bit RGBA4444 data is being interpreted as RGB555 or RGB565 data for some reason, Trespasser itself runs in one of those modes. The other textures are simple 8-bit paletted textrues.
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
User avatar
Dapper Dan
-=TresCom Elder=-
-=TresCom Elder=-
Posts: 2010
Joined: Tue Nov 12, 2002 7:43 am
Location: South Carolina
Contact:

Re: Trespasser under Linux update

Post by Dapper Dan »

This might be a clue. After playing, I found this error repeatedly in the terminal:

Code: Select all

fixme:d3d_draw:drawPrimitive Using software emulation because manual fog coordinates are provided
"I have discovered an ancient tribe of those who still hold a candle for this dead, and forgotten Videonic Gamen... the Forgotten people."
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Trespasser under Linux update

Post by machf »

Yes, that's what DL was mentioning...
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Trespasser under Linux update

Post by Dragonlord »

Chances are the WineHQ team did an error selecting the right OpenGL texture format for this case. As mentioned with FBOs you have to know what you are doing since ATI and nVidia have their own way to handle things and unfortunately they are sometimes orthogonal ( hence it one format works in ATI but not nVidia and vice versa ). Checking for errors should give me a hint what went wrong. OpenGL never does fail at converting textures correctly but it's easy to fail to specify the right texture format :D
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
User avatar
Dapper Dan
-=TresCom Elder=-
-=TresCom Elder=-
Posts: 2010
Joined: Tue Nov 12, 2002 7:43 am
Location: South Carolina
Contact:

Re: Trespasser under Linux update

Post by Dapper Dan »

I've played all the way to the town level. In software, I can say there is absolutely no noticeable differences between playing Trespasser in Linux under Wine and Windows. They are the same. Funny thing is, this game is completely ignored by everyone under Linux except a very few. So it's not like it has been tweaked by the Wine developers. Having so little attention from the Linux community and Wine in general, I'm amazed it works this well.
"I have discovered an ancient tribe of those who still hold a candle for this dead, and forgotten Videonic Gamen... the Forgotten people."
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Trespasser under Linux update

Post by Dragonlord »

It's not amazing in fact. WineHQ started out with DirectX3 ( or something like that ) support which is around the same as Trespasser uses ( don't know out of my head which one but it is an old version for sure ). Furthermore Wine does only hijack the function calls but is not an emulator itself. The opcodes still run directly on the machine just the jumps are rerouted. The only reason apps/games break on Wine is if they use a dll function not rewritten yet or that belongs to one of those undocumented windows functions put in for "certain" software companies :( . Another reason is to use very recent DirectX versions or shaders written for DirectX which where things get problematic.
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Trespasser under Linux update

Post by machf »

I think Trespasser is from the DirectX 6 era... DirectX 3 is much earlier (pre-Windows 98, I think).
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
User avatar
Dapper Dan
-=TresCom Elder=-
-=TresCom Elder=-
Posts: 2010
Joined: Tue Nov 12, 2002 7:43 am
Location: South Carolina
Contact:

Re: Trespasser under Linux update

Post by Dapper Dan »

Dragonlord wrote:It's not amazing in fact.
Really?

As far back as December 2002, I was attempting to run Trespasser on Winex 2.2 which yielded very problematic results. Back then, it would crash after only a few seconds. Very few of the options or main menu buttons worked and 640x480 was the highest resolution achievable. In fact, under Winex 2.2 it was essentially unplayable. Under earlier versions of regular Wine, Trespasser wouldn't run at all. I've seen Trespasser under Wine(X) progress from unplayable to virtually the same as in Windows in software, with no one at Wine or Transgamming paying even a modicum of attention to it.

If I wish to be amazed at what I've witnessed over the last five years with Trespasser and Wine, it is my prerogative to be.
"I have discovered an ancient tribe of those who still hold a candle for this dead, and forgotten Videonic Gamen... the Forgotten people."
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Trespasser under Linux update

Post by Dragonlord »

machf wrote:I think Trespasser is from the DirectX 6 era... DirectX 3 is much earlier (pre-Windows 98, I think).
Found a page with the infos. It's a DX6 one. Thought it used an earlier DX version. With DX6 though I can understand the troubles ( I hated that version :D )
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
Post Reply