The International Simutrans Forum

 

Author Topic: Performance of Simutrans?  (Read 11383 times)

0 Members and 1 Guest are viewing this topic.

Offline jorrit

  • *
  • Posts: 54
Performance of Simutrans?
« on: October 21, 2008, 09:49:46 AM »
Hi all, I'm a new Simutrans player (and I think I like it so far  :) ) but I have a bit of a performance problem. Using simutrans 100.0 with either pak64 or pak128 I get very bad performance: only about 10-11 fps. With pak64 I have even worse problems like not being able to drag a window for more then about a few centimeters before it seems to 'let go' of the window. At least with pak128 that doesn't happen.

BTW, I'm using the native windows version. I tried SDL before but that seemed even worse.

I come from OpenTDD and there I don't have any performance problems at all. That game is very fast.

My computer is a Dual Core Intel with 2 gigabytes ram and Intel Graphics 945 chipset. It is not the best 3D hardware but I guess that's not really needed for Simutrans.

Any tips?

Greetings and thanks in advance,

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #1 on: October 21, 2008, 10:00:00 AM »
Ah, seems the SDL version *is* faster if I use it with pak128.

Now I get about 25 fps which is very playable.

Greetings,

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #2 on: October 21, 2008, 10:55:16 AM »
But the SDL version does again seem to have the problem of not being able to drag windows. I can only drag them for a short distance and then it is as if my mouse is released. Or at least Simutrans thinks that it is released.

Greetings,

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #3 on: October 21, 2008, 11:12:34 AM »
This feels a bit like a monologue :-)

Anyway, I found out the performance bottleneck. It appears that if you pause Simutrans it only gets 8-10 fps while in normal mode it is about 25 fps. Why is pause that demanding on framerate? I don't see anything special on screen that would clarify that.

Greetings,

Offline jbode

  • Devotees (Inactive)
  • *
  • Posts: 84
Re: Performance of Simutrans?
« Reply #4 on: October 21, 2008, 11:19:31 AM »
This feels a bit like a monologue :-)

Please imagine that your finding might need some testing ... AND most of the contributors here are working in RL - Simutrans is still based on voluntary work! Even though the response times here are much shorter than in 99% of the commercial software manufactures support pages ...

Patience please!

Jörg

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #5 on: October 21, 2008, 11:21:21 AM »
Please imagine that your finding might need some testing ... AND most of the contributors here are working in RL - Simutrans is still based on voluntary work! Even though the response times here are much shorter than in 99% of the commercial software manufactures support pages ...

Patience please!

Jörg

Ah sorry, that was not my intention. I was just remarking on myself that I was just producing one message after another instead of just waiting until I had sufficient information to make a slightly bigger and more accurate post.

Greetings,

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Performance of Simutrans?
« Reply #6 on: October 21, 2008, 11:42:44 AM »
Have you seen this topic,  V100.0: Slow performance? It may help you ...

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #7 on: October 21, 2008, 12:16:03 PM »
Have you seen this topic,  V100.0: Slow performance? It may help you ...

I hadn't seen it. I installed a nightly as instructed there and it is better. But there is still a slowdown when entering 'pause' mode. From 27 fps to about 15 fps. I wonder why that is? I'm a programmer and I can't think of a reason why entering pause would cause framerate to go down?

Greetings,

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Performance of Simutrans?
« Reply #8 on: October 21, 2008, 12:50:59 PM »
I don't know why either - but since there is no movement in pause mode, a reduced fps rate shouldn't be a problem, right?

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #9 on: October 21, 2008, 12:53:47 PM »
I don't know why either - but since there is no movement in pause mode, a reduced fps rate shouldn't be a problem, right?

Well it is a problem. I like to build my complete network in pause mode so that when I unpause it all starts (to earn) at once. But with the lower fps it is a bit sluggish to manipulate controls and dialogs to build everything.

Greetings,

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Performance of Simutrans?
« Reply #10 on: October 21, 2008, 01:25:30 PM »
Have you said the complete network? Wow, I guess nobody has done such a hardcore test with pause mode. Indeed, if I'm not wrong, in previous versions you can't do anything while you were in pause mode.
« Last Edit: October 21, 2008, 01:27:58 PM by vilvoh »

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #11 on: October 21, 2008, 01:28:19 PM »
Have you said the complet network? I guess nobody has done such a hardcore test with pause mode. Indeed, if I'm not wrong, in previous versions you can't do anything while you were in pause mode.

Well not really the *complete* network. I mean an entire supply chain. i.e. wood to sawmill, then planks to the furniture builder and so on. I create the tracks, make the stations and depot, build the trains and setup the schedule and then I press start on each of the vehicles. Then when I unpause they all start driving at once.

Greetings,

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Performance of Simutrans?
« Reply #12 on: October 21, 2008, 01:37:36 PM »
Actually in your example doesn't make many sense to start all the trains together: until the first train reaches the sawmill (and it processes all the wood), you won't get enough planks to fill the second train. So the planks train will be stucked at the station waiting to be loaded, if it's said to; if not, it will be running without getting any revenue but losses! :o

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Performance of Simutrans?
« Reply #13 on: October 21, 2008, 01:37:51 PM »
@Jorrit: in Simutrans world, that's doing all.... :D

Just curious, have you tried to do all this without using pause mode? Have you notice the same loss of performance?

I've realized that this loss of performance has happened with dual core machines.
This occurs across both my core 2 based xp pro machines.
My computer is a Dual Core Intel with 2 gigabytes ram and Intel Graphics 945 chipset.

Is their architecture 32 or 64 bits? As far as I remember, simutrans does not support 64 bits, does it?
« Last Edit: October 21, 2008, 01:47:24 PM by vilvoh »

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #14 on: October 21, 2008, 01:45:17 PM »
@Jorrit: in Simutrans world, that's doing all.... :D

Just curious, have you tried to do all this without using pause mode? Have you notice the same loss of performance?

If I do the same while not paused I have about 26 fps now and dialogs/building stuff goes smooth.

Greetings,


Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Performance of Simutrans?
« Reply #15 on: October 21, 2008, 01:52:50 PM »
That's the quick solution, not to use the pause mode!! ....

As I said before, I think the pause mode is not prepared to deal with so many tasks at the same time. I think its intended use is focused on small pauses. Anyway, let's wait to see what people from dev team may say about this.
« Last Edit: October 21, 2008, 01:56:40 PM by vilvoh »

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1392
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Performance of Simutrans?
« Reply #16 on: October 21, 2008, 02:01:46 PM »
Quote
Wow, I guess nobody has done such a hardcore test with pause mode

Well, since this feature is available I use it always! It's wonderful and works really good. The only moment I "unpause" is when convois are sent from a depot.

When you have a big map (3000x2000) with lots of convois (>500) building in "normal" mode is difficult due to performance problems. But building in "pause" mode still works more or less, far better than in "normal" mode. So my experience is quite opposite to Jorrit. I don't think the fps-rate is playing a role here.

The way I play nowadays is building in "pause" mode (in January of every year), playing in "fast" mode and solving problems in "normal" mode (the rest of the year). The main advantage is that when you redesign stations and tracks, you are not hampered by moving trains and trucks. Just freeze the game at the right moment and start your (re)design. Absolutely handy.

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #17 on: October 21, 2008, 02:06:31 PM »
When you have a big map (3000x2000) with lots of convois (>500) building in "normal" mode is difficult due to performance problems. But building in "pause" mode still works more or less, far better than in "normal" mode. So my experience is quite opposite to Jorrit. I don't think the fps-rate is playing a role here.

Well I like to build in pause mode too but when fps drops below 10 fps the user interfaces becomes very sluggish and it is very annoying to do that. In the nightly build that I'm using fps is about 14-15 which is just usable but if I unpause I get 26 fps which is a lot better.

Greetings,

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9566
  • Languages: De,EN,JP
Re: Performance of Simutrans?
« Reply #18 on: October 21, 2008, 04:43:38 PM »
Since actually pause means pausing the application to give the power to other program, it does roughly one update every 100ms. (I even thought to make it slower, but just left it like this.) Depending on your windows flavour, this will often pause for much less, especially when you click or release with the GDI binary.

Given the purpose of pause is to pause and freeze it, and building there is only secondary, I think I will not change the frame rate while pausing. But you can do it easily. Change simworld.cc line 4098 to some smaller value.

EDIT: I just saw: It is already 50ms, which should give 19-20fps. Seeing less means that most of the other time your system is already taking time to refresh just the image. But also the fps counter is not working any real good with the pause mode, thus also this value might be wrong.

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #19 on: October 21, 2008, 04:46:37 PM »
Since actually pause means pausing the application to give the power to other program, it does roughly one update every 100ms. (I even thought to make it slower, but just left it like this.) Depending on your windows flavour, this will often pause for much less, especially when you click or release with the GDI binary.

Given the purpose of pause is to pause and freeze it, and building there is only secondary, I think I will not change the frame rate while pausing. But you can do it easily. Change simworld.cc line 4098 to some smaller value.

EDIT: I just saw: It is already 50ms, which should give 19-20fps. Seeing less means that most of the other time your system is already taking time to refresh just the image. But also the fps counter is not working any real good with the pause mode, thus also this value might be wrong.

Well whatever the fps value says I also experience severe sluggishness while in pause mode and that sluggishness is not present if I unpause (or at least a lot less).

Greetings,

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9566
  • Languages: De,EN,JP
Re: Performance of Simutrans?
« Reply #20 on: October 21, 2008, 07:56:11 PM »
I could suggest to built in slow motion. (0.06 timestretch) Then the simloop should act as normal but everything else is slowed down very much.

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Performance of Simutrans?
« Reply #21 on: October 22, 2008, 10:44:12 AM »
Originally pause just halted everything. I considered building in pause mode cheating so I didn't support that at all.

It's a feature that was lately introduced as a favor for those who want to build during pause. I'd like to ask for some understanding if a feature that was originally not meant to exist, works not quite as smooth as you are used to from games that had it from the beginning. Prissi listened to the requests of the players, and tried to to help as good as he can.

But, as others pointed out, I also think it is better to build networks in normal mode, since the incremental completion of a network goes hand-in-hand with the transport of goods.

Offline jorrit

  • *
  • Posts: 54
Re: Performance of Simutrans?
« Reply #22 on: October 22, 2008, 10:46:52 AM »
Originally pause just halted everything. I considered building in pause mode cheating so I didn't support that at all.

It's a feature that was lately introduced as a favor for those who want to build during pause. I'd like to ask for some understanding if a feature that was originally not meant to exist, works not quite as smooth as you are used to from games that had it from the beginning. Prissi listened to the requests of the players, and tried to to help as good as he can.

Well I don't have a big problem with it. I was only curious from a technical viewpoint. I assumed that a program in pause mode needed to do less work then a program in non-pause mode so I found it weird that it went slower.

Greetings,