Re: Overtaking. Fun patch. Reply #36 – September 17, 2008, 03:37:29 am WOOT! WOOT! WOOT! WOOT! WOOT! WOOT!Simutrans rules! Quote Selected Last Edit: September 17, 2008, 03:43:08 am by IgorTekton
Re: Overtaking. Fun patch. Reply #37 – September 17, 2008, 07:40:37 am @PatrickN:Whats your Problem with the nightly?@AllIt looks wonderfull!!!P.S. I use for the patch-nightly the wrong compiler for windows (gcc4 and not gcc 3), so there are some error in some menüs ...But only in the windows-Version, NOT in the Linux-Version Quote Selected
Re: Overtaking. Fun patch. Reply #38 – September 17, 2008, 09:56:59 pm Quote from: VS – on September 16, 2008, 10:09:33 pmCall me an ungrateful bastard, but when it is finally witnessed in person, the vehicles jumping to opposite lane aren't that much of great show Nevertheless it is important improvement and also another proof that Simutrans liiiiives!That's the problem with too much expectation. At the end, here comes crude reality In fact, there is not much merit behind the patch. The idea is simple: "Overtaking = temporarily drive on the left".Quote from: vilvoh – on September 17, 2008, 12:04:15 amYour wishes are orders for me.....video. [...]Really nice music. Thanks, vilvoh. Quote Selected
Re: Overtaking. Fun patch. Reply #39 – September 17, 2008, 09:58:32 pm But it's really nice that it also works for drive_left=1 !!! Quote Selected
Re: Overtaking. Fun patch. Reply #40 – September 17, 2008, 10:04:02 pm No, thanks to you for this awesome patch..P.S: The music is Highway to hell from AC/DC.... Quote Selected Last Edit: September 17, 2008, 10:06:09 pm by vilvoh
Re: Overtaking. Fun patch. Reply #41 – September 18, 2008, 02:10:48 am Quote from: wernieman – on September 17, 2008, 07:40:37 am@PatrickN:Whats your Problem with the nightly?I didn't have some of the dlls installed. But I have 2022 working now and a bus with a max speed of 140 refuses to pas a bus with a max speed of 30. Quote Selected
Re: Overtaking. Fun patch. Reply #42 – September 18, 2008, 06:25:12 am yust put the dll´s in the simutrans-Direktory ... not installing ;o) Quote Selected
Re: Overtaking. Fun patch. Reply #43 – September 18, 2008, 09:56:41 am My guess the patch was only in 2022-overpatch build, but not in the regular 2022. Quote Selected
Re: Overtaking. Fun patch. Reply #44 – September 18, 2008, 10:00:39 am Otherwise, let me congratule isodoro on a great patch - finally highways on large maps can become reality! Quote Selected
Re: Overtaking. Fun patch. Reply #45 – September 18, 2008, 10:11:01 am Out of curiosity, does this patch mean that a moving vehicle with overtake a stationary one (which has stopped at a bus stop, for example) but which has a higher top speed? E.g. Bus A with topspeed 120 is stopped at a bus stop, is it overtaken by Bus B with topspeed 60 which doesn't stop there? Quote Selected
Re: Overtaking. Fun patch. Reply #46 – September 18, 2008, 10:22:57 am Although I like the patch, there is sadly a bug to report: moving the vehicle, which overtakes, to the left lane is done by moving the picture by a (fixed) offset, which does not respect the zoom of the map. That is, if I zoom out (so that I see large area and all objects look small), the overtaking vehicle rides outside of the road during the overtaking maneuver (its picture is shifted too much). Hope this helps improving it further. Quote Selected
Re: Overtaking. Fun patch. Reply #47 – September 18, 2008, 10:31:50 am IRRC, the patch doesn't allow vehicles to overtake other ones that are stopped.Quote from: isidoro – on September 10, 2008, 02:47:39 amThe speed of the overtaking vehicle is at least 5 kmh over the maximum speed of the overtaken vehicle.....The tiles involved in the overtaking are calculated. For all these tiles, it must happen:No stops, no crossings, no signs, no change in speed limitI guess you should consider this case, Timothy:- bus A stopped (max speed 120)- bus B running (max speed 60)- we suppose that both have different acceleration, power and weight, which means that one accelerates faster than other.- if A starts running while B is overtaking, in theory, if B has more acceleration power, it will probably overtake A. However, if B is worst than A in terms of acceleration, it would be possible that B never overtake A (failed overtake) so you may have two vehicles running by the same way, in the same direction!! The overtaker would try to finish the action, and the overtaken one do not worry about whether to stop, to let the overtaker p**** (like happens in real life)I guess that's why overtaking stopped vehicles has not been implemented... Quote Selected Last Edit: September 18, 2008, 10:34:08 am by vilvoh
Re: Overtaking. Fun patch. Reply #48 – September 18, 2008, 09:31:14 pm Quote from: DirrrtyDirk – on September 17, 2008, 09:58:32 pmBut it's really nice that it also works for drive_left=1 !!!You're right. In fact, the sentence should have been: "Overtaking = temporarily drive on the other side". It works more or less like this: if I get stuck, I check if I may overtake and how long will overtaking take. Once decided, that cannot be changed. So, the vehicle has to be faster than the maximum speed of the overtaken vehicle and there has to be nothing that makes the overtaking vehicle slow down.Similarly, if you have two vehicles of max speed, let's say, 25 kmh one after the other and behind them, one 90 kmh bus, the bus may not overtake even if there is enough room between the two slow vehicles. The reason is that the vehicle in front may brake and reduce that distance. In summary, when a vehicle decides to overtake, overtaking must succeed.Quote from: Timothy – on September 18, 2008, 10:11:01 amOut of curiosity, does this patch mean that a moving vehicle with overtake a stationary one (which has stopped at a bus stop, for example) but which has a higher top speed? E.g. Bus A with topspeed 120 is stopped at a bus stop, is it overtaken by Bus B with topspeed 60 which doesn't stop there?No. For two reasons:Different acceleration, as vilvoh correctly points out. Bus A may start after Bus B has decided to overtake and accelerates quickly and prevents Bus B to successfully complete overtaking. There is no way in the patch to abort an started overtaking process.Overtaking will never take place on a stop, even if neither vehicle is going to stop there. I didn't like the way it looked and is more complicated to program.Quote from: jatypc – on September 18, 2008, 10:00:39 amOtherwise, let me congratule isodoro on a great patch - finally highways on large maps can become reality!Thanks. If the patch is finally decided to be put into trunk, some game strategy may change:One-way roads makes overtaking easier and can make sense in some additional circumstances.Slower vehicles can have longer life-spans. For instance, the horse-carriage 25kmh mail vehicle of pak64 can now be used for locations with little mail without interrupting buses.Quote from: jatypc – on September 18, 2008, 10:22:57 amAlthough I like the patch, there is sadly a bug to report: moving the vehicle, which overtakes, to the left lane is done by moving the picture by a (fixed) offset, which does not respect the zoom of the map. [...]Correct. When copying the offsets used for driving on the left, I noticed that those offsets depended on the zoom factor. I first used the offsets without correction and postponed the correction, but when I checked, it seemed to work!In fact, as you say, it doesn't work when you zoom out, but works when you zoom-in It shouldn't be difficult to correct that. I'll try and see.EDIT: v8 should correct the zoom error. However, I had to touch simgraph16.cc and my instinct tells me that that is not correct perhaps. Let's wait for prissi to see what he thinks. Quote Selected Last Edit: September 18, 2008, 10:36:38 pm by isidoro
Re: Overtaking. Fun patch. Reply #49 – September 19, 2008, 10:45:43 am Should I make a spezial nightly?Ore it is better to wait? Quote Selected
Re: Overtaking. Fun patch. Reply #50 – September 19, 2008, 01:46:13 pm Fair enough then, I was just curious Best still to put stops on such routes into their own little "lay-by" to keep stopping vehicles out of the way of non-stopping ones. Quote Selected
Re: Overtaking. Fun patch. Reply #51 – September 19, 2008, 02:25:51 pm Quote from: isidoro – on September 18, 2008, 09:31:14 pmOvertaking will never take place on a stop, even if neither vehicle is going to stop there. I didn't like the way it looked and is more complicated to program.You have my support.For me, overtaking in bus stops is very dangerous in real life (think of pedestrians), and I suspect in my country overtaking in bus stops is against law too. Quote Selected
Re: Overtaking. Fun patch. Reply #52 – September 19, 2008, 05:07:45 pm Just a curious question: is overtaking supposed to work in tunnels? Thanks. Quote Selected
Re: Overtaking. Fun patch. Reply #53 – September 19, 2008, 09:06:50 pm One comment on stops: One can calculate the acceleration: If a stopped vehicle (only convoi_t can do this) and kW<=mykW && weight>=myWeight then overp****ing can happen.But I will need this weekend to look at it in depth. Quote Selected
Re: Overtaking. Fun patch. Reply #54 – September 22, 2008, 07:18:11 pm @isidoroDo you work on the patch?When yes, I would like to make a new nightly-patch-Version ... Quote Selected
Re: Overtaking. Fun patch. Reply #55 – September 22, 2008, 07:24:23 pm I am currently working. However, my computer tends to freeze periodically without proper reason Therefore integration into trunk will take a little longer. Quote Selected
Re: Overtaking. Fun patch. Reply #56 – September 23, 2008, 02:11:31 am Quote from: wernieman – on September 22, 2008, 07:18:11 pmDo you work on the patch?When yes, I would like to make a new nightly-patch-Version ...Unfortunately, now I lack time. It is in good hands (prissi's). Last version of the patch was v8.Quote from: prissi – on September 22, 2008, 07:24:23 pmI am currently working. However, my computer tends to freeze periodically without proper reason Therefore integration into trunk will take a little longer.If I can be of any help, just tell. Quote Selected
Re: Overtaking. Fun patch. Reply #57 – September 23, 2008, 09:11:59 am Well, I found out that plugging the hard disk into another esata plug solved this. However, it was around 1am, thus this has to be on the backburner for a little longer. Quote Selected
Re: Overtaking. Fun patch. Reply #58 – September 24, 2008, 12:49:22 pm Great add-on guys.Watching vilvoh's video it comes out to me the idea of having oneway highways (made up with signs that already exits on the game) that would have a fast lane (left one) and a slow lane (right one) useful and used just in case of traffic jams or a convoy of slow vehicles. What do you think. Quote Selected
Re: Overtaking. Fun patch. Reply #59 – September 24, 2008, 03:21:52 pm This is something I'm working on at the moment, all it needs are road graphics, appropriate signs and this patch. Quote Selected
Re: Overtaking. Fun patch. Reply #60 – September 24, 2008, 03:50:39 pm One question regarding the calculating max. speeds for overtaking:I have noticed that for a given power and weight of a vehicle, the maximum speed if can achieve is either its maximum speed from its definition or something lower = max. achievable speed (the higher the weight, the lower the achievable speed). For instance, truck with 251 kw power, weight 18t, and load 35t does not go faster than 76 km/h (if you give it an (almost) infinitely long flat road).Could the routine for overtaking work with the maximum achievable speed instead of the nominal ones when comparing vehicles and computing the space needed for overtaking? Please? At the moment, if I have a highway with the same kind of trucks going in all directions, then all empty ones (which could go 110 km/h for instance) are slowed down by the full ones (which go 80 km/h for instance and never more). But the overtaking does not take place, because all of them have the same nominal speed (e.g., 110 km/h). Quote Selected
Re: Overtaking. Fun patch. Reply #61 – September 24, 2008, 04:25:07 pm Quote from: Timothy – on September 24, 2008, 03:21:52 pmThis is something I'm working on at the moment, all it needs are road graphics, appropriate signs and this patch. If I see just citycars using opposite lane as an oneway highways, be sure, I will get absurdly proudly very happy (I hope I continue alive after I see that).I don't ask so much: Seeing citycars using opposite lane would be enough for my happiness as urban planner EVEN... and vehicles (player's ones) may continue using normal lane as always it has been until now (well, almost until now).Timothy, what would this feature be based in? I would have to place signs to make an oneway or there will be a special lane that forces citycars to use opposite lane?It's just my curiosity... Quote Selected Last Edit: September 24, 2008, 04:29:56 pm by IgorTekton
Re: Overtaking. Fun patch. Reply #62 – September 24, 2008, 07:14:54 pm It'll be based on one-way signs, make a road one-way by controlling entry to and exit from it, that way there won't be any opposition to overtaking.Nothing you couldn't do already, just the overtaking patch makes it worthwhile, it's entirely a graphics issue. Quote Selected
Re: Overtaking. Fun patch. Reply #63 – September 26, 2008, 12:50:20 pm And what about attaching 'virtual/hidden' oneway signs to roads tiles, i mean that the game do it automatically in case the road is two lanes, I think it could have the advantage of opening the way not only for highways and freeways but for avenues with same level crossings and possibly maybe roundabouts.Of course all these should have dedicated graphics. In case of highways and avenues a road of 1 tile long and 2 tiles wide, and in case of highways with hidden oneway signs on three out of four sides (one on the side in-between the two tiles just to forbidden same level crossing to the opposite way) and in case of avenues with hidden oneway signs on two out of four sides (to allow same level crossing to the opposite way). In case of roundabouts should be a minimum number of tiles of 3 long and 3 wide circle to allow same level crossing of four two-ways roads. Quote Selected Last Edit: September 26, 2008, 01:44:27 pm by Brunel
Re: Overtaking. Fun patch. Reply #64 – September 26, 2008, 02:50:03 pm The oneway signs actually do exactly this. Quote Selected
Re: Overtaking. Fun patch. Reply #65 – September 26, 2008, 10:48:14 pm It's possible to make dual lane highways already, one going for example, North, the other going South. It's the overtaking that is really needed. Quote Selected
Re: Overtaking. Fun patch. Reply #66 – September 27, 2008, 04:41:29 pm wow, this looks to be a giant leap forward in roads!!!!in any meaning, ihihihihih Quote Selected
Re: Overtaking. Fun patch. Reply #67 – September 28, 2008, 01:49:59 am I've just seen that overtaking is in trunk (r2037). Thanks, Prissi. I've quickly seen some of the improvements and to devise them would have taken me ages for sure. When I look at them closely, I will ask what I don't understand if you don't mind. One minor detail: gcc says that variable gr_last in vehicle/simverkehr.cc:893 is defined but not used. Probably used for a test?Quote from: jatypc – on September 19, 2008, 05:07:45 pmJust a curious question: is overtaking supposed to work in tunnels? Thanks.To be honest, I haven't answered that before because I didn't know... So, I went empirical and tried the new version with the attached savegame and overtaking works with bridges and tunnels, even at the entrance/exit.Quote from: jatypc – on September 24, 2008, 03:50:39 pm[...]Could the routine for overtaking work with the maximum achievable speed instead of the nominal ones when comparing vehicles and computing the space needed for overtaking? Please? [...] Again, my ignorance is certainly unlimited. Although if that speed could be efficiently calculated, it would only mean a substitution in one line of the overtaking code. Question apart is if that is desired/realistic.When I started the patch, I named it a "fun patch", meaning it was nothing serious. Now, I can say it has really been *FUN* to develop it. Thanks, guys. Quote Selected
Re: Overtaking. Fun patch. Reply #68 – September 28, 2008, 11:17:07 am Well, the routine can be surely improved for convois. Citycars take already nearly their maximum speed.Saveing/loading will not work yet ... and some other stuff is not fully finished. But I felt like I had to release it (actually spend most of the week debugging citycars on bridges and using as less CPU as possible.) Quote Selected
Re: Overtaking. Fun patch. Reply #69 – September 29, 2008, 08:37:52 am Quote from: isidoro – on September 28, 2008, 01:49:59 amAlthough if that speed could be efficiently calculated, it would only mean a substitution in one line of the overtaking code. Question apart is if that is desired/realistic.From what I see on many central-european highways, it is very realistic to work with the maximum achievable speed given the load of a convoy. That of course does not say anything about feasibility - is it possible to quickly and easily compute the maximum achievable speed - I have no idea, unfortunately.One more remark for improvement: it seems to me that the overtaking does not take place if all conditions are satisfied, but the first (slower) car is turning to the right (whereas the overtaking car continues straight on). In such a case, the overtaking should take place (if it is not difficult to code) because the overtaken car will actually be overtaken sooner... Quote Selected Last Edit: September 29, 2008, 09:33:06 am by jatypc