Reply To: Performance Hotfix Mod

Home Forums Modding Performance Hotfix Mod Reply To: Performance Hotfix Mod

#14328
uzurpator
Participant

It is a complicated issue, really.

The simulation part of TF can get very laggy once you take its size into account. Seven cities with 1000 people each are 7000 people to simulate. That, if not done properely, is a problem. And I can imagine a situation where people playing large maps, feeding cities for centuries, get 20 cities 3000 people each and then complain about lag.

However – it is quite simple to measure the drain of the simulation on the game speed.

Simulation is, more or less, constaint load. It grows very slowly, but is always there. Thus if you find a nice spot that maximizes frame rate, then you can measure how much that actually gets.

My favorite is looking away into the skybox, when you are on a corner of the map. If you get there, say, 30 FPS, then it takes 33ms to tick simulation once, at most.

Display, on the other hand, is varying load. You look at one place, see stuff, look at another place, see other stuff. Frame rate depends thus also on what you see.

Let’s be honest here. TF is not a pretty game. There aren’t thousands of shaders and advanced techniques used, that can stress the graphics card. The game is reliant on high resolution textures to provide good visuals. Thus we have to conclude that the frame rate issue is bound to the work CPU does to translate game simulation into graphics.

The wildly jumping frame rate when viewing cities confirms such diagnosis.

So, what can I ( or anyone who is not Urban Games ) do?

Well – I can’t fix simulation ( for example, by multithreading it ), because, well, UG is not hiring.

I cannot fix the simulation->display engine,  because, well, UG is not hiring.

I can, however, play with settings in model files, which control what is displayed and when, to ensure that the game display engine is least loaded.