The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: inkelyad on June 16, 2011, 09:30:50 PM

Title: [PATCH] Spacing time now counts as loading time.
Post by: inkelyad on June 16, 2011, 09:30:50 PM
https://github.com/inkelyad/simutrans-experimental/tree/spacing_and_loading (https://github.com/inkelyad/simutrans-experimental/tree/spacing_and_loading)

Example:

spacing 1 cnv/m , convoy loading time is 00:15

Before patch:
Arrival time: 23:30 -> Departure time: 00:15
Arrival time: 23:55 -> Departure time: 00:15

After patch:
Arrival time: 23:30 -> Departure time: 00:00
Arrival time: 23:55 -> Departure time: 00:10
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: jamespetts on June 16, 2011, 10:44:13 PM
Inkelyad,

thank you for this. Apologies for not having had chance to look into this or your other patch yet - I have been very busy this week, unfortunately, and have not had a great deal of time for working on Simutrans. I have been trying to integrate the latest changes from Standard into Experimental, which is a somewhat time-consuming task, and I shall have to complete that before returning to fix the latest set of reported bugs and apply the latest patches.

In the meantime, if anybody would like to test and/or comment on this patch, I should be very grateful. Thank you, Inkelyad, for your contribution.
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: inkelyad on June 17, 2011, 06:00:50 PM
EDIT: Oops. I have found logical error in this patch. Don't use it.
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: inkelyad on June 26, 2011, 12:24:11 PM
Now, 9.x don't crash instantly. I can publish fix for this patch. Github link (https://github.com/inkelyad/simutrans-experimental/tree/spacing_as_loading)

+ It will show tooltip counter while convoy wait for loading.

I was forced to add new variable to convoi_t => savegame format change.

James, please put right versions in simversion.h and line 3205 of simconvoi.cc if you merge this.
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: jamespetts on June 26, 2011, 02:29:55 PM
Inkelyad,

thank you very much for that. That looks very interesting. As it requires an increment to the major version, it may be a little while before I am able to integrate it (as I tend to like to have several enhancements at once for major version increments), but this does look promising (although I have not evaluated it so far). I do like the look of using a more intelligently formatted expression of time for convoy loading in the depot window, too.
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: jamespetts on July 06, 2011, 10:44:03 PM
I have now conducted some preliminary testing with this. One comment so far: the tooltip display for showing loading time remaining in seconds is very useful, but it might be clearer to mark it "Loading: 0:13" (etc.), rather than just giving the number.
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: inkelyad on July 07, 2011, 04:40:58 PM
Quote from: jamespetts on July 06, 2011, 10:44:03 PM
One comment so far: the tooltip display for showing loading time remaining in seconds
It is not seconds. It just looks like this when bits_per_month = 19
Quote
but it might be clearer to mark it "Loading: 0:13" (etc.), rather than just giving the number.

Here. (https://github.com/inkelyad/simutrans-experimental/commit/da95a8aaabcab61ade49f2e4fd678f7b4256b599) Or merge my spacing_as_loading (https://github.com/inkelyad/simutrans-experimental/commits/spacing_as_loading) branch.
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: jamespetts on July 07, 2011, 07:44:59 PM
Thank you for that: that is a good improvement. Might I ask: if the numbers are not minutes and seconds, what do they represent? I suspect that I am missing something obvious in asking that...
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: inkelyad on July 08, 2011, 05:01:08 AM
It is same code as for show_month = 1 ( Month = 24h, no date).
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: jamespetts on July 08, 2011, 09:23:55 AM
Ahh - doesn't that have the potential to be confusing when players are using a different show_month setting?
Title: Re: [PATCH] Spacing time now counts as loading time.
Post by: inkelyad on July 08, 2011, 09:58:50 AM
When player do precise calculations about spacing/waiting time it is better to have stable counter.
(when date involved Jul = 31d = 744h=44640min, Feb=28d=672h=40320min for same number of ticks).
I think they figure it out. For all others players it will be just a counter.