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

Started by jamespetts, January 26, 2014, 01:35:08 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

TurfIt

Evenly divisible by, or multiple thereof. The idea is to have the timing message sent always after a frame that includes a step().

jamespetts

Ahh, I see - I have now made some modifications to the simuconf.tab on the Github repository, which I hope will address these issues. However, I cannot find a separate setting for "frames_per_step", only a setting for "server_frames_per_step". Am I missing something?
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.

TurfIt

Nope, just me missing a word. server_frames_per_step is the setting, which you'd changed from 4 to 5 on the server. Hence the default 256 for checks should be changed too.

For the unloading changes, as long as you assessed the impact of the skipping those calls, then it's fine. I'd taken a quick look and it seemed the entire haltlist was deleted later anyways, so no need to remove them one by one. But it needs to be examined in detail to make sure no remnants of the old map hang around when bypassing sections of the destructors.

EDIT: the frames_ahead and _behind should be multiples of the server_frames_per_step setting, not the frames_between_checks setting as you added to the text in github.

Sarlock

Quote from: TurfIt on March 02, 2014, 07:20:40 PM
There's also a bug in the existing algorithm that can result in the client falling farther and farther behind. I ended up over 30 seconds behind once within 5 mins of connecting. That would make it virtually impossible to build anything.

Thanks TurfIt... experientially, I have encountered this issue a few times, where the delay between sending a build command and receiving it from the server was well over 10 seconds.  Usually, though, it's a 2-5 second delay.  Typically it's worse at the beginning of the month and starts to improve by 1:00:00.

Most likely times to desynch are during seasonal snow level changes, the beginning of a new month (almost guaranteed to desynch within the first 10:00 of the new month) and when another player is online.  I'm also more likely to desynch while building things/vehicles.

Hopefully this helps... I appreciate all of the work you two are doing on this.
Current projects: Pak128 Trees, blender graphics

TurfIt

That does sound very much like you're experiencing the 'execute in past' type desyncs. But do please check the log to confirm.
I'd suggest trying to set the additional_client_frames_behind = 4 or 9. Default is 0. This does add extra lag (333ms for 4), but that's better than disco city...

Sarlock

Warning: nwc_tool_t::rdwr: rdwr id=8 client=5 plnr=3 pos=6336,764,-8 wkzid=8218 defpar=a,6346,756,-8,3529,29,BrigAddMail init=1 flags=0
Warning: network_check_activity(): received cmd id=8 nwc_tool_t from socket[488]
Warning: network_world_command_t::execute: wanted to execute(8) in the past
Warning: karte_t::network_disconnect(): Lost synchronisation with server. Random flags: 0
Warning: nwc_routesearch_t::reset: all static variables are reset


It's a long log for about a 5 minute connection with the server, but this seems to be the most important part.  I can send more if it's helpful.  Was building a new ship and then desynched.

When I first connected I was experiencing a 8-10 lag time between action and reply from server.  It improved to about 3-4 seconds around the time I disconnected.

EDIT: Currently at additional_client_frames_behind = 4, I'll try 9.
Current projects: Pak128 Trees, blender graphics

TurfIt

The log should also be showing 'NWC_CHECK: time difference to server:' messages. If the number is negative, you're running ahead. Based on your/the server settings, you should have had ~750ms margin. Meaning if you ever see the time difference less than -750 (more negative), you're at risk for a desync. You can run ahead without desyncing, it only matters if you or another player is performing a command at the instant you are ahead.

Sarlock

Hmmm, I can't find that message in the logs.

I get:


Warning: network_check_activity(): received cmd id=9 nwc_check_t from socket[488]


But no time difference messages.

Just tried again with additional_client_frames_behind = 9.  I was able to connect for about 1:00:00 of game time.

Desynched around 0:20:00 in to a new month.  I very consistently desynch around this time.

Warning: karte_t::interactive: sync_step=583936  server=[rand=826554337 halt=1025 line=1 cnvy=3541 ind_dns_prop=3816 act_ind_dens=10855 traffic=14774226] client=[rand=1220077208 halt=1025 line=1 cnvy=3541 ind_dns_prop=3816 act_ind_dens=10855 traffic=14774220]
Warning: karte_t::interactive: disconnecting due to checklist mismatch
Warning: karte_t::network_disconnect(): Lost synchronisation with server. Random flags: 0
Warning: nwc_routesearch_t::reset: all static variables are reset


Different message this time.  I was actually reading on the forums when it happened, so it wasn't anything that I was doing at the time.
Current projects: Pak128 Trees, blender graphics

TurfIt

I think you need a higher debug level to see that one. Try with '-debug 3'.
The checklist mismatch is a genuine game bug that James will have to track down. They can be a royal PITA to find...

jamespetts

I think that at least one checklist mismatch bug from 11.x is fixed on the 112.5-merge branch (by Bernd Gabriel).
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.

Sarlock

It seems like the change to "additional_client_frames_behind = 9" has helped a lot.  I don't seem to be getting time mismatch desynchs anymore.

I had a checklist mismatch around 3:00:00 and another one just as the new month opened.  It seems consistent when the month opens that a checklist mismatch occurs.


Message: NWC_CHECK: time difference to server -1884


Was the lowest (most negative) time difference I could find.  It floats around a lot, sometimes positive up to 1000 or more, sometimes negative.  Doesn't go below -1000 very often.

Largest (most positive) was about 9000, most of the time it was between -500 and +1000.

Getting a ton of:


Message: hashtable_tpl::put: Duplicate hash!


Hundreds of them in a row.

All in all, however, it is much nicer to play with desynchs only happening every 3 game hours or so.  Fair bit of server lag but I can live with that just fine.  Thanks Turfit! :)
Current projects: Pak128 Trees, blender graphics

ӔO

AP, can you remove those three houses at Monkington?

At Camberford, I think it would be better if you went through north side of city hall.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Sarlock

Getting more desynchs again... could be because of the added convoys in the past few game years.  Most recent desynch was a time difference of -1900.  Can additional_client_frames_behind be increased beyond 9 (with the consequence of even more lag) to combat this?
Current projects: Pak128 Trees, blender graphics

AP

I'm finding it impossible to stay connected to the server for more than a few seconds at the moment. Which is odd because it held the connection for several hours whilst I build the inter-island railway.

Sarlock

Yeah, I was fine two days ago, the connection issues started yesterday.  That said, it had been getting a bit slower over the past few days, so I think the server load is increasing again.  The time differences between server and client are fluctuating over a wider margin.
Current projects: Pak128 Trees, blender graphics

asaphxiix

yikes... two weeks away, someone took over!

I don't suppose I could have my company back?

jamespetts

Ohh dear. Should I extend the time before a player is automatically unlocked? How many years was it that you were away?
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

can't say really... it has been many years since I built anything (surely more than 10). But I would connect every now and then.

edit: looking in saved games, I definitely connected on 1779. But last thing built was 1764.

edit: the new owner doesn't seem to have created any new lines or stops. It's true though that I kind of lost interest in this game, but at least while there are available slots, I don't see why they should take over an existing company.

jamespetts

I suppose that, if the player thought the company abandoned, he/she might have thought it more interesting or easier than starting afresh. I should be interested in any other views on the question of the time limit for unlocking players.
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.

Sarlock

I wouldn't mind it extended... going on vacation for 10 days next week and I might not be able to connect during that time (in fact, I highly doubt it - the hotel wireless likely won't be adequate).

The new player might have just been playing around, I haven't seen them do anything with that company and it might open up again in a few more days.
Current projects: Pak128 Trees, blender graphics

jamespetts

What figures would people suggest for the time before a company is unlocked?
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.

Sarlock

I think 15 real life days would probably be ample... as to how many game years this translates to, it depends on how often people are on to advance the clock.  Right now we're advancing about ~1 year per day, so 15 game years... but in earlier years we were on more often (due to less disconnects) and we were close to 2 game years per real life day, which would be 30.  I think if you set it to 30 years, that would be sufficient - beyond that, it's highly unlikely anyone is interested in playing anymore.  Less than that and we run in to the issue that asaph had where his company was taken over after a period of inactivity.

I was going to ask if you'd be kind enough to log in to my company halfway through my vacation to just quickly build a tile to reset the timer, but if you set the timer to a larger amount then we wouldn't have to worry.
Current projects: Pak128 Trees, blender graphics

ӔO

At this rate, some places might turn into rail and road spaghetti, which does reflect real life, so it's all good.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

VOLVO

Quote from: asaphxiix on March 07, 2014, 10:55:51 PM
yikes... two weeks away, someone took over!

I don't suppose I could have my company back?
Are you the owner of Ex Insulus(?) Navigation Company?
It's 1784/11(look at the chat room lol) when someone took over your company and changing it to Fodus Inc and the colour.. He left almost immediately though.

jamespetts

Asaph - would you like me to reset the password for that company?
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.


Sarlock

Quote from: ӔO on March 08, 2014, 06:13:40 AM
At this rate, some places might turn into rail and road spaghetti, which does reflect real life, so it's all good.

Indeed, the rate of urban expansion is amazing.  It's not even 1800 yet.  Many of the eastern cities that I have been serving with passenger ship/canal routes have grown from 5,000 citizens to 25,000-30,000 citizens in just 40 years and have mostly all joined together in to one big urban stretch.  By 1850 they are going to be massive.

I am going to continue to serve these eastern cities with canal and ships and see how that performs, at least until after 1850 when better rail infrastructure comes available.  While a bit slower, canal ships have the advantage of not getting bogged down in road traffic.
Current projects: Pak128 Trees, blender graphics

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.

TurfIt

Please try the attached patch. It appears to keep clients from falling way behind, and more smoothly adjusts the timing. Assuming neither server nor client is overloaded of course (which the actual server shows signs of at the moment - please check server log for 'server lagging by' messages after applying patch).

Also, applying mingw_sdl.diff would be nice so that it actually compiles the file rather than skipping it...

jamespetts

Thank you very much for that - I have now applied this to the 11.x branch. I will update the server presently so that we can test how it now performs. That is most helpful.

As to the SDL compilation - I had set the preprocessor directives as they were to allow for optional SDL compilation in MSVS: I have modified it now so as not to interfere with compilation in MinGW.
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

Now updated to 11.22, incorporating TurfIt's patch, increasing the speed of joining a new game (by reducing the time taken to unload the map) and fixing a few other bugs. I should be very grateful for any feedback on whether this makes things any better.
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

the server certainly starts quicker after connecting with 11.22, but I have yet to test out connecting for a long duration.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Quote from: jamespetts on March 08, 2014, 01:03:49 AM
What figures would people suggest for the time before a company is unlocked?

I think it needs to be specified in "real life days" not in game years, if at all possible.

jamespetts

There is no mechanism for doing so, and it would be rather difficult to code such a thing. I have extended it to 180 months from 120 for now.
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.

Sarlock

Thank you, TurfIt!

Connection time has decreased from about 2-3 minutes to less than a minute... much nicer!

Just testing stability now... the server is starting to get really laggy from the sheer amount of activity on the map, so it's hard to gauge.

EDIT: It seems more responsive now (even with the lag).

EDIT 2: James, can we increase it some more?  180 months, at a max of 24 months/real life day, is 7.5 days before a player loses their company.  We can increase that to 360?  That gives a full half month, which is helpful for those of us about to leave to Hawaii for 10 days  ;)
Current projects: Pak128 Trees, blender graphics