News:

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

Simutrans-Experimental 10.0 - pre-release testing

Started by jamespetts, July 30, 2011, 11:50:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

inkelyad

Quote from: jamespetts on August 18, 2011, 08:25:38 PM
Further, I have changed the time displayed in the tool-tip for reversing/loading, and in the depot display, to use the same time scale as journey and waiting times, which is more useful than using the scale of time used for passing months/years.
My branch internal_minutes add new show_month value. It will display internal minutes as left corner clock.

jamespetts

This is interesting - thank you for that. Is this in HH:MM or MM:SS? Either way, it seems to need a further layer: in the first instance, DD:HH:MM or the second HH:MM:SS, as showing 191 hours (or minutes, as the case may be) is not ideal.

Also, if this is in HH:MM, it would seem inconsistent with the other timings that use MM:SS (inconsistent both in format and in actual duration).
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.

inkelyad

Quote from: jamespetts on August 20, 2011, 04:30:16 PM
This is interesting - thank you for that. Is this in HH:MM or MM:SS?
It is direct usage of karte_t::sprintf_ticks.
Quote
Either way, it seems to need a further layer: in the first instance, DD:HH:MM or the second HH:MM:SS, as showing 191 hours (or minutes, as the case may be) is not ideal.
It is deliberately so. To avoid confusion with calendar hours/minutes.

jamespetts

I think that it is clearer to use hours as well as minutes - given your new format, it should not cause confusion with calendar days. See my latest push to the journey-minutes-display branch.
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.

inkelyad

#74
Well, we need more responses.
What is better:
Month is 191:59 long
or
Month is 3:11:59 long.
Remember, it will be used for spacing/spacing shift values too.

EDIT:
59 seconds is rounding error.
If you use exact formula:

tenths_of_minutes = get_settings().get_meters_per_tile() * ticks * 30L / (4096L * 1000L)
and
seconds = get_settings().get_meters_per_tile() * ticks * 30L * 6L / (4096L * 1000L);
You will get 192:00 or 3:12:00

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.

inkelyad

Can you fix my English and put calculations from here into commentaries? Somewhere in simunits.h?
It will be very helpful for new developers.

jamespetts

Didn't we come to the conclusion that those calculations weren't correct; or am I mis-remembering or mis-understanding?
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.

inkelyad

I was not sure about them. But when you made karte_t::ticks_to_tenths_of_minutes you prove they are correct.
Compare
tenth of minute = 4096/30 ticks when meters_per_tile == 1000
and
get_settings().get_meters_per_tile() * ticks * 30L / (4096L * 1000L)
and
get_settings().get_meters_per_tile() * ticks * 1/136533L

jamespetts

Hmm, I see. I'm not quite sure how this works, I have to say, but if the calculations are equivalent, then there's no arguing with that. Would it not be better to put the comments in karte_t::ticks_to_tenths_of_minutes ?
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.

inkelyad

At least put in simunits.h "look to karte_t::ticks_to_tenths_of_minutes".

jamespetts

I have added comments based on the calculations to simnuits.h - can you check that these are correct?

I have also pushed some changes to remove bugs and increase accuracy in the calculation of departure/loading/reversing/journey/waiting times; I should be grateful if people could re-test.
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.

inkelyad

Quote from: jamespetts on August 21, 2011, 12:00:47 AM
I have added comments based on the calculations to simnuits.h - can you check that these are correct?
I think we must explain 104857600/1280 too.
Something like this:

*      -- (express for journey, waiting, reversing, loading and spacing times in Experimental)
*      100 tiles = 256000 steps = 104857600 yards
*      100 km/h = (100 << 10) / 80 "yards"/tick = 1280 "yards"/tick. (see macro kmh_to_speed below)
*      -- Assuming 1000 meters per tile, 1h = 104857600/1280 = 81920 ticks;

Carl

#83
Quote from: jamespetts on August 21, 2011, 12:00:47 AM
I have also pushed some changes to remove bugs and increase accuracy in the calculation of departure/loading/reversing/journey/waiting times; I should be grateful if people could re-test.

For the most part everything seems to be running like clockwork. Just two issues to report:

Firstly, although almost all of the new point-to-point journey times seem to be spot on, in my test game I've found two isolated cases where they cannot possibly be right. While it may seem obtuse to get too worried about a couple of isolated cases, I'm reporting them in case they're symptomatic of some broader error. I think the problem may be related to waypoints.

Here's a savegame for demonstration: http://dl.dropbox.com/u/61716/Balkansnewtesting.sve (requires the previously-uploaded addons folder).

The displayed journey time from Cegled to Budapest Nagy is just 16 minutes for a 66km journey. This would require a point-to-point average speed of around 250kph, but the vehicles on this route have a top speed of only 130kph. This error occurs at only one other place on the map that I can find -- the journey from Pusztaszabolcs to Budapest Rakoczi. What the two cases have in common is that both lines visit a waypoint between the two named stations. Perhaps the presence of the waypoint is interfering with the correct calculation of point-to-point average speed.

Edit: Here's a toy map which I think confirms my suspicion here: http://dl.dropbox.com/u/61716/waypointtoy.sve
Journey time from A to B (without waypoint) - 26 mins
Journey time from B to A (with waypoint approx halfway) -- 14 mins

Edit 2: Looks like this toy map might have uncovered another bug. Check out the vehicle's behaviour when it passes the level crossing going eastbound. It slows down to 16kph and won't speed up again until it reaches the waypoint. This doesn't occur when going westbound. This is very reminiscent of the bug where road vehicles won't go faster than 16kph at certain distance-per-tile values.

---

Secondly, a very minor aesthetic request. Currently when a convoy is waiting for over an hour it displays a loading time of (for example) "1:3:15". Would it be possible to reformat this so it reads "1:03:15", i.e. with an extra zero in the minutes column?

jamespetts

Carl,

thank you very much for those reports. I have fixed those errors - would you mind re-testing? I have also added the leading zero before the minutes when there are hours - thank you for that suggestion.

Inkelyad,

I have added this comment as suggested; thank you for the suggestion.
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.

Carl

Those bugs all seem to be fixed now -- thanks very much! As far as I can see, everything seems to be working swimmingly now with journey times, loading times, reversing times, etc.

wlindley

OK I got past the error by changing the last line of config.default to:

FLAGS = -DNDEBUG -fpermissive

And I successfully switched to the 10.x branch --

$ git branch -a
$ git checkout remotes/origin/10.x


Everything compiles now, and runs my existing pak128.Britain savegames... everything looks good so far, thanks folks!

Is it correct that  $ git pull will keep me up to date, like svn update would on Subversion?  (Still struggling to convert my mindset from svn... we have come a long way from rcs.)  Maybe we can add those few bits into the header topic of this thread, or is there a wiki page I should edit...

jamespetts

Glad that it works for you! I'd not considered maintaining our own Git documentation here - is it not enough to refer to Git's own documentation? However, Git Pull is not enough, since you will have to pull and then merge with your local copy.
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.

Junna

Are we likely to get a release today, then, as things are looking rather well?

jamespetts

I'm running out of time to-day, I'm afraid, as I have some work to do for Monday; also, I'd like to make sure that the Nettool issue is fixed before release. However, I am anticipating a release within a week if all goes well.
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.

inkelyad

#90
Quote from: carlbaker on August 21, 2011, 01:04:34 PM
Those bugs all seem to be fixed now -- thanks very much! As far as I can see, everything seems to be working swimmingly now with journey times, loading times, reversing times, etc.
Not so fast.

1) See spacing savegame. It is convoy with 1cnv/month spacing and zero shift. But it departs not at 00:00.
Difference is small, but it exists.

2) See waiting savegame. Now it is plain old 'wait for 1/32 month'. In current timescale it is 6:00. Reversing time is about 2:30. So convoy must leave station in 6:00minutes after arrival. But it wait about 2:00 more.

EDIT:
James, can you comment on reverse-related variables?

bool reversable;
bool reversed;


jamespetts

Inkelyad,

thank you very much for your reports. I think that I have fixed the second problem (please re-test), but the first is more illusive: it is not clear to me at present what is causing it (I can reproduce it, however). It seems to be a relatively minor problem (especially if all spacing shifts are off by exactly the same amount). Do you have any idea what might be behind it?
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.

wlindley

A little git help please.  I have googled and googled this, read the O'Reilly git book, and tried to figure what's going on, but I am more confused more now than ever.  'git pull' does nothing.  It all seems to start with this problem:

$ git status
# Not currently on any branch.
nothing to commit (working directory clean)
$


OK so apparently I wound up in "detached HEAD" state.  This returns me to the 'master' branch:

$ git checkout master
Previous HEAD position was 5e66af2... CODE: Minor formatting changes.
Switched to branch 'master'
$ git status
# On branch master
nothing to commit (working directory clean)


OK. Now I want to go to the 10.x branch, so let's verify where I am going:

$ git branch -r
  origin/10.x
  origin/8.x
  origin/9.x
  origin/HEAD -> origin/master
...


Alright, there it is.  Let's switch to it:

$ git checkout origin/10.x
Note: checking out 'origin/10.x'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 5e66af2... CODE: Minor formatting changes.
$ git status
# Not currently on any branch.
nothing to commit (working directory clean)


Aaaaarrrrrrghhhh...  I listed the remote branches, and tried to switch to one, but it didn't!!! Why don't I get "On branch origin/10.x" instead of "Not currently on any branch" ...? 

(bashing head against desk)



Carl

#93
I've found a crash on the 10.x branch.


FATAL ERROR:
array_tpl<T>::[]
index out of bounds: -1
not in 0..3, T=class
vehikel_t *


This crash is tied to a particular vehicle, as demonstrated in the following savegame: http://dl.dropbox.com/u/61716/NewCrash1.sve. The addons folder (which has been updated since I last uploaded a save) is here: http://dl.dropbox.com/u/61716/carladdons4.rar.

Upon loading the game you'll see a train leave a depot. When it arrives at the station, the game will crash. Some bullet points:

-- The crash doesn't occur under the same conditions in 9.12.
-- The crash only occurs with this type of vehicle, and only when the train is formed of one car. When it's formed of two or more cars the crash won't occur.
-- The vehicle in question is one I've made myself, but since this crash doesn't occur in 9.12 I'm hoping that the trouble isn't *entirely* down to my lack of techincal nous.  :)


(Edited to upload a simpler savegame so as to make it easier to isolate the effect)

Milko

Hi

If you can help I have compiled the simutrans experimental (update 24/08/2011) using Mingw.
The file is compiled for windows and you can download at this address.

http://simutrans-germany.com/files/upload/simutrans-experimental_20110824.zip

More information on how I compile it using mingw can be found in this thread.

http://forum.simutrans.com/index.php?topic=6512.0

Giuseppe

jamespetts

Carl,

I think that I have fixed the crash - do you want to re-test? Thank you for the report.
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.

Carl

Thanks James, that's fixed now.

Just wanted to note a change since the last time I compiled. Previously vehicles on lines with convoy spacing would display how long they were waiting, like so:



Now, however, the "time left" is gone and the vehicles just say "Loading":



Was this change intentional? The "Time left" information is very useful, so if it were possible to have that feature reinstated I'd be grateful.

Milko

Hello

both pieces of information seem interesting ... you can leave them both, or line becomes too long?

Giuseppe

Milko

Hello

I have compiled "experimental simutrans 10.0" (github updated 24/08), I downloaded the 0.4.9 pak96c to prove it. Launching the game I get the error reported in this thread: http://forum.simutrans.com/index.php?topic=7711.msg75000; topicseen # msg75000.
But I tried with the version "9.12" and the game started without any problems ...

Giuseppe

Carl

Quote from: Milko on August 26, 2011, 12:56:06 PM
Hello

both pieces of information seem interesting ... you can leave them both, or line becomes too long?

Giuseppe
I agree in prinicple, but if only one piece of information can be displayed in practice then (IMO) it should be the "time left". The loading level can be easily determined by clicking on the convoy and seeing how many people are on-board. The "time left" is much harder to calculate this way in many cases.

dustNbone

+1 on this.  Loading time left seems more valuable to have at a glance.

Dustin

Milko

Hello

I have this problem in the goods list

the names are duplicates of the goods and the revenue is no longer visible

second problem: in the version "9.12" changing the value of the speed bonus (timeline on) did not change the revenue obtained by transporting the good, correct? I could not see what happens with version "10.0".

Giuseppe

jamespetts

#102
Giuseppe,

thank you for the report on the goods list problem. I have fixed that, and also added a little more functionality to the goods list. I should be grateful if you could re-test.

As to the loading times issue: this is an error, not an intended feature, which I shall look into fixing. Edit: Fixed - please re-test. Thank you for the report!
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.

Carl

The loading times issue appears to be fixed -- many thanks once again, James!

jamespetts

Thank you for re-testing! Glad that it's fixed.
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.