News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

One-way Two-lane road Fun Patch

Started by THLeaderH, February 06, 2017, 02:04:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

#70
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
overtaking_info=0
to 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.

sheldon_cooper

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.
:)

THLeaderH

@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.

sheldon_cooper

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:

[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!
:)

THLeaderH

#74
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

sheldon_cooper

Now it's missing libstdc++-6.dll, where can I find this?

An_dz

@THLeaderH
I think you should recompile with static linking.

THLeaderH

#77
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
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

Andyh

Question: Does the new version patch also apply to city cars or still just to player vehicles?

Thanks


THLeaderH

QuoteQuestion: Does the new version patch also apply to city cars or still just to player vehicles?
still just to player vehicles.

sheldon_cooper

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. :)

THLeaderH

I think this is correct. Can't you make pak files?

prissi

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.

An_dz

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.

Yona-TYT

I think this should be on "Larger Projects".


THLeaderH

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?

Manche

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?
Ye, Olde, simutrans Player, from 2004.
In Japanese, "Manche" is spelled "まんちぇ".
Sometimes provide translation and addons.

Discord: MancheHeckens#4830

An_dz

Quote from: THLeaderH on February 25, 2017, 02:16:36 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.

Ters

Quote from: Manche on February 25, 2017, 03:14:29 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.

THLeaderH

#90
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!

sheldon_cooper

Does not the relaxed overtaking condition apply to conventional roads stop this patch?


An_dz

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.

Quote from: sheldon_cooper on February 25, 2017, 04:47:11 PM
Does not the relaxed overtaking condition apply to conventional roads stop this patch?
No, current road paks use the default stricter rules.

sheldon_cooper

But in the OTRP3 patch the overtaking conditions were relaxed for convetional roads, now it seems more rigid.

An_dz

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.

isidoro

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.

Yona-TYT

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

THLeaderH

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.

fam621

Does this patch work in the latest development version of Simutrans Extended? :)

jamespetts

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.


sheldon_cooper

Quote from: An_dz 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.

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:
[vimeo]https://vimeo.com/205815004[/vimeo]

THLeaderH

#102
QuoteSomebody 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.

QuoteI 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.

sheldon_cooper

'' Re-paked roads '' what would it be ?? Are specific roads only for this type of overtaking shown in the video above?

jamespetts

Quote from: THLeaderH on February 27, 2017, 01:37:08 AM
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.