Times are UTC Toggle Colours
00:15:46 *** ToBeFree has joined #openttd 01:07:13 *** Flygon has joined #openttd 01:11:38 *** glx has quit IRC 01:49:35 *** Flygon_ has joined #openttd 01:50:46 *** Flygon has quit IRC 02:16:32 *** sim-al2 has joined #openttd 02:25:14 *** ToBeFree has quit IRC 04:17:59 *** sla_ro|master has joined #openttd 04:42:16 *** efess has joined #openttd 05:20:46 *** sla_ro|master has quit IRC 06:33:05 *** andythenorth has joined #openttd 06:39:05 *** Flygon__ has joined #openttd 06:45:45 *** Flygon_ has quit IRC 07:06:10 *** Cubey has quit IRC 07:27:01 *** andythenorth has quit IRC 07:57:13 *** andythenorth has joined #openttd 07:58:05 *** gelignite has joined #openttd 08:08:05 *** andythenorth has quit IRC 08:30:34 *** debdog has quit IRC 08:33:15 *** debdog has joined #openttd 09:17:23 *** Progman has joined #openttd 09:23:55 *** Arveen2 has quit IRC 09:25:02 *** Hiddenfunstuff has joined #openttd 09:36:23 *** Lejving has joined #openttd 10:31:45 *** HerzogDeXtEr has joined #openttd 11:32:22 *** Wolf01 has joined #openttd 11:32:41 <Wolf01> o/ 11:39:21 *** sla_ro|master has joined #openttd 12:10:26 <Wolf01> Mmmh VS constantly loses the Win10SDK 12:10:42 <__ln__> it wants to tell you something 12:11:01 *** Arveen has joined #openttd 12:11:02 <Wolf01> I would like to tell it something 12:15:15 <Wolf01> I install the old sdk (used by the vs2015), it works, compiles etc, I open a 2017 feature, it installs the new SDK, old sdk disappear, ok, upgrade the app for the new sdk... no it doesn't like it 12:18:30 <Wolf01> If I want to use it with vs2017 I need to drop support for anything older than creators update 12:28:02 <Wolf01> And meanwile they released another 3GB of updates, so I have to waste another day updating the shit 12:29:53 <milek7_> what are "2017 features"? 12:30:16 <Wolf01> Something used by the IDE itself 12:32:04 <Wolf01> I need to open a new tool window, it asks for SDK 15063, ok, you already had it, the installer just "install" it in 0.5 nanoseconds, reopen the solution "impossible to load the project, it requires the SDK 10586"... 12:33:01 <milek7_> weird 12:33:03 <milek7_> i use v141 sdk with vs2017 on win7 12:34:04 <Wolf01> Yes, that's what I want to do, but the project keeps asking for the 10586 even if I change it to 15063 12:36:16 <Wolf01> And since I'm developing an UWP app, I have double SDK, so I think the Win10 one and the Mobile one are misaligned and keep upgrading and downgrading the other one 12:45:25 *** chembot141 has joined #openttd 12:45:47 <chembot141> hi 12:46:31 <chembot141> ☺▒¿▓x░≡█ 12:47:02 <chembot141> ░▒▓=▓▒░ 12:47:09 <chembot141> A 12:47:18 <chembot141> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 12:47:19 *** andythenorth has joined #openttd 12:47:21 <andythenorth> ach 12:47:23 <chembot141> hello 12:47:33 <chembot141> whats up 12:48:09 <andythenorth> Wolf01: o/ 12:48:27 <chembot141> ? 12:50:08 *** blocage has joined #openttd 12:50:13 <Wolf01> o/ 12:52:15 <andythenorth> Wolf01: played any OpenTTD? o_O 12:53:07 *** chembot141 has quit IRC 12:54:01 <Wolf01> Yes, about 20 minutes 12:55:47 <Wolf01> Lol, the best part is that all the 3 SDK are currently installed 12:57:25 <Wolf01> 10586, 14393 and 15063... and even the old 10240 which I don't even use, but every time I modify the installation of VS2017 it tries to reinstall all that stuff 13:21:19 *** tokai has quit IRC 13:21:51 *** tokai has joined #openttd 13:21:51 *** ChanServ sets mode: +v tokai 13:29:49 *** HerzogDeXtEr has quit IRC 13:31:24 *** HerzogDeXtEr has joined #openttd 13:31:37 <supermop_> yo 13:37:15 <andythenorth> lo supermop_ 13:45:30 *** Lejving has quit IRC 13:45:56 *** Lejving has joined #openttd 13:49:34 *** sim-al2 has quit IRC 13:53:04 <Wolf01> So... "," is a string, but ',' is a char... nice to know 13:53:47 <Eddi|zuHause> in C(++)? yes 13:54:31 <Wolf01> I figured it out because .Split(",") threw an error 13:55:23 <Wolf01> Now, I need to remember how to debug async methids 13:55:27 <Wolf01> *methods also 13:55:44 *** Lejving has quit IRC 13:56:26 *** Lejving has joined #openttd 13:58:15 <Wolf01> Ok, I need to break before the async and then step into 14:03:59 <Wolf01> http://www.commitstrip.com/en/2017/09/12/versioning-is-important/ ehe 14:05:33 <Eddi|zuHause> oh, new xkcd phone 14:05:38 <Wolf01> Yep 14:06:13 <Wolf01> I just see it on the app I'm working on... a feed reader for webcomics 14:08:07 <Wolf01> The front camera in the center of the screen is wonderful 14:08:45 <Eddi|zuHause> a feed reader for webcomics? sounds like nobody ever implemented that before ever 14:08:58 <Wolf01> I'm implementing my own for my needs 14:09:13 <Wolf01> Also for my wallet 14:10:33 <Wolf01> I need to introduce the categories now 14:10:45 *** andythenorth has quit IRC 14:11:56 *** andythenorth has joined #openttd 14:13:29 <Wolf01> https://www.windowscentral.com/clatter-all-one-messenger-app-thatll-make-your-life-easier ok, nice, it supports everything but IRC 14:18:01 <Wolf01> There's a custom service web wrapper, maybe could be used to access the webchat... I bet adding custom services requires to pay for the full version 14:19:05 *** gelignite has quit IRC 14:19:40 *** gelignite has joined #openttd 14:21:53 *** Wolf01Clatter has joined #openttd 14:22:31 <Wolf01Clatter> It seem to work.. but I could just use the site... and avoid that nasty ads bar... 14:23:34 *** Wolf01Clatter has left #openttd 14:35:49 *** Alberth has joined #openttd 14:35:50 *** ChanServ sets mode: +o Alberth 14:35:55 <Alberth> o/ 14:36:00 <Wolf01> o/ 14:37:17 <crem> \o 14:56:31 *** sla_ro|master has quit IRC 15:03:01 *** LongyanG has quit IRC 15:04:59 <Eddi|zuHause> a while ago i was looking into connecting with telepathy to the steam messenger, but i didn't get it to work 15:07:04 *** LongyanG has joined #openttd 15:08:30 *** Wormnest has joined #openttd 15:13:08 *** Flygon__ has quit IRC 15:23:03 <Alberth> quite non-trivial problem thus 15:26:20 *** blocage has quit IRC 15:32:12 <Eddi|zuHause> i think it didn't find the plugin 15:32:39 <Eddi|zuHause> and i didn't really understood the program enough to figure it out 15:40:39 <Alberth> :o that telepathy 15:44:36 *** Gja has joined #openttd 15:58:41 *** TheMask96 has quit IRC 16:00:41 *** TheMask96 has joined #openttd 16:12:57 *** Cubey has joined #openttd 16:14:16 *** Gja has quit IRC 16:20:28 *** debdog has quit IRC 16:21:49 *** ToBeFree has joined #openttd 16:26:28 *** debdog has joined #openttd 16:31:08 <Wolf01> So I now saved the categories for the feeds I subscribed, it would be cool to also use them and not just show "Yet another lego blog - In category: LEGO" "Yet another webcomic - In category: webcomic" 16:31:53 *** sla_ro|master has joined #openttd 16:32:00 <Wolf01> I think I'll replace the pivot 16:35:28 <Wolf01> Meh... I need to group them 16:36:39 <Wolf01> Group, get only the latest N for each subscription, order by date 16:36:54 <Wolf01> A long LINQ query 16:45:38 *** debdog has quit IRC 16:52:59 *** debdog has joined #openttd 16:55:52 *** glx has joined #openttd 16:55:52 *** ChanServ sets mode: +v glx 16:56:58 <Eddi|zuHause> that's just a simple sql statement? 16:57:15 <Wolf01> Yes, but I'm not using SQL 17:05:31 *** andythenorth has left #openttd 17:24:07 *** frosch123 has joined #openttd 17:35:26 <Wolf01> Quak 17:35:33 <frosch123> moo 17:38:58 *** debdog has quit IRC 17:46:19 *** debdog has joined #openttd 17:47:13 <_dp_> o/ 17:47:33 <_dp_> https://www.reddit.com/r/openttd/comments/6zvuud/ive_noticed_some_weird_train_cornering_behaviour/ 17:47:47 <_dp_> looks like some kind of bug in curvature calculation 17:50:20 <Wolf01> Yes, the train exited the first bend, but also went up by 1 level 17:51:28 <_dp_> it's same on flat land 17:53:11 <_dp_> `-. seems to somehow affect curvature even though it has turns in different directions 17:53:44 <_dp_> but it doesn't count as curvature = 1, more like -1 to curvature 17:53:51 <_dp_> basically, something is broken :p 17:55:23 <_dp_> and it also works differently in different directions 17:56:00 <_dp_> going backwards it slows down to 111 on middle section already 18:02:22 *** andythenorth has joined #openttd 18:06:07 <andythenorth> o/ 18:07:21 <supermop_> yo 18:19:56 <andythenorth> any new FS? o_O 18:20:35 <andythenorth> nope 18:23:40 <_dp_> will be soon :p 18:25:42 <andythenorth> 1 in 1 out policy :P 18:31:17 *** ToBeFree has quit IRC 18:35:38 *** ToBeFree has joined #openttd 18:35:53 <frosch123> _dp_: the algorithm is based on average curvature 18:36:16 <frosch123> when the curve at the end is dropped, to overall curve gets a lot shorter but only maginally less curvy 18:36:54 <frosch123> check train_cmd.cpp:369 18:37:02 <frosch123> "sum" is the number of wagons from first to last curve 18:37:08 <frosch123> "numcurve" is the number of curves 18:37:22 <frosch123> so, not a bug, the algorithm is intended like that 18:41:10 <_dp_> frosch123, yeah, I noticed averaging mentioned in wiki, but that still doesn't explain everything 18:41:49 <_dp_> also tbh that averaging looks very silly to me, why not just use minimum? 18:42:01 <frosch123> minimum would always be the same 18:42:24 <_dp_> as long as train stays on the curve 18:43:15 <_dp_> and yeah, same for every curve of same size, which seems much more clear to me 18:43:20 <frosch123> well, all "realistic" stuff has that problem :p 18:43:34 <frosch123> people come up with a set of curves, and always find a case where it behave weird 18:43:48 <_dp_> that doesn't even look any realistic to me 18:46:53 * andythenorth played a game 18:46:58 <andythenorth> it was fun 18:47:24 <frosch123> .devzone says you were horsing around 18:52:31 <andythenorth> and FIRS 18:52:40 <andythenorth> Horse is falling in a hole 18:52:47 <andythenorth> I have about 27 different mail wagons 18:52:58 <andythenorth> so you can always make integer length express trains :| 18:53:06 <andythenorth> clearly silly 18:53:08 <frosch123> haha 18:59:29 <_dp_> hm, so trains with smaller wagons travel faster on curves... 19:00:22 <frosch123> yes 19:00:45 <frosch123> no idea whether that was intended or whether the algorithm was composed before short wagons 19:01:20 <frosch123> _dp_: also those multi-articulared vehicles travel faster 19:02:26 <andythenorth> how can I exploit this? o_O ^ 19:03:04 <_dp_> frosch123, xD 19:03:28 <frosch123> i guess the shorten-vehicles stuff was not intended, since it also circumvents the 90 degree (2x45) test 19:05:36 <_dp_> 90 check should still be fine, as there has to be 90 diff somewhere in train 19:05:52 <_dp_> regardless of parts length 19:05:58 <frosch123> there are two 90 cases 19:06:07 <andythenorth> supermop_: I have trains called Roarer, Screamer, Wizzo 19:06:26 <andythenorth> Shredder or Growler for a medium freight loco? 19:06:29 <frosch123> one for real 90, one for 2x45 19:06:31 <andythenorth> both are RL names :P 19:06:49 <_dp_> frosch123, ah, 2x45 yes, that's broken 19:11:16 <Eddi|zuHause> i feel like we discussed that before, but in the end nobody felt the need to actually change anything, and everybody just shrugged and moved on 19:13:53 <_dp_> looks easily fixable to me 19:14:08 <_dp_> as long as everyone is fine with completely changing the logic)) 19:14:23 <frosch123> i am fine with fixing the wagon vs. length thing 19:14:52 <frosch123> but changing the average with something else will result in other cases which are not "as realistic as hoped" 19:15:31 <Eddi|zuHause> there was also a thing with speed on diagonals 19:15:34 <_dp_> dunno about realisting but it definitely won't be as dumb :p 19:15:49 <Eddi|zuHause> and a problem where short trains don't have the same curve limits as long trains 19:16:07 <_dp_> train slowing down after exiting the turn, how is that even realistic :p 19:16:45 <frosch123> Eddi|zuHause: long trains have advantages 19:16:46 <_dp_> Eddi|zuHause, is it rly a problem? I always though of it as a feature 19:17:24 <frosch123> Eddi|zuHause: if you train is 100 tiles long and there is a curve in the front and in the back, 100 straight tiles will average out almost everything 19:17:25 <_dp_> hardly realistic, yes, but still nice imo 19:18:02 <Eddi|zuHause> frosch123: but a train shorter than 100 tiles will have no limit at all, since it's only on one curve 19:18:36 <frosch123> yep, it's always wrong 19:18:44 <frosch123> for each cruve length you likely find a weird train 19:19:04 <_dp_> I'd say 1) sum wagon lengths 2) take minimum instead of average 19:19:05 <Eddi|zuHause> i think my suggestion worked like this: a train reserves a "braking distance" ahead, and the speed limit is calculated on the reservation, instead of the train 19:19:08 <_dp_> 3) screw realism :p 19:20:17 <_dp_> Eddi|zuHause, how does that apply to curves, it can still reserve as much as it wants 19:20:38 <Eddi|zuHause> ("braking distance" depends on current speed, and possibly some other train properties) 19:21:28 <_dp_> that's the way to do realistic breaking, yes 19:21:38 <_dp_> will still run in other issues though in openttd case 19:21:48 *** Alberth has left #openttd 19:21:54 <_dp_> like sudden rail removal :p 19:22:33 <Eddi|zuHause> disallow removal if a reservation is active ("train in the way") 19:22:59 <_dp_> Eddi|zuHause, what about sudden signal change? 19:23:38 <_dp_> well, I guess signals should treat reservation as part of the train 19:23:43 <Eddi|zuHause> signal behavior also needs to take the reservation into account 19:24:05 <Eddi|zuHause> well, path signals already do, and block signals should treat a reservation the same way as a train in the block 19:26:19 <_dp_> and what signal should show for reservation, red or green? 19:26:24 <_dp_> both are confusing af 19:27:02 <Eddi|zuHause> signal with reservation shows green (like current path signals) 19:28:39 <Eddi|zuHause> this solves several problems, like trains needing an "emergency brake" because the signal suddenly turned red 19:28:55 <_dp_> path signals are arledy confusing af :p 19:29:07 <_dp_> and they don't show green, they just blink green 19:29:51 <Eddi|zuHause> that will also be "solved", because the reservation is done earlier, they show green for longer 19:30:58 <_dp_> why are they red by default btw? 19:31:54 <Eddi|zuHause> because that was easier to implement, instead of looking for a train waiting for a free path to know when to show red 19:32:16 <Eddi|zuHause> and it would be silly to have a train wait in front of a green signal 19:33:26 <_dp_> turn red if train failed to reserve track 19:34:03 <Eddi|zuHause> yes, but the signal doesn't know about any trains 19:34:26 <Eddi|zuHause> so making signal state depend on train state is non-trivial 19:34:39 <_dp_> trains know about signal, they can switch it 19:34:47 <_dp_> totally unrealistic, I know xD 19:35:48 <Eddi|zuHause> signals default to red is actually very realistic, because signalling tends to err on the "safe" side 19:36:12 <Eddi|zuHause> just with real networks, the "reservation" is far longer ahead 19:39:22 <_dp_> btw, I also though about realistic breaking some time ago. pretty much same reservation thing, even calculated some formulas for that reservation "head" movement 19:39:53 <_dp_> unrelated to openttd though 19:41:13 <_dp_> also has nothing to do with curve speed limits :p 19:41:58 <_dp_> or rather speed limit calculation, because calculating the effect of that speed limit on reservation "movement" is another tricky question 19:42:58 <_dp_> hm, and openttd calculating limit by train instead of track definitely doesn't make that easier 19:43:38 <_dp_> since you need limit to calculate reservation and to calculate limit you need train to already be there 19:58:46 <_dp_> what's the official github openttd mirror? it's not even listed on https://www.openttd.org/en/development 20:00:18 <frosch123> https://github.com/OpenTTD/OpenTTD 20:01:00 <frosch123> all current links are on the "community" page 20:01:07 <frosch123> the other stuff is probably from 2004 20:04:45 <_dp_> oh, don't think I ever looked at community page xD 20:05:18 <frosch123> really, it's a popular battle ground for competitive servers 20:05:32 <frosch123> they fight for the best position on the list or something 20:06:21 <_dp_> omg 20:06:52 <frosch123> i think it was btpro vs reddit 20:06:53 <_dp_> well, I'm happy that citymania is even there xD 20:07:16 <_dp_> along with long dead novapolis but whatever 20:09:07 <_dp_> wonder how ST 2 still didn't think of adding separate "competitive servers" section to be first there :p 20:09:49 <ST2> lazyness works in misterious ways :P 20:11:40 <_dp_> ST2, do you even get any visitors from that page? 20:11:50 <_dp_> coz we don't :p 20:11:52 <ST2> no clue 20:15:16 <_dp_> oh, actually, we do, it's just not on a first page 20:15:22 <_dp_> no wonder I never noticed it 20:15:37 <_dp_> but yeah, whole 15 visitors in a year! xD 20:16:19 <ST2> it's a start :P 20:17:17 <frosch123> how much does that increase by putting it first? 20:18:00 <_dp_> dunno, let's try and I'll tell you in a year :p 20:19:06 <_dp_> 24 visitors from bananas xD 20:19:27 <frosch123> is bananas linked from anywhere? 20:20:57 <_dp_> huh? 20:21:08 <_dp_> there is a link on cm grf on bananas 20:21:47 <frosch123> yes, but i thought the bananas website is itself pretty much hidden 20:22:08 <_dp_> frosch123, well, not as hidden as wiki I guess :p 20:22:36 <_dp_> hm, 15 visitors seems to be the point where all the weirdness starts 20:23:00 <_dp_> liky 15 from addons.mozilla.org, 15 more from outlook.live.com 20:23:28 <_dp_> lifehacĸer.com ... 20:24:59 <_dp_> oh, that's some phishing domain 20:29:47 *** Biolunar has joined #openttd 20:30:33 *** Stimrol has joined #openttd 20:34:10 <_dp_> forks++ 20:35:20 *** sim-al2 has joined #openttd 20:41:19 *** ToBeFree has quit IRC 20:43:55 *** chomwitt has joined #openttd 20:56:25 *** frosch123 has quit IRC 21:06:31 *** andythenorth has left #openttd 21:07:11 *** sla_ro|master has quit IRC 21:11:34 *** Stimrol has quit IRC 21:20:33 *** Stimrol has joined #openttd 21:28:13 *** chomwitt has quit IRC 21:43:37 <Eddi|zuHause> hm, i'm missing something that makes a blue tongue 21:43:53 <Wolf01> Tried with ink? 21:44:08 <Eddi|zuHause> haven't seen any ink around 21:44:18 <supermop_> cut it off maybe? 21:45:09 <Eddi|zuHause> that seems excessive :p 21:45:27 <Wolf01> Rufus is weird, maybe licking something strange 21:45:38 <Eddi|zuHause> not MY tongue :p 21:46:12 <_dp_> debug vehicles are missing wagons :( 21:46:33 <_dp_> need some grf with short wagons 21:47:24 <_dp_> ah, nvm I forgot I can stack locos 21:48:22 *** chomwitt has joined #openttd 21:49:09 <_dp_> oh, crap but they have 52 kmh speed 21:52:40 <_dp_> so, does anyone know grf with smth like 4/8 wagons? 21:53:32 <Eddi|zuHause> ukrs? but that probably does not solve your speed limit problems 21:53:59 <_dp_> hm, I'll try it 21:54:06 <_dp_> need 200 kmh though 21:54:20 <Eddi|zuHause> there used to be a setting to disable wagon speed limits 21:58:13 <_dp_> ok, found a way to do 177kmh with ukrs, that should do) 21:58:51 <_dp_> these supersmall wagons look quite silly :) 22:05:10 *** tokai|noir has joined #openttd 22:05:10 *** ChanServ sets mode: +v tokai|noir 22:07:05 <_dp_> hm, how do I enable 90 degree turns? just disabling "forbid" option in settings doesn't seem to work % 22:09:02 <_dp_> ah, apparently I tried to do wrong 90 turn) 22:09:13 <_dp_> never played with that crap on :p 22:12:06 *** tokai has quit IRC 22:14:00 <_dp_> why do debug vehicles not work with urks? 22:14:10 <_dp_> there are debug rvs but no trains 22:14:41 *** Biolunar has quit IRC 22:20:42 <_dp_> curve speeds are horribly broken for non power of 2 length engines 22:21:03 <_dp_> coz number of wagons on curve constantly changes :p 22:23:15 *** Stimrol has quit IRC 22:31:43 <Eddi|zuHause> just another reason to completely rip out that code and replace it with something sane 22:32:10 <Eddi|zuHause> ... for various optimism levels of "sane" 22:32:49 <_dp_> done :P 22:32:49 <_dp_> https://github.com/ldpl/OpenTTD/commit/7b32c6ebcecde523bfe892aea2860cd3c9d8f5e7 22:32:56 <_dp_> slightly more sane xD 22:33:16 <_dp_> still fails on wagons of weird length tho 22:33:34 <Eddi|zuHause> no idea what that does 22:33:56 <_dp_> but that issue comes from calculating limit by train instead of track 22:34:23 *** Wormnest has quit IRC 22:34:33 <_dp_> does two things I stated earlier. 1) takes min curve instead of avg 2) takes wagon length instead of count 22:35:40 *** HerzogDeXtEr has quit IRC 22:35:59 <_dp_> so except for non power of 2 wagons solves all other speed limit issues as far as I can tell 22:36:54 *** HerzogDeXtEr has joined #openttd 22:38:05 <Eddi|zuHause> i think you can pretty safely switch it to track reservation instead of wagons. trains ("usually") reserve the track under themselves, even without path signals present 22:38:48 <Eddi|zuHause> you may sporadically catch the reservation from another train, though 22:38:49 <_dp_> usually? xD 22:39:28 <_dp_> wait, but with path signals reservation is larger than train, right? 22:39:42 <_dp_> that doesn't really work well for speed limits 22:41:08 <Eddi|zuHause> i think that's an improvement 22:41:25 <Eddi|zuHause> there's no reason why the speed limit should depend on train length 22:41:28 <_dp_> hm, what I could probably do is some math magic to get track length even with weirdly sized wagons 22:42:35 <Eddi|zuHause> trains should have their length cached in the front engine 22:42:42 <_dp_> Eddi|zuHause, with path signals reservation can be arbitrarily big, makes no sense whatsoever to calculate speed limit from it 22:43:08 <Eddi|zuHause> you can limit the path traversal 22:43:55 <_dp_> I think just some rounding will do the trick 22:43:55 <Eddi|zuHause> go back (length of train) tiles, and go forward (length of braking distance) tiles 22:45:08 <Eddi|zuHause> stop whenever that limit is reached, or the reservation ends 22:46:58 <Eddi|zuHause> second step would be to add a useful formula for determining the braking distance 22:47:29 <Eddi|zuHause> third step: extend the reservation when it's shorter than the braking distance, in the movement code 22:48:20 <_dp_> breaking distance is way much harder of a task than fixing curve speed limits 22:48:27 <_dp_> I'm not doing it for sure :p 22:48:39 <Eddi|zuHause> i didn't expect you to 22:49:02 <Eddi|zuHause> just hard code it as 0 or 1 tile or something 22:50:51 <Eddi|zuHause> what i meant to say was: this code should be able to handle a braking distance, should it be added in the future 22:52:07 <_dp_> well, what I did is as able to handle breaking distance as current openttd :p 22:52:56 <Eddi|zuHause> that's not really the goal :p 22:53:31 <_dp_> i don't rly believe in breaking distance ever coming to openttd 22:54:04 <_dp_> can't even imagine how to calculate it with realistic acceleration 22:54:28 <_dp_> it's non-trivial even with simple v=at stuff 22:54:54 <Eddi|zuHause> s=a/2*t^2... really not that difficult :p 22:56:00 <_dp_> exept that you don't have t :p 22:56:16 <_dp_> also acceleration is doable 22:56:27 <Eddi|zuHause> you get t from v=a*t 22:56:34 <_dp_> but what happens for example when train hits speed limit? 22:57:56 <Eddi|zuHause> well, the idea is to use the braking distance as a lookahead, to notice speed limits before you reach the limiting spot 22:58:17 <Eddi|zuHause> then you can pass the limit to the acceleration code, and it will slowly lower speed towards the limit 22:58:21 <_dp_> I think it just moves with 2a on acceleration so you don't need s and t (assuming a of breaking = a of acceleration) 22:58:34 <Eddi|zuHause> without just clamping the speed to the limit 22:58:40 <Eddi|zuHause> like it does currently 22:59:51 <_dp_> Eddi|zuHause, well, anyhow breaking distance should go somewhere past speed limit, stay there for some time as train decelerates and then continue on 23:00:57 *** Eddi|zuHause has quit IRC 23:01:11 <_dp_> also it's unclear how breaking distance will sync with train on integer coords without loosing precision 23:01:31 *** Eddi|zuHause has joined #openttd 23:01:50 <Eddi|zuHause> ... you broke it 23:02:00 <_dp_> :p 23:02:31 <Eddi|zuHause> i don't know what you mean with your braking distance comment 23:03:55 <_dp_> which one? :) 23:06:40 <Wolf01> Ok, I fixed and broke my app infinite times today, I could netflix and sleep now 23:07:01 <_dp_> in other words you need to somehow calculate when to start decelerating to hit speed limit point with required speed 23:11:16 <Wolf01> You are trying to make trains don't stop from full speed at every red signal because the train ahead is slower? 23:11:26 *** tycoondemon has quit IRC 23:12:19 <_dp_> oh, and anyway calculating speed limit for train instead of track is quite important gameplay thing already 23:12:26 <_dp_> like all coop stuff depends on it 23:12:58 <Eddi|zuHause> pppppppffffftttt :p 23:12:59 <_dp_> Wolf01, yeah, Eddi wants realistic deceleration xD 23:13:51 <Wolf01> TF has is now and I found it really good, trains don't stop anymore and almost match the speed of the train ahead 23:13:54 <Eddi|zuHause> imho, breaking coop habits is the best reason ever for making a patch :p 23:14:38 <Wolf01> :D 23:15:04 <Eddi|zuHause> anyway, "<_dp_> Eddi|zuHause, well, anyhow breaking distance should go somewhere past speed limit, stay there for some time as train decelerates and then continue on" <-- this was the last line i got before the disconnect 23:15:10 <Eddi|zuHause> and that one i don't understand 23:15:19 <_dp_> <_dp_> in other words you need to somehow calculate when to start decelerating to hit speed limit point with required speed 23:15:21 *** tycoondemon has joined #openttd 23:15:42 *** HerzogDeXtEr has quit IRC 23:16:04 <Eddi|zuHause> _dp_: i wouldn't really worry about that... just decelerate as soon as you notice the speed limit ahead 23:16:47 <_dp_> Eddi|zuHause, that's kind of silly to go at lower speed than allowed 23:17:00 <_dp_> Eddi|zuHause, besides, I think I already know the answer to that 23:17:37 <Eddi|zuHause> _dp_: in any case, i think that's a feature for later steps of this process 23:17:38 *** HerzogDeXtEr has joined #openttd 23:17:45 <_dp_> Eddi|zuHause, braking point pauses at point where would train stop going from speed limiting point at speed of that limit 23:19:29 <Eddi|zuHause> _dp_: if you are checking reservation ahead of the train, for each step you can calculate the speed it would reach when starting to brake immediately. just check whether that speed is below the speed limit of that point 23:19:40 <_dp_> though it all depends on implementation. when I though about braking points I planned on making them the logical "head" for train and move the real pieces accordingly 23:21:04 *** HerzogDeXtEr has quit IRC 23:21:05 <_dp_> Eddi|zuHause, that means on every train movement you're going to check whole reservation 23:21:56 <Eddi|zuHause> every train movement, or maybe every tile change 23:22:10 <Eddi|zuHause> but that should be a fairly cheap operation 23:22:20 <Eddi|zuHause> just loop over the already existing reservation 23:23:26 <_dp_> I kind of though train movement is time-critical already 23:23:56 <Eddi|zuHause> that's a dangerous assumption without doing actual profiling 23:24:12 <Eddi|zuHause> but usually pathfinder is the worst offender, and you're not really doing that 23:24:30 <_dp_> well, anyway, you don't need to check reservation. Having stored something like distance before starting braking and dinstance to end braking should be enough 23:25:03 <Eddi|zuHause> caching values is a step further 23:25:57 <_dp_> yeah, but it's always nice to know beforehand that it's possible to cache something there ;) 23:28:16 <Eddi|zuHause> what you probably would need to cache is the "braking curve", i.e. "train has current speed of 100, within 1 tile it can brake to 95, within 2 tiles to 85, within 3 tiles to 70, within 4 tiles to 45, within 5 tiles to 15, within 6 tiles to 0" 23:29:28 <Eddi|zuHause> at least that could work while the train is cruising at constant speed 23:31:53 <Eddi|zuHause> then, at every tile change you can loop the reservation, and if you encounter a speed limit of 80 is within 2 and 3 tiles, you start braking 23:32:43 <Eddi|zuHause> if the speed limit is more than 3 tiles away, you don't care 23:32:57 <_dp_> braking curve seems pointless to me. all you need to know is when to hit brakes and when to release and that can be calculated based on distances and speeds 23:33:26 <Eddi|zuHause> you don't need to know when to release, because you release when you reach the speed limit 23:33:55 <Eddi|zuHause> you already know what the limit is 23:33:56 <_dp_> Eddi|zuHause, kind of true except mb sometimes you don't 23:34:05 <_dp_> as there is another limit 23:34:36 <Eddi|zuHause> what? 23:35:21 <_dp_> there may be too speed limits ahead of the train and you may need to start braking to second one earlier than to the first (or at the same time) 23:35:42 <_dp_> so when you reach first limit you still need to hold brakes 23:35:57 <_dp_> *two 23:36:06 <Eddi|zuHause> how is that a problem? you loop over the whole braking distance, and brake for the lowest speed limit that didn't meet the "ignore" criterium above 23:36:47 <_dp_> it's not much of a problem, just you don't always "release when you reach the speed limit" 23:37:14 <_dp_> you may do it as release, look ahead and immediately brake again though 23:37:15 <Eddi|zuHause> each speed limit that is not the lowest will automatically be ignored as well 23:37:28 <Eddi|zuHause> there is only one speed limit that you brake for at any given moment 23:37:57 <_dp_> well, yeah, and that what I meant by knowing when to release brakes :p 23:38:30 <Eddi|zuHause> say you have the braking curve above, and there's a speed limit of 80 3 tiles away, you set that as active speed limit. then there's a speed limit of 30 6 tiles away, you ignore that 23:39:07 <_dp_> depends on braking speed, if it's too slow I can't ignore it 23:39:17 <_dp_> or I wouldn't be able to stop from 80 to 30 in 3 tiles 23:39:27 <_dp_> *slow down 23:39:30 <Eddi|zuHause> but you already know the braking speed, that's what you calculated the braking curve from 23:40:55 <_dp_> idk with braking curve mb, it's quite excessive 23:41:03 <_dp_> I was talking of not having braking curev 23:41:51 <Eddi|zuHause> even if you don't calculate the braking curve, it still exists 23:43:05 <Eddi|zuHause> you still get to the same conclusions on when to brake for a speed limit, even if you don't explicitly calculate the curve 23:46:10 *** Progman has quit IRC 23:50:14 <_dp_> hm, I changed my mind, calculating when to brake is a bad idea 23:50:21 <Eddi|zuHause> _dp_: what i mean is, if you encounter a speedlimit of X, Y tiles ahead, you calculate whether the train can still meet the speed limit if it started to brake Y-1 tiles away, if not, you set X as the current speed limit and start braking now. if you find a new lower speed limit later, you override the speed limit 23:51:00 <_dp_> in openttd reality what you need to know is for each tick whether you're braking at it or not 23:51:34 <Eddi|zuHause> checking at tile borders should be enough, no need to do it every tick really 23:52:25 <Eddi|zuHause> might need special calculations for half tiles 23:52:58 <_dp_> I think it can move more than one tile per tick actually 23:54:11 <Eddi|zuHause> but it would induce a tile switchover check twice in that case 23:54:43 <Eddi|zuHause> there is certainly a maximum speed 23:55:48 <Eddi|zuHause> there are two train movement steps per tick, and it almost certainly cannot move more than one tile per movement step 23:57:04 <Eddi|zuHause> anyway, if you overshoot, there's always the "emergency brake" mode 23:57:15 <_dp_> xD 23:58:28 <_dp_> there is somewhat realistic deceleration currently btw 23:58:49 <_dp_> but it only works within one tile and has some bugs :) 23:59:40 <Eddi|zuHause> yes, hence the need for a braking distance 23:59:57 <Eddi|zuHause> (also separate braking power property for vehicles)