News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

bridgewater-brunel.me.uk - Simutrans-Experimental - Pak128.Britain-Ex 0.9.0

Started by jamespetts, November 20, 2012, 02:30:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

Quote from: asaphxiix on December 13, 2012, 01:41:50 AM
yeah shell scripting... it should be easy for those who know it, I think. I can try and ask a guy at work, at least to find out what it's about. can such a script interact with the game and command it to save or not to save?

Thank you! That is most helpful. It can do this via nettool's force-sync command. Another option would be simply to write this into the game itself, and have a "server_autosave_every" line in simuconf.tab, where the number assigned to it is the maximum number of minutes between saves. This might be easier than a shell script, actually.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

The game save every time somebody attempts to join. Autosave on the server will cause a desync of all clients immediately.

Thus to join any client can conntect and disconnect with a second simutrans running. Even using a standard version on cammandline will cause the save (and immediate crash of the client).

About CPU: Imho the braking accellerating code was the porblem. When I last tested exp, this was such a big hob and cause (imho) completely unrealistic acceleration. For that reason I did not even considered it for a moment for standard.

The routing of passengers is highly optimized by Knightly and may be as fast (or even faster) than standard.

asaphxiix

looks like I crashed the server again. Not sure what caused it. I removed some stream tiles with the bulldozer, not under a bridge, and made a few actions later, so I don't think that was it, I was removing a long rail bridge exactly when it happened, but it was actually too concurrent to be it considering the slight lag at the time, I think a few seconds before that I was terraforming with the elevation tool.

edit: happened again when I was removing a bridge with stops and signals on it. I've done it before, but now it crashes. the very fast response time makes me think this is something that happens on the client, but it appears the server has gone down too.

jamespetts

Very interesting discussion on performance - but I agree with TurfIt that it should be split from the main server thread.

My VPS currently reports that it is running at 34.6% CPU (that is just Simutrans-Experimental's load) with me connected as a client from my local computer (and the game therefore not paused). The CPU usage might have gone down a little in the last few days as steam trains replace horses and carriages in a number of areas, reducing the overall number of convoys. I was seeing usage at over 70% at some point.

As to the performance generally, I am fairly sure that Prissi is correct that the main drain on performance is the physics calculations (both acceleration and braking now). Bernd has told me that he plans to optimise the physics at some point: presently, many things are calculated many times over that could be calculated far less frequently and stored.

The problem is exacerbated by the very large number of passengers - not because of the path-finding load, but because they create demand for a very large number of convoys, which demand the players have fulfilled, with the result that a very large number of convoys (each of which takes a significant computational load because of the physics code as it currently stands) are being used.

As trains replace horses and carriages for longer distances journeys, this should reduce considerably, as the physics calculations are per convoy, not per vehicle, and far fewer convoys are needed for the equivalent load on railways.

The interim advice to reduce the framerate is most helpful: I have edited the shell script so as to pass "-fps 18" to the server on startup, which should take effect from next time that the server restarts. Hopefully, this should alleviate things rather, too.

Edit: Looking at the number of convoys, they have not diminished that much yet: they are down to 12,009 from a peak of 13,583 three years ago. With two clients connected, the server is reporting a CPU usage of 40.2% and memory usage of 34.8%. The client reports a frame time of 71ms and a framerate of 14fps (which, I have found, I had already set in simuconf.tab, so I need to remove the 18fps directive from the shell script).

Edit 2: I have modified simuconf.tab to specify "zipped" instead of "bzip2" for the saved game format, which, according to research undertaken by TurfIt, I think, is the optimum format for online use, despite having larger files.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

asaphxiix

at the current state, I am unable to remove city bridges, for instance in beechton, and other places. This causes the server to restart every time. If you try to do it in my stead, you'll see the crash.


edit: removing the stops from the bridge, and even from the train line does not help. This last try, it happened a while later, as I was removing city buildings to make room for the track.

further edit: the last time, mentioned above, the server did perform the removal and did not restart, only the client lost sync and crashed. so I joined, and managed somehow to get another bridge removed in another town. I played some more, then someone joined - not sure if successfully but the game was saved. Then I played some more, and the game started freezing a bit for a few seconds which I haven't seen before, with hard drive running heavily (so it seemed like a performance strain). then lost sync and server restart, for no obvious reason this time.

ӔO

I think the server is crashing when you do that.
I can tell it is reverting, because the changes I've made also revert to their previous saved state
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

asaphxiix

yes, it does and it did just now too, and I wasn't removing a bridge in a city or with stops on it.

unfortunately I have to remove those bridges, because the station skipping bug forces me to have a choose signal in every station, and you can't have those with more than one stop on a bridge.

edit: game is online, but the client crashes when loading.

ӔO

probably a convoy is causing the crash, because it happens at an exact moment.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:


ӔO

If you load the game locally, it will crash at an exact time, every time.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Re passenger numbers, I've just given up on them again. There are so many that adding passenger routes means tragically high refund levels. I am replacing mail carriages with rail, but the absence of decent track is causing issues with profitability...

asaphxiix

i have a a thought about that, I will open a thread in the discussion forum.

ӔO

^ I've checked an older save, and the cause of your jam is because 12103 has reverse route enabled.

http://dl.dropbox.com/u/17111233/client3-network.sve
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Hmm, every time I try to connect, it loads but then desynchs immediately and crashes Simutrans

That synching feeling... :-(

ӔO

My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Having seen this thread just appeared, does that mean that some people are able to access the server game now?

jamespetts

Sorry all for the lateness of the response to this: I have had a very busy week-end and not had time for Simutrans until now. It seems that this is another instance of a crash that is fixed on my 10.x branch, so this issue ought be corrected when I release 10.16, which I am hoping will be soon. Apologies for the difficulties!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

AP

Well at least it means we all get a bit of a break from the server game. Railway-mania was getting a bit hectic...

AP

Am trying to fix the signalling error on my route (I forgot the long-block signals), but the server keeps desynching. Will try again tomorrow.


jamespetts

I had updated the server to 10.16 (my post announcing that seems to have gone missing for some reason - odd), but there's a bug that I hadn't managed to track down before the release that's causing the crashes. I have fixed it in my 10.x branch, but it will have to wait for me to have a little more time before I upload it. Apologies for the trouble, and thank you everyone for your patience.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

The server is back up running the new version 10.17, which fixes the crash that brought down the server previously. Apologies for the troubles - happy playing!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ӔO

My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Woohoo.

Long Block signals don't seem to work as previously, where there's a  single platform station between passing loops and trains need to check past the platform before entering the block. Has there been a change to the code? I've resorted to pre-signals instead, but I'm not sure if they'll work. Advice appreciated.

James - when you get a moment, there's a stretch of road/embankment I engineered which the public player seems to have drawn over, meaning I can't upgrade it to rail as intended. I assume it was mistaken for already-public road (being such a fine piece of engineering!). I posted a sign at the start-point about it. Can it be given back to me please so I can run the rail line? Thanks.

jamespetts

AP - just about to fix the road issue now. As to the other issue, do you think that you could post that in a separate thread so that I can track the issue better? Thank you!

Edit: I think that I had already fixed the road/rail issue at 1389,1478 - or was there another one?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

AP

I am also getting desynchs, but am able to get a little editing done between each.
EDIT: No - desynchs are quite bad. :-(

Quote from: jamespetts on December 19, 2012, 11:18:50 AMEdit: I think that I had already fixed the road/rail issue at 1389,1478 - or was there another one?

It's still there at 1389,1475. Dark brown road is public but built on alignment I engineered, was previously player-owned. Have drawn track either side. Possibly it was fixed but got lost in a resave?

Am also becoming concerned at the financial side of the game - not sure what settings we're using, but because there's no pause in a server game, it's impossible to make changes without bleeding out a fortune in lost revenue. I think the money side of the game needs slowing down - income and expenditure, by maybe a factor of 10. This would also greatly reduce the stress/ urgency of online play- the need to check in twice daily to see if you've gone bankrupt yet.

In single player-games, large scale re-engineering is possible (essential), but it seems in the server games, not to be. My company has gone from £27M to £7m because of the time the work has taken (some of that was expected losses, but I'm nowhere close to finishing, and may well go bankrupt). Mainly it's because other players, inevitably, run the clock on substantially whilst any given player is not online. The only way I can see around this, apart from a server pause function (which would be nightmarish to manage) is to reduce the flow of money in/out.

ӔO

Works fine for me. I only get an occasional desync when the game spams crowded or stuck vehicles.

Quote from: AP on December 19, 2012, 06:52:28 PM
Am also becoming concerned at the financial side of the game - not sure what settings we're using, but because there's no pause in a server game, it's impossible to make changes without bleeding out a fortune in lost revenue. I think the money side of the game needs slowing down - income and expenditure, by maybe a factor of 10. This would also greatly reduce the stress/ urgency of online play- the need to check in twice daily to see if you've gone bankrupt yet.

In single player-games, large scale re-engineering is possible (essential), but it seems in the server games, not to be. My company has gone from £27M to £7m because of the time the work has taken (some of that was expected losses, but I'm nowhere close to finishing, and may well go bankrupt). Mainly it's because other players, inevitably, run the clock on substantially whilst any given player is not online. The only way I can see around this, apart from a server pause function (which would be nightmarish to manage) is to reduce the flow of money in/out.

Actually, it's because early rail and station maintenance is slightly too high compared to how much the pax/mail will give out.
If you overbuild without using the new expansions, then you will bleed money.

I am not making a profit either, despite +70% capacity on rail, which is mainly due to infrastructure maintenance. As a result, I am living off of interest.

A key point to watch when expanding is your infrastructure maintenance vs. operational profit + interest. Best to build in smaller segments than trying to build the east coast mainline overnight.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

asaphxiix


AP

Quote from: ӔO on December 19, 2012, 07:11:31 PM
Works fine for me. I only get an occasional desync when the game spams crowded or stuck vehicles.

Actually, it's because early rail and station maintenance is slightly too high compared to how much the pax/mail will give out.
If you overbuild without using the new expansions, then you will bleed money.

I am not making a profit either, despite +70% capacity on rail, which is mainly due to infrastructure maintenance. As a result, I am living off of interest.

A key point to watch when expanding is your infrastructure maintenance vs. operational profit + interest. Best to build in smaller segments than trying to build the east coast mainline overnight.

I'd reckoned on the maintenance for the low grade track, but it's the absence of a pause function, that has made everything take so long. Completed, the new infrastructure should make money. But the intermediate phase has taken so **** long because the clock ticks when you're not playing *but someone else is*. (the whole "server is paused when nobody is playing" doesn't really do as much as I'd hoped it would).

asaphxiix

well, that's part of the challenge when playing online. The other ideas you had about playing in turns etc. sounded interesting, but I'm not sure how well they would work. Online, you can't pause and you can't fast forward. I actually think it shouldn't pause when no one is playing either - players should be sure to leave their networks in a balanced state, and assuming no sudden new connections to it, it should run well for a few years with no interference.

The fact that you and I are losing big money now is more because we played poorly, rather than problems with the game. Over-expansion is punished in the game with refunds, and we can't even handle the maintenance of the tracks. The whole racing before 1825 was quite over the top for us I think, and it would be nicer to play in future games if we're a little more relaxed in this area and start running small lines when trains are available. I can't even get my trains to go in proper spacing yet, or handle the huge amounts of traffic, which is just going everywhere.

AP

Ah, but here you hit the crux of it

Quote from: asaphxiix on December 19, 2012, 07:51:54 PMplayers should be sure to leave their networks in a balanced state, and assuming no sudden new connections to it, it should run well for a few years with no interference.

How can one be sure of that? With the offline shared game, I know most players would, after saving their turn, let the game run on fast forward for a few years, and assuming the whole thing didn't lead to ruin, they uploaded their evening's work. So there was certainty that what was being done, was an improvement.

Here, the game demands a lot more time/commitment than it's healthy for people to give, because players just don't know if it'll be okay or not. The only way to get away from the game is to have enough in the bank to "live off the interest" even if everything is making a loss.

Your point about the 1825 route building is well founded, I've been thinking about that. I'd like a rail tool that can be laid that consists of no track, just little-white-posts in the ground. I.e. so that, in online play, one can stake-out a route over several evenings, get it right, and then "upgrade" it to track with a couple of clicks.

asaphxiix

Quote from: AP on December 19, 2012, 08:03:57 PM
Ah, but here you hit the crux of it


How can one be sure of that? With the offline shared game, I know most players would, after saving their turn, let the game run on fast forward for a few years, and assuming the whole thing didn't lead to ruin, they uploaded their evening's work. So there was certainty that what was being done, was an improvement.

like I said, I'd like to try it, but I just dunno...
Also, it shouldn't be so hard, assuming your growth is organic and not over-expansive. If you just connected a city or two to your existing balanced network, you know you can look at it for a while and see it's alright, even if not it's not gonna bump your network out of business; but you can't come in one night, triple the size of your network and expect to be rich when you come in after 3 days... If you wanna do big additions you gotta be prepared to work on it for more hours afterwards, to take care of balancing, and at this stage of this game, this is not easy at all.

Quote from: AP on December 19, 2012, 08:03:57 PM
Here, the game demands a lot more time/commitment than it's healthy for people to give, because players just don't know if it'll be okay or not. The only way to get away from the game is to have enough in the bank to "live off the interest" even if everything is making a loss.

I agree about the health issue. I think therapy is the ultimate answer here, for me at least. But once again this is the nature of the online simulation - a more "real" simulation, where there's no save & load, and no pausing and FF - everything you do counts and you only get one shot for a play. Single player is the practice field, this is the real thing. it's actually what is so great about it :) In other games it's possible to simulate FF on the same game while still playing online, to test different situations, but in this game Fast Forward hardly goes any faster, and I can't run more than one instance at the same time.

Quote from: AP on December 19, 2012, 08:03:57 PM
Your point about the 1825 route building is well founded, I've been thinking about that. I'd like a rail tool that can be laid that consists of no track, just little-white-posts in the ground. I.e. so that, in online play, one can stake-out a route over several evenings, get it right, and then "upgrade" it to track with a couple of clicks.

The reason we over expanded was because we were marking territories without coverage, which is not the style of play I'm personally looking forward to in a game like this. It's nice to compete, but competition should at least be realistic and not going over the top. What you suggest would simply allow to mark all the territory for free... I do think we need some moderation in the online games.

AP

Quote from: ӔO on December 19, 2012, 07:11:31 PMActually, it's because early rail and station maintenance is slightly too high compared to how much the pax/mail will give out. I am not making a profit either, despite +70% capacity on rail, which is mainly due to infrastructure maintenance.

Most of my rail routes are now in use. (Exception - Warthorne, Ardton Bridge and Yenddon branches). And I'm inclined to agree with AEO's diagnosis - the rail routes are in profit, all of them, but the infrastructure maintenance is substantially exceeding the operating profit. I don't see that completing those 3 branches would help.

There's certainly scope for optimising my network, I haven't withdrawn some mail coach routes that need to transition into local feeder routes, but I don't think that's what's causing the issue either.

Since I expect my network will go bankrupt overnight, and lacking a "sell everything" button, I shall therefore bow out, and wish the remaining players good luck.