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

0 Members and 1 Guest are viewing this topic.

Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #70 on: February 21, 2017, 02:35:14 PM »
Here is a new release of One-way Two-lane fun patch, OTRP ver5.

This time, the code patch is simutrans nightly r8112 based, so the patch can be easily integrated to the nightly trunk. However, I made the executable binaries and their base is 120.2 stable. This is just for stability because some users in Japan use this patch for playing purpose. Of course you can make a nightly based binary by compiling the nightly based patch.
I also started sharing the git repository. https://github.com/teamhimeh/simutrans/tree/OTRP-S

The patch is attached to this post.
All executable binaries are 120.2 stable based. If you need a nightly based one, please compile by yourself.
:Simutrans:
For Windows: https://drive.google.com/open?id=0B_rSte9xAhLDeDVJdnZKSFEzQnM
For Mac: https://drive.google.com/file/d/0B_rSte9xAhLDd2JmYW84WGNWQ2s/view
:makeobj:
For Windows: https://drive.google.com/open?id=0B_rSte9xAhLDN3hmUHpQVTZLVEE
For Mac: https://drive.google.com/file/d/0B_rSte9xAhLDRW51ei05NkUwTW8/view

The biggest change is that overtaking by the relaxed condition is now available only on roads made for this patch! On conventional roads, only overtaking by the stricter condition is allowed. To enable one-way overtaking, add
Code: [Select]
overtaking_info=0to the .dat file.
Note: Way add-ons made by the makeobj of this extension cannot be used for simutrans standard.
Roads have a flag, overtaking_info, which indicates the condition of overtaking.

0 = Condition for one-way road
1 = Condition for two-way road (similar to the condition of current simutrans. This condition is automatically applied to conventional roads.)
2 = Overtaking only a stopping vehicle is allowed.
3 = Overtaking is completely forbidden.

This change is needed to prevent the inappropriate overtaking I explained in a past post. Also, this is for compatibility with current simutrans standard. With only the pakset of simutrans standard, this release makes no difference between simutrans standard.

The issue list of One-way Two-lane road patch
  • Following the latest code. (solved.)
  • Cars on the left lane enter the right roads crossing over vehicles. (will be solved in the next release.)
  • The new conditions for city cars should be written. (still in working.)
  • Sometimes a queue of stationary traffic still forms behind a stopped vehicle. (still in a research.)
  • On 2-lane road, there are inappropriate overtaking when waiting for a red signal. (solved.)
  • Traffic jam occurs due to lane crossing. (new!)

In this release, I wrote a partial solution of the crossing over problem. As a result, traffic jam occurs due to lane crossing. (See fig1.jpg.) This is because vehicles do not consider their course when starting overtaking. In real road, drivers consider their course when they choose lane.
« Last Edit: February 23, 2017, 02:52:39 PM by THLeaderH »

Offline sheldon_cooper

Re: One-way Two-lane road Fun Patch
« Reply #71 on: February 21, 2017, 11:18:43 PM »
Hi, I do not know how to compile the patch file and make an exe. Ready to ride. It would be like making it available, just like you with simwin_OTRP3.??
Thanks in advance for your attention and congratulations to the work.
 :)

Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #72 on: February 22, 2017, 12:42:38 AM »
@sheldon_cooper

Welcome to One-way Two-lane road fun patch!

If you are a Windows or Mac user, you don't have to compile the code to test it. Just download executable binaries from the URLs. Put sim.exe/sim into your simutrans folder. Don't forget to backup all of your pak and sve files before starting the test.
To test the feature of this extension, roads made for this patch (The flag "overtaking_info" is contained.) are needed. To make them, use the makeobj provided from the URLs.

If you are Linux or other OS user, you have to compile the code. First, download the r8112 simutrans nightly code and apply the patch to the code using patch command. Then, compile as usual.

Offline sheldon_cooper

Re: One-way Two-lane road Fun Patch
« Reply #73 on: February 22, 2017, 02:49:49 AM »
I did what you mentioned, however is giving an error that I can not fix '' The program can not start because this missing libgcc_s_dw2-1.dll ''  ???
What I wanted is that you already added sim.exe to download, just like you did here:

Code: [Select]
[quote author=THLeaderH link=topic=16659.msg159197#msg159197 date=1486878691]
Here is a new release of One-way Two-lane road patch!
The patch file is attached as OTRP3.patch.
For Windows: [url=http://www.filedropper.com/simwinotrp3]http://www.filedropper.com/simwinotrp3[/url]
For Mac: [url=http://www.filedropper.com/simmacotrp3]http://www.filedropper.com/simmacotrp3[/url]
[/quote]
I know it should give more work and for that I'm sorry, but I would be very grateful!
 :)

Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #74 on: February 22, 2017, 02:54:05 AM »
Please download libgcc_s_dw2-1.dll from here. Then put the dll at the same directory with sim.exe.
Generally, when you lack of dll files, you can solve it by putting dlls at the same directory with sim.exe.



Hey, everyone. SOLUTIONS ARE WANTED!
https://twitter.com/teamhimeH/status/834335248628359168
« Last Edit: February 22, 2017, 07:41:29 PM by Isaac.Eiland-Hall »

Offline sheldon_cooper

Re: One-way Two-lane road Fun Patch
« Reply #75 on: February 22, 2017, 11:47:11 PM »
Now it's missing libstdc++-6.dll, where can I find this?

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2594
  • Total likes: 290
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: One-way Two-lane road Fun Patch
« Reply #76 on: February 23, 2017, 12:10:07 AM »
@THLeaderH
I think you should recompile with static linking.

Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #77 on: February 23, 2017, 02:47:05 AM »
Sorry for your inconvenience.
Dll files can be easily found by just googling. There are web sites which provide dll files one by one.

Quote
@THLeaderH
I think you should recompile with static linking.

Actually, I compiled with static linking with a configuration in default.in, but this time, I directly wrote
Code: [Select]
LDFLAGS += -static -static-libgcc -static-libstdc++into Makefile, and recompiled them.
I uploaded a recompiled version for Windows. Please try and give me a report if it failed again!

Simutrans:https://drive.google.com/open?id=0B_rSte9xAhLDeDVJdnZKSFEzQnM
makeobj:https://drive.google.com/open?id=0B_rSte9xAhLDN3hmUHpQVTZLVEE
« Last Edit: February 23, 2017, 02:09:09 PM by THLeaderH »

Offline Andyh

Re: One-way Two-lane road Fun Patch
« Reply #78 on: February 23, 2017, 05:02:47 AM »
Question: Does the new version patch also apply to city cars or still just to player vehicles?

Thanks


Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #79 on: February 23, 2017, 05:05:13 AM »
Quote
Question: Does the new version patch also apply to city cars or still just to player vehicles?
still just to player vehicles.

Offline sheldon_cooper

Re: One-way Two-lane road Fun Patch
« Reply #80 on: February 24, 2017, 12:22:40 AM »
I am trying to compile, I do not know if this is correct because I do not understand anything about this subject, no more error appears, however, this appears this:  ???
image hosting site
Sorry for my doubts, as I said, I do not know how to sim.exe like you did. Thank you for your attention. :)

Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #81 on: February 24, 2017, 03:14:22 AM »
I think this is correct. Can't you make pak files?

Online prissi

  • Developer
  • Administrator
  • *
  • Posts: 8821
  • Total likes: 322
  • Helpful: 229
  • Languages: De,EN,JP
Re: One-way Two-lane road Fun Patch
« Reply #82 on: February 24, 2017, 05:16:44 AM »
I still think this decision of one way or not needs to come from a wayobj, which at the same time also modifies the road to enforce single direction. Or a ned modified waybuilder, which only build one way ribis on one way roads. But that is probably even more hackisch.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2594
  • Total likes: 290
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: One-way Two-lane road Fun Patch
« Reply #83 on: February 24, 2017, 05:57:55 PM »
That's a good idea, this way you don't need to duplicate graphics and gives liberty to use the way as the player wishes.

Offline Yona-TYT

Re: One-way Two-lane road Fun Patch
« Reply #84 on: February 24, 2017, 07:17:58 PM »
I think this should be on "Larger Projects".

Offline IgorEliezer

  • Devotee
  • Administrator
  • *
  • Posts: 3952
  • Total likes: 145
  • Helpful: 71
  • Lost In Stupid Parenthesis
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: One-way Two-lane road Fun Patch
« Reply #85 on: February 24, 2017, 09:52:42 PM »
I think this should be on "Larger Projects".
Done. :)

Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #86 on: February 25, 2017, 02:16:36 AM »
Quote
I still think this decision of one way or not needs to come from a wayobj, which at the same time also modifies the road to enforce single direction. Or a ned modified waybuilder, which only build one way ribis on one way roads. But that is probably even more hackisch.
Dragging like electric wire on road to give one way ribis can be possible. However, I think some problems remains on this way.
  • Players cannot easily see whether the road has one way ribis or not. It is similar to railway signals without any images (completely transparent). If any images are given to one way ribis, it must look ugly. In my code, this difference can be easily seen as the difference of wayobj.
  • In my code, overtaking_info consists of four conditions. Giving ribis solution can only distinguish "One-way" or "Two-way". How can I give roads "Overtake only a loading convoi" or "Overtaking is completely forbidden" conditions?

Offline Manche

  • *
  • Posts: 33
  • Total likes: 24
  • Helpful: 0
  • Simutrans is my life, Simutrans is my concept.
  • Languages: JP,EN
Re: One-way Two-lane road Fun Patch
« Reply #87 on: February 25, 2017, 03:14:29 AM »
I think from THLeaderH's post on twitter, I write some idea here.

1.way-object(ex electric overhead wire)
I think expression method become narrow.
way-obj is way-obj. should stop at scope of it. And I don't know how to become graphic is. like cursor on the road?

2.way addon(ex dat file source)
I think this is good. but players can't identify, two-lane or not.

3.roadsign(ex one way sign)
I think this is so good. two-lane sign is used for two-lane. players can understand 'yes, this is used for two-lane!'.
if make two-lane roadsign combo with one-way sign, one click and make two-lane and one-way.
simutrans is much easy to play, isn't it?
Japanese veteran simutrans player.
I'm played from 2004.
In Japanese, "Manche" is spelled "まんけぇ".
Sometimes provide translation text, addons.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2594
  • Total likes: 290
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: One-way Two-lane road Fun Patch
« Reply #88 on: February 25, 2017, 03:52:11 AM »
Dragging like electric wire on road to give one way ribis can be possible. However, I think some problems remains on this way.
  • Players cannot easily see whether the road has one way ribis or not. It is similar to railway signals without any images (completely transparent). If any images are given to one way ribis, it must look ugly. In my code, this difference can be easily seen as the difference of wayobj.
  • In my code, overtaking_info consists of four conditions. Giving ribis solution can only distinguish "One-way" or "Two-way". How can I give roads "Overtake only a loading convoi" or "Overtaking is completely forbidden" conditions?
The ribi solution was one idea, the wayobj was another. You can either have both or only one or none.

IHMO I like you solution where you don't use ribis, but the wayobj is a good idea. As I said above, this won't require duplicated graphics and will give more liberty to the player.

Way-objs have the exact same number of images of a way so you can draw anything, like arrows on the ground. Or arrows only in the beginning and end. Or any other overlay you wish to give a visual hint.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4864
  • Total likes: 202
  • Helpful: 108
  • Languages: EN, NO
Re: One-way Two-lane road Fun Patch
« Reply #89 on: February 25, 2017, 08:30:55 AM »
3.roadsign(ex one way sign)
I think this is so good. two-lane sign is used for two-lane. players can understand 'yes, this is used for two-lane!'.
if make two-lane roadsign combo with one-way sign, one click and make two-lane and one-way.
simutrans is much easy to play, isn't it?

Two major problems:
  • Signs only affect the tile they are on. Trying to extend the range of signs can easily become a mess as roads are built, removed and joined.
  • It would be nice to see if a road is one-way without having to find the single sign at the end, or having signs at every tile.

Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #90 on: February 25, 2017, 10:54:20 AM »
Here is a new release of One-way Two-lane fun patch, OTRP ver6.

This time, the code patch is simutrans nightly r8117 based, and the patch can be easily integrated to the nightly trunk. Executable binaries are 120.2 stable based for stability - this is same as the previous release. Of course you can make a nightly based binary by compiling the nightly based patch.
Source code can be seen on git. https://github.com/teamhimeh/simutrans/tree/OTRP-S
branch
OTRP-S : working branch (120.2 based)
master-S : nightly-based branch for making patch

The patch is attached to this post.
All executable binaries are 120.2 stable based. If you need a nightly based one, please compile by yourself.
~Executable Files~
:Simutrans:
For Windows: https://drive.google.com/open?id=0B_rSte9xAhLDTlcwV1lNU0dwcTQ
For Mac: https://drive.google.com/open?id=0B_rSte9xAhLDWlhOY1pqSHV2alE
:makeobj:(These are same as the previous version, ver5.)
For Windows: https://drive.google.com/open?id=0B_rSte9xAhLDN3hmUHpQVTZLVEE
For Mac: https://drive.google.com/file/d/0B_rSte9xAhLDRW51ei05NkUwTW8/view

<Change List>
  • Traffic jam on lane crossing point was relaxed by changing tile entering control.
  • Vehicles which merge from the passing lane side will go on passing lane to reduce lane crossing. See https://twitter.com/teamhimeH/status/835354673699696641
  • The Condition of overtaking can be seen in the way information window.
  • Overtaking_info=4 was implemented. This condition prohibits going on traffic lane and forces to go on passing lane. I don't know why this condition is needed, but this is a request from Japanese simutrans players. According to them, this condition is required to make more realistic highway addon. See https://twitter.com/teamhimeH/status/835398973225488386
There is no change in makeobj.

The issue list of One-way Two-lane road patch
  • Following the latest code. (solved.)
  • Cars on the left lane enter the right roads crossing over vehicles. (will be solved in the next release. in research.)
  • The new conditions for city cars should be written. (still in working.)
  • Sometimes a queue of stationary traffic still forms behind a stopped vehicle. (still in a research.)
  • On 2-lane road, there are inappropriate overtaking when waiting for a red signal. (solved.)
  • Traffic jam occurs due to lane crossing. (not solved, but relaxed. still in working.)

Any bug reports and ideas for improvement are welcome!
« Last Edit: February 25, 2017, 04:09:01 PM by THLeaderH »

Offline sheldon_cooper

Re: One-way Two-lane road Fun Patch
« Reply #91 on: February 25, 2017, 04:47:11 PM »
Does not the relaxed overtaking condition apply to conventional roads stop this patch?


Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2594
  • Total likes: 290
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: One-way Two-lane road Fun Patch
« Reply #92 on: February 25, 2017, 05:01:16 PM »
The only problem I could think now about a way-obj for setting the overtaking rules would be the problem of trying to have a one-way road with electrification. You can only have one way-obj at the road.

Does not the relaxed overtaking condition apply to conventional roads stop this patch?
No, current road paks use the default stricter rules.

Offline sheldon_cooper

Re: One-way Two-lane road Fun Patch
« Reply #93 on: February 25, 2017, 05:24:57 PM »
But in the OTRP3 patch the overtaking conditions were relaxed for convetional roads, now it seems more rigid.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2594
  • Total likes: 290
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: One-way Two-lane road Fun Patch
« Reply #94 on: February 25, 2017, 08:50:46 PM »
Version 3 was a proof of concept to see how the relaxed overtaking can work. V4 has expanded to multiple possibilities and aligned to correct behaviour, so old saves and paksets can still work as they should.

Offline isidoro

Re: One-way Two-lane road Fun Patch
« Reply #95 on: February 26, 2017, 12:46:00 PM »
After sleeping after a good session of mahjong (fun, but the winds weren't in favor), I came to an idea (you know that mind works better while sleeping, which is something that says much about human beings):

If sometimes the problem is that an overtaking vehicle is stuck by an slower overtaking vehicle in front of it, the question is:
Quote
Can a overtaking vehicle overtake another overtaking vehicle?

Of course that for this to work, the possibility of, say, four, six,... lane roads must exist.  And this is just perhaps killing for this patch.  But the point is, whatever the solution you choose to implement this, keep in mind to choose one that make things easier if this other patch is ever tried.

Some ideas:
  • If you see the attached picture, one of the problem of multi-lane roads is diagonals.  Tiles B1, C2 and D3 in the picture.  All other configurations are already in the game.
  • Only two such configurations are needed to up and right and to up and left.  Now if you try to do something like that, those configurations are drawn as normal 4-way crossings.
  • The "overtaking status" must depend on the route of the vehicle, not on some properties attached to the specific road tile.  Overtaking_info=4 is a good example of a not so good idea to me.  The vehicles should see that they are going to make a transition and turn left and decide automatically to keep in the overtaking lane and not returning to the right lane for the moment.
  • The blue lines in tile B1 forces us to expand the status of overtaking in a certain tile: 0-not overtaking,  1-normal overtaking,  2-double overtaking,  3-triple overtaking.  When the blue is in state 2 in tile B1 and enters tile B2, it automatically changes to state 0.
The aesthetic look of this patch is just amazing.  Just imagine what would it be to have multi-lane roads inside cities.

Offline Yona-TYT

Re: One-way Two-lane road Fun Patch
« Reply #96 on: February 26, 2017, 02:32:48 PM »
With this patch is sought to improve diagonal pathways, it hurts that it is never completed.  :-[
http://forum.simutrans.com/index.php?topic=14275.0

Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #97 on: February 26, 2017, 03:28:13 PM »
Isidoro's idea is a very important step to realize N-lane road. (N>=3)
However, there is too many things to consider and interpret to realize multi-lane roads. My spring vacation of the university is till the end of March, which means I only have one month to complete this patch and have this integrated to simutrans standard or extended. From April, I'll be very busy and the patch will never be completed.
N-lane roads is my dream. And I know that my code will do nothing when multi-lane roads are realized. But I concentrate on making two-lane roads come to simutrans. I want to make this project be at least "it is no problem to integrate to simutrans standard" by the end of this spring vacation.

Offline fam621

Re: One-way Two-lane road Fun Patch
« Reply #98 on: February 26, 2017, 04:35:29 PM »
Does this patch work in the latest development version of Simutrans Extended? :)

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15855
  • Total likes: 407
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: One-way Two-lane road Fun Patch
« Reply #99 on: February 26, 2017, 04:48:11 PM »
Somebody would have to incorporate it into the code - I do not know whether there would be any conflicts.
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 fam621

Re: One-way Two-lane road Fun Patch
« Reply #100 on: February 26, 2017, 05:57:20 PM »
Ok.

Offline sheldon_cooper

Re: One-way Two-lane road Fun Patch
« Reply #101 on: February 27, 2017, 12:29:40 AM »
Version 3 was a proof of concept to see how the relaxed overtaking can work. V4 has expanded to multiple possibilities and aligned to correct behaviour, so old saves and paksets can still work as they should.

I still use simwin_OTRP3 as a more useful way (at least for me) to use conventional roads and help with the locomotion of vehicles, especially in areas where there are more vehicles, as shown in this video:

Online THLeaderH

Re: One-way Two-lane road Fun Patch
« Reply #102 on: February 27, 2017, 01:37:08 AM »
Quote
Somebody would have to incorporate it into the code - I do not know whether there would be any conflicts.
Perhaps I would be able to solve the conflicts.

Quote
I still use simwin_OTRP3 as a more useful way (at least for me) to use conventional roads and help with the locomotion of vehicles, especially in areas where there are more vehicles, as shown in this video:
Adding overtaking_info flag and prohibiting one-way overtaking on conventional roads were inevitable because V3 shows inappropriate overtaking at a crossing of two-way road with signal. Also, it was a solution to keep compatibility with current simutrans standard. Think, once you updated the version, and all vehicles start one-way overtaking. This must brake game balance and this can even brake save data.
From V5, you can enjoy one-way overtaking just by re-paking road addons. On re-paked roads, vehicles behave same as in V3, no, better than in V3.
« Last Edit: February 27, 2017, 01:53:00 AM by THLeaderH »

Offline sheldon_cooper

Re: One-way Two-lane road Fun Patch
« Reply #103 on: February 27, 2017, 04:24:42 AM »
'' Re-paked roads '' what would it be ?? Are specific roads only for this type of overtaking shown in the video above?

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15855
  • Total likes: 407
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: One-way Two-lane road Fun Patch
« Reply #104 on: February 27, 2017, 01:30:44 PM »
Perhaps I would be able to solve the conflicts.

If you would be interested in integrating your patch into Simutrans-Extended, that would be most worthwhile. I have been watching this topic with some interest, but have been too busy with other things (i.e. finishing rescaling the 'buses and after that fixing bugs) to do anything substantive about it at this stage, and I imagined that it might well be integrated into Standard before long so that I could add it when I merge from Standard in the usual way (these days, manually).
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.