leezer3 / OpenBVE

OpenBVE- A free train simulator
http://www.openbve-project.net
277 stars 52 forks source link

[Minor] Late on arrival to origin station #76

Open mperelmuter opened 8 years ago

mperelmuter commented 8 years ago

Sometime between 1.4.1 and 1.5.0.4 it has become possible for the train to arrive late at the first station along the line.

(Screenie: http://imgur.com/CjNhdOe )

Ultimately this is completely inconsequential, but I still thought I'd bring this to your attention. Thanks for the amazing work on the program btw!

leezer3 commented 8 years ago

It's probably related to this fix, which adjusts the starting position in an edge case where trains could get stuck: https://github.com/leezer3/OpenBVE/commit/a956901f9acb19edb6688c6fdb2cf678f11c2dac

Which exact NYC subway route is that one please? Several floating around passing through Hoyt-Schemmerhorn, but I can't see a single stop one starting there.

mperelmuter commented 8 years ago

FWIW I believe I've had the issue on other routes, but since you asked: That's the Court Street shuttle, which ran between 1936 and 1946 to the station which now houses the NY Transit Museum. I wrote the route over the last few months and am planning on releasing it as soon as I put in signalling and a few minor fixes. If you want I can send you a copy for debugging.

leezer3 commented 8 years ago

Please. I haven't seen this on anything I've got, and it provides a useful point of reference if it reproduces reliably at your end.

Anything that you can reproduce this with reliably would do though :) (Feel free to strip out all the objects for example- It'll be something to do with the positioning of the .sta and .stop commands, rather than being anything to do with an object)

mperelmuter commented 8 years ago

I just got around to doing some rudimentary testing and encountered some odd results. I'll describe what I did and what I found:

I tested the R1 on the Court St shuttle, about 10 times. Each time, I arrived late at the first station.

I tested the 81-540 on the Court St shuttle, about 10 times. Each time, I arrived on time.

I tested the R1 on the NYCT-6 line several times. Each time, I arrived late.

I tested the 81-540 on the NYCT-6 line several times. Each time, I arrived late.

I tested the R1 on the NYCT-6 line with the object index removed (in other words, I had a black screen outside the train cab). Each time I arrived late.

I tested the 81-540 on the NYCT-6 line with the object index removed. Each time I arrived on time.

What I suspect is that a feature of some train cabs and some routes (overly large textures? .animated files? IDK) is somehow related to the lateness.

System info: 32-bit Windows 7 Links to download aforementioned stuff: 6 line: http://bvestation.com/download/122 Court St shuttle (requires the 6 and G lines to get all the objects to show up): NYTM Shuttle v1 051716.zip (removed) R1: New York R1 V2.zip 81-540: 81-540.zip

leezer3 commented 8 years ago

Hmm, at a first quick test, I can't reproduce on the Court Street shuttle with either the R1 or the 81-540.

The NYCT 6 line has some rather oversized textures, but if you've tested it without objects, that rather suggests it's not object / texture related.....

On the other hand, if the first frame took over a second to render, it might be possible for the game's internal clock to get out of sync somewhere. (I've already had to implement some nasty hacks to stop the physics engine falling over in this situation, so the game has form on this one)

I'll do some proper digging with the debugger and see if I can see anything majorly suspicious.

marcriera commented 8 years ago

Chashinai Railway's Misaki Line from Hitachiomiya to Tawaramoto (Down - Daytime - Local train 1.csv) with Chashinai 5700 Series Train (8 cars) also suffers from this issue. The train always arrives 1 or 2 seconds late to the first station.

mperelmuter commented 8 years ago

What you said about the first frame taking over a second to render sounds like it might be the problem. On my machine, removing objects from the 6 caused the problem to go away on the 81-540, so rendering sounds like a good place to start looking.

If there's any more debugging or other help I can do please let me know!