Performance Hotfix Mod

Home Forums Modding Performance Hotfix Mod

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #14303
    uzurpator
    Participant

    http://www.train-fever.net/filebase/index.php/Entry/560-Performance-Hotfix-Mod/

    In short – removed people, new buildings get no smoke emitting chimneys. Enjoy.

    #14307
    stevendshen
    Participant

    Is it possible to just remove smoke but keep people?

    is it possible to lower the percentage of people displayed but not remove all?

     

    Thanks

    #14310
    uzurpator
    Participant

    I’ll try to play with it some more. We’ll see.

    #14317
    simonmd
    Participant

    Seconded, can we please have one with just no smoke? It’s strangely satisfying to see a train pull in and a flood of people exit the station, its what the game is all about after all.

    #14318
    coujou
    Participant

    Good job, but I don’t think displaying people in the streets is the problem of the game. Even without the people the CPU still have to solve every one citizen’s move. That is the bottleneck. Maybe grouping people would help (e.g. if the people’s moves were computed in the groups of five, CPU would have five times less job, which would result in huge performance jump). Could you do this? I don’t know anything about coding, but do you see as possible e.g. all people living in one house to work in the same factory and share the shops and leisure, so they could walk together? Yes, it is not real, but it would help.

    It is lovely to see at least the modders doing something with performance, keep, going. Tack 🙂

    #14322
    medopu
    Participant

    -Even without the people the CPU still have to solve every one citizen’s move. That is the bottleneck.

    I’m pretty sure that’s false. I usually get laggs when i zoom into the city, or zoom out far enough for screen to capture 2 cities simultaneously.

    If i zoom in any other area, like a train track by the field,  i have stable frames per second, which means that graphic rendering is the issue, not CPU. If CPU was bottlenecking calculation those couple thosand people paths, game would lag regardless of me zooming into the city or zooming into a field, because these calculations have to be run non-stop.

    My thought is also confirmed by the “error description”, when I CTD: “graphics rendering timeout limitation error”.

    But i’m not sure if it’s the citizents causing these problems. Maybe it’s my busses or cars. Will test this mod to see if it’s any improvement

    #14323
    uzurpator
    Participant

    Take note, that the improvement will be gradual.  Removal of particles is just as important as removal of people.

    Coincidentally, it is CPU problem – that is, CPU is choking on the amount of stuff needed to display. Current GPUs are very good at displaying tons of similar things. It is up to the programmer to ensure that similar things are ordered in a way that GPU can take advantage of them being similar.

    I, for example, get a ton of FPS drops in cities and steady 60 fps when viewing nothing in particular.

    Anyhow – if I’ll finde some time this week, I’ll fiddle with it some more.

    #14324
    coujou
    Participant

    Hmm, seems legit somehow, but I think that it is not only rendering what causes lags. In the very beginning of the game, the performance is great, no lags no matter what I am looking at (city, empty mountains…). As the time goes by and cities grow, I am losing FPS particularly when scrolling, moving etc. over the cities, but also over the empty places there is a significant framerate drop (but not so big as over the cities). So not only rendering and thus GPU insufficiency is the problem.

    Definitely it is not because of our own traffic, I tried to start a map and run 50 trains at once immediately and did not experience a drop of FPS before and then (very little).

    The cars of citizens also don´t slow the game down, find two cities with the most rush road between and bulldoze a piece of that road. All cars disappear but performance remains the same.

    #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.

    #14334
    simonmd
    Participant

    Well I’m going to give the above a go and report back. At the moment, I’m having all kinds of performance issues and it’s spoiling the game so anything is worth a try. My last scenario on a large map, had to be abandoned in 1910 due to the lag making it unplayable and my present game (medium map, 5 lines, around 10m in the bank at 1900) is starting to suffer as well. One thing I have noticed is that when lag or stuttering occurs, the hard drive is being read constantly and the lag frees up once the HD stops. This I can only assume is something to do with the program having to access a graphic file for rendering as the HD would have nothing to do with the CPU working on the Sim’ side of things.

    #14336
    gGeorg
    Participant

    Interesting research. The game has great idea, it finded a hole on the market, but it lucks professional delivery. Nice terrain engine, interesting simulation rules. However, the graphic engine is poor. Simulation engine doesnt use multithreading. Maby use Unreal/Cry/Unity whatever big engine will improve the visual quality, optimize HW stress and bring network support, multiplayer and so on. I consider Train fever as a student project which comes to live.

    Well, regarding your performance issue. I run it on the notebook. 4core, Intel graphic + 4GRAM. Have small map, 6 cityes per 700people in 1950. It chokes over the cities but still playable. Have about 15 trains and heap of cars (200 ?), 500M in bank.

    Try small maps, looks like the game has main issue in people handling. Without any auto-replacement or set-able management AI who would micro-fidling for you, large maps are pain anyway.

     

    • This reply was modified 9 years, 4 months ago by gGeorg.
    • This reply was modified 9 years, 4 months ago by gGeorg.
    #14361
    simonmd
    Participant

    Added the mod last night to a game I’d started to get issues with (late 1800’s, medium map, 4 lines) and only noticed a very small improvement, by 1910, the game was still pretty much unplayable. Granted a lot of the original buildings were still there so the smoke reduction wasn’t huge, i’ll have to try it from a fresh 1850 start. However, the lack of people did ruin the atmosphere totally and as I still got lag even in empty countryside so I can only assume this is more of a simulation based lag, not so much a graphical one. The fact that multithreading is not used I think is an important factor as an individual core on a modern CPU is often weaker on its own than that of an older single core processor. I think there is the big issue and something that needs to be addressed by the devs urgently.

    Could you Please release an updated mod that brings the people back? Even as just an ascetic mod, I have found the amount of smoke in the later stages of the game totally daft. No town/city in 2040 has dark smoke belching from its buildings!

    • This reply was modified 9 years, 4 months ago by simonmd.
    • This reply was modified 9 years, 4 months ago by simonmd.
Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Modding’ is closed to new topics and replies.