[MOD IDEA] X3 Terran Conflict - improved performance

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
Graxster
Posts: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

Post by Graxster »

I have to agree with graphics not being the major problem. Even turning all the graphic options off, and textures to Low didn't solve stuttering for me. I'm also constantly getting "freeze-frame", where the entire game seems to stop. Usually right when I trigger a battle. Seems to me the scripts that kick in are bogging everything down.

Another thing I noticed that hurts performance: The "player stats" logging. Never really payed much attention to the stats window, other than looking at my notoriety, but did you know that the game actually keeps count of how many shots you've fired? While it's true that player stats are a small thing, the big things are made up of small things. If you could disable stat-tracking there'd be that much less overhead.

The biggest issue seems to be the scripting. Between jobs, calling fight scripts, trading scripts, and everything else it's bogging the game down terribly. As Litcube said, with no waits or other optimizing, it's a major contributor to in-game lag.

-Grax

Edit: Just for kicks I went to the scripts folders of X3R and X3TC and did a search for *fight*. X3R has 12 fight scripts, X3TC has 40!
DeadlyDarkness
Posts: 1144
Joined: Fri, 28. Jul 06, 19:36
x3tc

Post by DeadlyDarkness »

What surprises me is that the Beta testers didn't pick it up. It could actually be just one script, which is why it takes a good few game days to really start to bite, possibly a new one that was added just before game release.

Does anyone know if the saved game file size increases rapidly for a laggy game compared to older saves?
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

logging player stats has no influence on performance at all ... for shots fired you actually have to create the shot, move the shot and do stuff if it connects ... simply increasing one counter every time you trigger a shot on the player ship does not hurt the slightest ;)
User avatar
Graxster
Posts: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

Post by Graxster »

Just popped in to write a quick note. Just noticed severe lag when on a mission I took from a station. Was supposed to kill a pirate ship. Game was stuttering and lagging, but as soon as the ship exploded, FPS went back to normal. There were plenty of other pirate ships around, as well as about 10 fighter drones, so 1 ship blowing up shouldn't make such a huge difference. Seems to me that the Director files when they're running (missions) are making a big performance hit.

-G
User avatar
Observe
Posts: 5341
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Thanks for adding your findings Graxster!! The more data we collect, the better we can understand what we need to watch out for as we mod the game. :)
Grimm Spector
Posts: 137
Joined: Thu, 23. Oct 08, 17:06
x3tc

Post by Grimm Spector »

it's clearly an issue with scripting and such but I've found it becomes MORE severe the further you get from where you started, ie. things are more jammed up when you're somewhere you found late in the game compared to where you began the game, it seems that all the earlier scripts run good IS or when you're near their sector and gum everything up really bad when you're far away OOS especially when you add a few of your own ships in...

serious optimization is needed here, they need more event handlers and catches, and to run sectors scripts as a modularized item, to keep things from spilling out so much in memory, it's like having a slow memory leak without it being permanent because it DOES eventually clean up in most cases or at least doesn't keep on writing into memory....

I still think a databasing method of holding and calling script results and data would help, allow a database to be running in the background for it while the game concentrates on keeping the frame rates high for you and running your IS stuff, and all the OOS stuff is relegated to the database, which fires results as they are finished, and the game simply has event handlers for when it receives them and does much fewer queries on the status of them rather than always waiting...
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

I vote that we wait for 1.3 to be released, re-run our data checking, benchmarks, etc., and go from there.

If the 1.3 isn't satisfactory, we'll crack this thing open.
jimhsu77479
Posts: 168
Joined: Sun, 25. Nov 07, 22:39
x4

Post by jimhsu77479 »

For some reason, beta kyon emitters severely lag at medium or close distances when there's several (~5km). This is most obvious in external view when engaging khaak clusters in your ship. Alpha also does it to some extent particularly with a lot of scouts. Graphics settings are medium textures/high shaders, 2xAA, 4xAF.
User avatar
juanitierno
Posts: 451
Joined: Fri, 28. Dec 07, 17:06
xrvr

Post by juanitierno »

I pray egosoft will add a few switches for disabling eye candy in the next patches. Stuff like:

[ ] Disable civilian ships
[ ] Disable ship exhaust graphics
[ ] Disable floating announcement tv-donuts

etc...

:)
carran
Posts: 820
Joined: Wed, 6. Nov 02, 20:31
x4

Post by carran »

Grimm Spector wrote:it's clearly an issue with scripting and such but I've found it becomes MORE severe the further you get from where you started, ie. things are more jammed up when you're somewhere you found late in the game compared to where you began the game, it seems that all the earlier scripts run good IS or when you're near their sector and gum everything up really bad when you're far away OOS especially when you add a few of your own ships in...

serious optimization is needed here, they need more event handlers and catches, and to run sectors scripts as a modularized item, to keep things from spilling out so much in memory, it's like having a slow memory leak without it being permanent because it DOES eventually clean up in most cases or at least doesn't keep on writing into memory....

I still think a databasing method of holding and calling script results and data would help, allow a database to be running in the background for it while the game concentrates on keeping the frame rates high for you and running your IS stuff, and all the OOS stuff is relegated to the database, which fires results as they are finished, and the game simply has event handlers for when it receives them and does much fewer queries on the status of them rather than always waiting...
Interesting thread...and informative too

The problem with using traditional databases are primarily related to connecting and disconnecting - though I guess you mean either a memory segment with pre spawned connections or a flat-file in memory, both would have processes handling requests - an ideal candidate for a multi core CPU. Of course, this would be quite a departure not to mention significant rewrite of part of the system...
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

So, gentlemen, where are we at now with 1.3 performance? Because I trused Steam, I am a second class citizen, and am not able to patch my game until Steam so deigns to.

Is 1.3 a good place to launch off of for performance modding?
User avatar
Observe
Posts: 5341
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Litcube wrote:So, gentlemen, where are we at now with 1.3 performance? Because I trused Steam, I am a second class citizen, and am not able to patch my game until Steam so deigns to.

Is 1.3 a good place to launch off of for performance modding?
I too am part of the Steamed club, where patience is honed to levels befitting sainthood. [ external image ]

As such, I've no idea where we are for performance with 1.3. I've heard mixed reports. Some say better, some worse, some the same.

I did download and extract the patch, and there's hardly any change in the various modifiable files beyond very slight reduction in some of the Jobs. Main changes seem to be in the multitude of Mission files, and of course the .obj compiled game files.

My guess is for 1.3 Egosoft was more concerned with squashing some of the show-stopper bugs, rather than the overall performance problem - which is in itself a show-stopper for many. In other words, I expect post 1.3 performance is still an issue that can be considerably improved by judicious modding efforts. :wink:
Raveena
Posts: 39
Joined: Wed, 13. Feb 08, 14:16
x3tc

Post by Raveena »

I didn't read all of this thread so i don't know, if this was mentioned here before:

There seems to be major performance hit caused by the soundsystem. Soundeffects are altered realtime and this causes most likely heavy micro stuttering.

Solution: Edit a *.spk-file, which contains pitch-information. There's a thread on this forums, which i'm looking for... forgot, where it was... :cry:
Jackrum
Posts: 30
Joined: Fri, 20. Feb 04, 22:14
x2

Post by Jackrum »

Hi, this is Ulfius from thexuniverse.com forums.
This thread has some really great ideas and research, you've really got my attention. I would like to contribute if possible. I know you're focusing on shaders to increase performance mainly but there is also much room for improvement with combat, which is where I can help.

I know the combat side of X3:TC inside out and know a lot of tricks for how to optimize performance there. From reducing the amount of lead in the air without affecting visuals to which hit/sound effects cause problems. I've even managed to de-lag Plasma burst generators recently.

Let me know if any of this is useful to you.
User avatar
Tycow
Posts: 2141
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Tycow »

Optimising weapon effects would help massively in my game. The weapons cause some of the more serious lag I suffer. :)
User avatar
Tycow
Posts: 2141
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Tycow »

Any news on this project? :)
User avatar
Observe
Posts: 5341
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Tycow wrote:Any news on this project? :)
There is an adjunct thread on the subject of performance comparison between X3-R and X3-TC.

Rather than embarking on a "shoot from the hip" shotgun approach, I want to determine precisely where the best surgical changes can be made for best result.

We need to make sure that we don't spin our wheels on false assumptions, and that whatever we do is actually effective.

Various ideas and suggestions have been made in this thread. I am in process of performing tests to validate those ideas.

I strongly suspect that Egosoft will deliver next patch having significant performance improvement. What we do before and after patch depends on our ability to accurately analyze the situation, and come up with meaningful modifications.

It's easy enough to say "oh, the problem is there are to many something or others", and make a mod for it. That approach is sometimes invalid, and may even make the situation worse. If someone makes a performance "improvement" mod, or has some idea, we need to see the quantifiable, demonstrable test results before we just categorically accept.

Let's keep plugging away at it, and see what we can come up with. I for one am hard at work on potential solutions. :)
User avatar
Observe
Posts: 5341
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

Just for the record in case anyone is wondering, there is no difference in performance between patch 1.3 and 1.4 based on my measurement data.

[EDIT] Sorry, wrong thread. The above statement should have been put in this thread.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Interestingly, though, I was going to ask if anyone's noticed a difference between 1.3 and 1.4. I have not.

It's a crying shame, really. Haven't played the game since the first day I bought it.

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”