Author Topic: One-way Two-lane road Fun Patch  (Read 26427 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #280 on: October 11, 2017, 02:06:29 PM »
This is a minor update of One-way Two-lane Road Patch, OTRP ver12_3.
This time, the patch file and the executable binaries are simutrans nightly r8301 based, and the patch can be easily integrated to the nightly trunk.
Source code can be seen on git. https://github.com/teamhimeh/simutrans/tree/OTRP

patch:https://drive.google.com/open?id=0B_rSte9xAhLDampoVkdsdE45NFE (This does not include Ribi-Arrow patch.)
~Executable Files~
:simutrans: (The executable binaries include Ribi-arrow patch. Ribi-arrow pak is required. Please download from here and put it into your pakset.)
win:https://drive.google.com/open?id=0B_rSte9xAhLDTnFFanBNeDMzVmM

To use ribi-arrow, add
Code: [Select]
simple_tool[37]=,:into menuconf.tab.
This version can read a save data of ver12.

~How to use this patch~
  • Download ribi-arrow pak and put it into your pakset.
  • Assign an appropriate key to simple tool 37. Add simple_tool[37]=,: into menuconf.tab and you can use ribi-arrow using the colon key.
  • Download an executable file and put it in the directory where simutrans.exe exists.
  • Execute the OTRP file. Please do not overwrite your save data of simutrans standard.

On this version,
  • I did some more fix of the graphic glitch problem.
  • Some duplicated declaration of methods are removed.
  • The issue that overtaking mode selection window sometimes appears is fixed.

I think all bugs I know is now removed. So, I set this version as a candidate for the integration again!
Any bug reports and ideas for improvement are welcome!
« Last Edit: October 14, 2017, 02:16:05 PM by THLeaderH »

Offline THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #281 on: October 14, 2017, 02:14:42 PM »
I found a small but a severe bug - the issue that simutrans often stops by SEGV while loading a game - and fixed it. These are the fixed code and binary.
patch:https://drive.google.com/open?id=0B_rSte9xAhLDNElXMmY4LUFGVXM
binary for windows: https://drive.google.com/open?id=0B_rSte9xAhLDc09PT1phTXphS0U
CHG: simconvoi.cc::L4039

By the way, is anyone doing a code review or something?

Offline TurfIt

Re: One-way Two-lane road Fun Patch
« Reply #282 on: October 15, 2017, 09:16:41 PM »
I think all bugs I know is now removed. So, I set this version as a candidate for the integration again!
Given issues brought up in April are still left unaddressed - hardly...
Logic incomplete and even flagged with TODO's, yet still left.
Road trains driving right through each other.

And then direct request from July ignored - lane fixing/affinity that doesn't seem to do anything at all. Still no example demonstrating correct behavior.

I'd spent 4 weeks with the v11 code. Intended to setup some simple test cases, but got completely bogged in the code instead - can't create a test case for things that make absolutely no sense.
My notes on suspicious code devolve from simply huh's to stuff not fit to post as the WTF'ery factor increases the deeper one looks.  3 weeks later and my mood has not improved.

Since past lists of specific issues were take too literal, no more detailed specifics. I'd suggest reading through the patch file, and the resultant code. Make sure it's complete. Make sure comments make sense, especially after cut'n' paste jobs. Make sure logical conditions make sense, not testing for things already tested for (I even found one testing the same condition in the same if()!). No state changes in query functions (likely the source of my lane fix/affinity issues). Maybe try using this new fangled keyword called 'else'. if(a), if(!a) yeesh. Avoid revenue being affected by traffic conditions - hint lane yielding.

And a quick peek at v12 - refleshing. what? I can't even...




Offline THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #283 on: October 17, 2017, 03:26:00 AM »
TurfIt, I appreciate your spending of 4 weeks for the code review.
You claimed that
  • Lane fixing/affinity that doesn't seem to do anything at all. Still NO example demonstrating correct behavior.
  • Road trains driving right through each other.
but I have never seen these phenomena as long as I use otrp v12_3. I made a demonstrating video.

As you insisted, I'll read through the whole patch file again. Also, I'll deal with the issues you listed here. However, unfortunately, writing on this forum scatters the issue reports in many messages and thread. Even your great advice will be surely buried by other many many posts on this topic. So I enabled the issues feature of GitHub. With the issues feature of GitHub, you can point out exactly where of the code is problem. Also you can always work with the latest code.
You spent no less than 4 weeks to do such a sensitive code inspection. Please write about  anything you doubt, anything you say huh about, anything you find incomplete, and anything you feel wrong as the issues on GitHub instead of scattering bug reports, writing something ironical, posting a vague indication on the forum, and keeping a great amount of your analysis in your private note, even though you think Git should be in a trash bin. Please make your issue posts as concrete as possible. For example of if ~ else, please point out at least 1 line that is malformed.
Please also use pull requests if you need.

The OTRP repository on GitHub is here. Thank you for your cooperation.

Offline Andyh

Re: One-way Two-lane road Fun Patch
« Reply #284 on: November 07, 2017, 03:21:03 AM »
Possible to get this patch implemented, or are we at a complete impasse?  It's a huge improvement over the existing functionality so would hate to see this fail.  I hope we are not making 'the perfect the enemy of the good'.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4894
  • Total likes: 213
  • Helpful: 108
  • Languages: EN, NO
Re: One-way Two-lane road Fun Patch
« Reply #285 on: November 07, 2017, 06:03:35 AM »
It doesn't look like TurfIt is asking for perfection, just saying that applying this patch now will introduce severe bugs and reduce the quality of the code (which in turn affects others people ability or willingness to work with it).

Offline THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #286 on: November 07, 2017, 06:16:27 AM »
There is still no issues posted...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4894
  • Total likes: 213
  • Helpful: 108
  • Languages: EN, NO
Re: One-way Two-lane road Fun Patch
« Reply #287 on: November 07, 2017, 06:31:23 AM »
Simutrans development coordination happens on this forum. We don't use issue trackers.

Offline TurfIt

Re: One-way Two-lane road Fun Patch
« Reply #288 on: November 07, 2017, 05:33:58 PM »
  • Lane fixing/affinity that doesn't seem to do anything at all. Still NO example demonstrating correct behavior.
Yes, I can have a vehicle forced into the passing lane for a while as your latest video shows. As a player, why would I want to do this? And why shouldn't the truck do it itself if required?

In your previous video, I took from a different purpose for this roadsign when selected to the driving lane. I thought the intent of the sign was to prevent a vehicle that's going to exit a highway at the next exit from entering the passing lane and getting stuck there. I can't make this work, but again, why as a player do I have to manually do this?

And, looking at the relevant variables in debug as a vehicle passes a oneway sign with the driving lane selected, absolutely nothing happens. Hence my claim of something broken, or me not understanding what this is actually supposed to be doing. So, thus far I still consider no example of correct behaviour having been provided.


  • Road trains driving right through each other.
but I have never seen these phenomena as long as I use otrp v12_3. I made a demonstrating video.

Example video showing truck driving right through a roadtrain's trailers: https://drive.google.com/open?id=15UnG71GBj8Of7vneVmF3V5pPoVZQ6H9f
Quite easy to create many many anomalies whenever intersections are involved; Also when overtaking mode changes along a vehicles path - the logic just doesn't handle anything but the most simplistic road.

Offline danivenk

Re: One-way Two-lane road Fun Patch
« Reply #289 on: November 09, 2017, 09:01:23 PM »
Today I found out that my OTR simutrans crashes when using R (Rotate). Also my simutrans runs really slow, I don't know if it is the fault of my big map (pak128+addons, 1024x1024\ about 500 convois) or it is the fault of the patch... I use OTR v12.3.2

Offline THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #290 on: November 25, 2017, 03:28:14 PM »
This patch has not been updated for over a month, and I decided to suspend the development.
Still I continue to distribute the binaries and follow the changes of the master brunch, but I cannot go further.
If there is someone who want this feature in simutrans standard, it's someone in this forum that completes this patch, not me.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 16070
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: One-way Two-lane road Fun Patch
« Reply #291 on: November 25, 2017, 03:30:22 PM »
This patch has not been updated for over a month, and I decided to suspend the development.
Still I continue to distribute the binaries and follow the changes of the master brunch, but I cannot go further.
If there is someone who want this feature in simutrans standard, it's someone in this forum that completes this patch, not me.

That is rather a shame. I should be happy to have this in Extended with perhaps a few minor adjustments if you would like to work on that.
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.

Offline sheldon_cooper

Re: One-way Two-lane road Fun Patch
« Reply #292 on: November 26, 2017, 01:24:25 PM »
This patch has not been updated for over a month, and I decided to suspend the development.
Still I continue to distribute the binaries and follow the changes of the master brunch, but I cannot go further.
If there is someone who want this feature in simutrans standard, it's someone in this forum that completes this patch, not me.

I'm sad about it, but thanks for developing such a wonderful and fantastic Patch. Thank you!

Offline Andyh

Re: One-way Two-lane road Fun Patch
« Reply #293 on: Yesterday at 02:20:48 AM »
I'm sad about it, but thanks for developing such a wonderful and fantastic Patch. Thank you!


I agree, but at least we can all now go back to the important things like expunging German from the Simutrans code.

Offline THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #294 on: Yesterday at 07:10:49 AM »
Today I followed the commit of the master brunch and the binary for windows is available.
The repository is r8346 based now.
https://drive.google.com/open?id=15L3AY3wZ_bZuczHZQbRrBPXT2l_4S59E

To understand how to use this patch, please see this post.