Drag[en]gine Trespasser Test

Discuss the game Trespasser here!

Moderators: TresCom Support Team, TresCom Board Managers

Post Reply
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Drag[en]gine Trespasser Test

Post by Dragonlord »

In the Trespasser: Unreal topic I mentioned I might once try for shits and giggles what the Trespasser files would look like in my game engine. Wrote a python script that converts a whole Trespasser map file from CD into engine resources in one single run. Hence it's run the script then run the game with the produced world file. Used a modified startup file for my game to load this converted map instead as there I have game logic and some generic classes which are well suited for a quick test like that. The terrain I exported as 3DS from TresED which is quite broken as you can see from screenshot 7 but for a first test this is enough. Didn't bother with reading the Trespasser terrain files as the documentation isn't really there and I could not be bother to snoop around the code right now. Maybe the tpm terrain export works better. The lack of any terrain textures Trespasser has makes quite the difference. Didn't notice before how scarce the vegetation really is. Without the terrain texture though it becomes quite glaring. I only converted some of the information in the map files. The objects for example are all static as I didn't bother with the value tables yet so no physics. Would be interesting to see how Bullet handles all this. Made some screenshots at day and night to see how Trespasser would have looked like at night... with a flashlight... and some hungry raptos behind you :P .

Image
screenshot1, screenshot2, screenshot3, screenshot4, screenshot5, screenshot6, screenshot7.

Had been an interesting little experiment.
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: Drag[en]gine Trespasser Test

Post by machf »

Impressive...
Dragonlord wrote:Wrote a python script that converts a whole Trespasser map file from CD into engine resources in one single run.
Ooooh, I'd like a look at that...
The terrain I exported as 3DS from TresED which is quite broken as you can see from screenshot 7 but for a first test this is enough. Didn't bother with reading the Trespasser terrain files as the documentation isn't really there and I could not be bother to snoop around the code right now. Maybe the tpm terrain export works better.
The .3DS terrain export option in TresEd doesn't work well, the terrain is incomplete as you found out. The .tpm export works fine, OTOH.

The best results are with a couple of scripts I wrote that can be used to handle .tri and .trr files, which GUIapp can process to directly generate the .wtd files. The .tpm files have extra polygons compared to the .tri and .trr files.
Take a look here to read more about those files:
viewtopic.php?f=129&t=8920
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
lardman
Stegosaurus
Stegosaurus
Posts: 70
Joined: Thu Jun 14, 2012 8:22 am
Antispam: No

Re: Drag[en]gine Trespasser Test

Post by lardman »

machf wrote:Impressive...
Dragonlord wrote:Wrote a python script that converts a whole Trespasser map file from CD into engine resources in one single run.
Ooooh, I'd like a look at that...
Indeed very impressive, I'd also like to take a look at your script if possible. With the current interest in getting Trespasser working in different game engines it would be good to pull together the various scripts, etc., to provide a package with a standard API from which people can add converters to their specific game engine formats. I'd hope this would be a collaborative effort as it would benefit all the people looking at using the game data in different engines.

I am going to start work on this when I can find a spare minute or two (I have been um'ing and ar'ing over engine choice, but this is engine agnostic so at least I can get started which will help motivation). I was also wondering about not pre-converting and instead reading directly from the Trespasser formats, but there are two issues I see - firstly I'm not sure whether the engines allow sufficiently low level access to change the file read code, and secondly as you mentioned above, the levels are quite sparse, so as part of the conversion process some intelligent automatic addition of trees, shrubs, grass, etc. as well as some terrain smoothing/roughening, etc., would probably make the whole thing look nicer. This would also mean one could then edit the exported data in the chosen engine format to add/replace items (e.g. drop in better quality textures and models).
machf wrote:
The terrain I exported as 3DS from TresED which is quite broken as you can see from screenshot 7 but for a first test this is enough. Didn't bother with reading the Trespasser terrain files as the documentation isn't really there and I could not be bother to snoop around the code right now. Maybe the tpm terrain export works better.
The .3DS terrain export option in TresEd doesn't work well, the terrain is incomplete as you found out. The .tpm export works fine, OTOH.

The best results are with a couple of scripts I wrote that can be used to handle .tri and .trr files, which GUIapp can process to directly generate the .wtd files. The .tpm files have extra polygons compared to the .tri and .trr files.
Take a look here to read more about those files:
viewtopic.php?f=129&t=8920
Thanks for the links :)
Dragonlord
Compsognathus
Compsognathus
Posts: 1070
Joined: Fri Jan 04, 2008 12:14 am
Location: Switzerland
Contact:

Re: Drag[en]gine Trespasser Test

Post by Dragonlord »

@machf:
The scripts are still rough around the edges and with hard-coded stuff. I want to add the Value Table evaluation so I can add physics and other stuff first before I wrap that stuff up for others to look at. GUIApp I don't have so I'll see to get the TPM working.

@lardman:
The scripts are rather minimalistic with python magic here and there. I more or less parse the file content straight into memory and simply use exporter methods to write the objects of interest into engine resource files. This works well in my game engine since I use a rigorous separation of data files without any pre-processing or mangling of different data files into container/combined files. In general though anything should work as in the first step GRF/SWZ/PID and company are build as interlinked object trees and then I just build lists of what I want exported and linking them together in world files. Nice thing is that these files can be used directly by the game as well as the editor as there is no pre-processing involved.

Concerning low-level access using the conversion python script is a better solution as this way you end up with individual resource files. This way you can go and replace individual models, skins, images, rigs, occlusion meshes and what not else easily. The scripts export the files with their ID Names so you can easily identify what files to modify if you feel like it.
Image
Leader, Head Programmer: Epsylon | Drag[en]gine ( Wiki )
Post Reply