IRC logs for #openttd on OFTC at 2017-04-04
⏴ go to previous day
00:00:07 <Samu> +static FindDepotData FindClosestReachableShipDepot(const Ship *v, int max_penalty)
00:01:28 <Samu> if I separate one pathfinder, one patch, i dunno what to write there
00:02:34 <DorpsGek> Commit by peter1138 :: r27845 trunk/src/pathfinder/yapf/yapf_rail.cpp (2017-04-04 00:02:28 +0200 )
00:02:35 <DorpsGek> -Change: (Yapf) Use FindDepotData struct to simplify depot finding code and remove need to return fake path distance. (juanjo)
00:02:39 *** Lejving_ is now known as Lejving
00:03:15 <peter1138> (Although actually the fake distance doesn't matter since the previous two commits)
00:04:49 <peter1138> Damn, forgot a FS reference for r27844. Oh well.
00:05:17 <peter1138> And the last one. Heh.
00:05:21 <peter1138> Maybe it's sleepy time.
00:16:08 <Wolf01> I wish a way to set switches as double slip only when I want them to be :(
00:17:21 <peter1138> Just use X & Y tracks only :D
00:17:28 <Wolf01> It would help *a lot* on some tracks configurations I use
00:28:36 <peter1138> i wonder what that is
00:44:06 <Samu> uhmm peter1138, it already is a depot tile
00:44:45 <Samu> you fixed it different than me :(
00:46:12 <Samu> if (cur.tile == prev.tile), this is always a depot
00:47:53 <Samu> i tested it like this: if (!Yapf().PfDetectDestination(cur.tile, cur.td)) segment_cost += Yapf().PfGetSettings().rail_depot_reverse_penalty;
00:52:32 <Samu> what if the path routes through a depot?
00:55:34 <Samu> what if the destination is actually the depot?
01:10:09 <peter1138> just when samu thinks he has cracked it
01:10:19 <peter1138> i do something different
01:11:27 <Samu> im trying to see if it differs
01:21:57 <Samu> mine picks C 8424 D 0 - c0(sc0, ts0, o0), yours doesn't
01:23:04 <Samu> yours picks 8224, where do these 200 cost come from
01:23:52 <peter1138> segment_cost += Yapf().OneTileCost(cur.tile, cur.td);
01:24:41 <peter1138> my change makes it pick the depot when it gets to it
01:25:02 <peter1138> before, it picked the depot only after it had reversed inside it and added penalties
01:41:35 <Samu> erm,, you''re getting 5872
01:41:50 <Samu> seems that yours is adding an extra 200 wrongly
01:44:36 <Samu> wow, now mine is getting 5872 too, why u do this to me, openttd :(
01:44:52 <Samu> anyway, we're both wrong?
01:46:01 <Samu> wait, yours would be right, if it was 5671
01:46:23 <Samu> the 200 extra was on mine after all, not on yours
01:46:44 <Samu> but now you got 5872, i got 5872, hmm.... confusing
01:47:01 <peter1138> if that is a path *through* a depot, then they will be the same
01:47:57 <Samu> go to station 1, go to depot, go to station 2
01:48:12 <Samu> then from 2 go to 1, but it's forced to enter depot
01:50:13 <Samu> retesting yours again, brb
01:52:12 <peter1138> why would it be different?
01:52:29 <Samu> i think we're both wrong, unless I'm missing something obvious
01:52:49 <peter1138> what are you trying to prove?
01:53:15 <Samu> going from 1 to 2 costs 201, not 200, my bad
01:53:42 <Samu> the cost for reversing at the station is 1, then it walks 2 straigth tiles, 100 each
01:54:04 <Samu> the 2nd straigth tile is also the depot tile
01:54:50 <Samu> from depot to 2, it gets 471
01:55:14 <Samu> is that 1 the cost for reversing in depot?
01:55:49 *** smoke_fumus has joined #openttd
01:56:26 <peter1138> implicit signal maybe?
01:56:29 <Samu> 1 reverse + 100 straigth + (70 horizontal + 100 curve) + 100 straigth
01:56:40 <peter1138> reversing in depot is 5000
01:57:11 <Samu> the order is from depot to 2, 5000 is supposed not to be added
01:57:21 <Samu> for that part it's doing fine
01:57:34 <Samu> now, from 2 to 1, it has to go through that depot
01:57:45 <Samu> it's doing the way back, and the depot is in the middle of it
02:00:41 <peter1138> LAZY SUNDAY AFTERNOON
02:00:44 <Samu> @calc 1 + 100 + 100 + 70 + 100 + 100 + 1 + 100 + 100
02:00:45 <peter1138> I'VE GOT NO MIND TO WORRY
02:00:49 <DorpsGek> Commit by peter1138 :: r27846 trunk/src/pathfinder/yapf/yapf_costrail.hpp (2017-04-04 02:00:43 +0200 )
02:00:50 <DorpsGek> -Fix [FS#5926]: Infinite loop in pathfinder when checking safe waiting position from a waypoint.
02:01:02 <Samu> @calc 1 + 100 + 100 + 70 + 100 + 100 + 1 + 100 + 100 + 5000
02:01:20 <Samu> nop, that isn't the result I was looking for
02:01:22 <peter1138> Opened by Vaclav Benc (V453000) - Monday, 24 February 2014, 06:25 GMT
02:01:23 <peter1138> Last edited by Peter Nelson (peter1138) - Tuesday, 04 April 2017, 00:01 GMT
02:02:35 <Samu> @calc 1 + 100 + 100 + 70 + 100 + 100 + 1 + 100 + 100 + + 100 + 5000
02:02:37 <peter1138> these are not the droids you are looking for
02:04:17 <Samu> 1 rev at station 2 + 100 straigth + 100 straigth + 170 turning + 100 straigth in depot + 1 rev in depot + 5000 rev in depot + 100 straigth in depot + 100 straigth + 100 straigth
02:04:29 <Samu> unless station tiles have a different cost than 100 :(
02:05:19 <peter1138> yapf.rail_station_penalty = 1000
02:05:19 <peter1138> yapf.rail_pbs_station_penalty = 800
02:05:33 <peter1138> yapf.rail_longer_platform_penalty = 800
02:05:33 <peter1138> yapf.rail_longer_platform_per_tile_penalty = 0
02:05:33 <peter1138> yapf.rail_shorter_platform_penalty = 4000
02:05:33 <peter1138> yapf.rail_shorter_platform_per_tile_penalty = 0
02:07:59 <Samu> hmm from station 1 to depot, the cost should be 300, actually
02:08:28 *** tycoondemon has joined #openttd
02:08:50 <Samu> 1 rev in station1 + 100 straigth in station + 100 straigth + 100 straigth in depot
02:09:50 <Samu> depot is the destination, and the cost isn't applied?
02:10:57 <Samu> IsDiagonalTrackdir(trackdir)
02:11:06 <Samu> depots are diagonaltrackdirs, right?
02:14:33 <peter1138> that savegame in fs#5926 is so laggy :S
02:14:51 <peter1138> mind you, debug build
02:18:18 <Samu> confirmed, depots are diagonaltrackdirs, it's not this :(
02:21:01 <Samu> i see where the cost is coming from
02:21:11 <Samu> it counts 2 curves there
02:23:50 <Samu> and it's 71 for turning, not 70
02:24:21 <Samu> 100 for doing a curve + 71 for the length + 100 for doing another curve
02:25:17 <Samu> when reversing at the station, it is not counting the platform length, strange
02:25:29 <Samu> it would be 100, but it's being discarded
02:26:01 *** Jinassi has joined #openttd
02:26:27 <Samu> now i finally understand those 471 from depot to station 2
02:28:01 <Samu> 1 from reversing at depot + 100 curve1 + 71 going horizontal + 100 curve2 + 100 straigth + 100 station length
02:28:19 <Samu> it does not count the length of the first tile
02:29:46 <Samu> cost of reverse at depot is 0 in this situation?
02:30:07 <Samu> it doesn't really reverse, does it?
02:30:49 <Samu> when the train is starting from the depot, it does not do a reverse, even though it looks like it does
03:12:35 *** Supercheese has joined #openttd
03:28:11 *** Jinassi_ has joined #openttd
03:28:11 *** Jinassi is now known as Guest455
03:28:11 *** Guest455 is now known as Guest456
03:28:11 *** Jinassi_ is now known as Jinassi
03:32:03 *** Jinassi_ has joined #openttd
03:32:03 *** Jinassi is now known as Guest457
03:32:03 *** Guest457 is now known as Guest458
03:32:03 *** Jinassi_ is now known as Jinassi
05:35:16 *** orudge` has joined #openttd
05:35:16 *** ChanServ sets mode: +o orudge`
05:58:37 *** Jinassi has joined #openttd
08:01:16 <peter1138> just played pacman on google maps...
08:03:03 *** JacobD88 has joined #openttd
08:07:22 *** sim-al2 is now known as Guest475
08:07:23 *** sim-al2 has joined #openttd
08:59:08 *** Hiddenfunstuff has joined #openttd
09:10:40 *** FLHerne has joined #openttd
09:34:14 *** Biolunar has joined #openttd
10:40:19 <Wolf01> Since it's not a plane it must be superman
10:42:01 <peter1138> Samu, correct, 1 > depot > 2 is not reversing in the depot, because it was scheduled to go there.
10:44:21 <Wolf01> Mmmh, what game is the lucky one for today?
10:44:56 <Wolf01> I need to throw my 512 dice
10:45:10 <peter1138> steam makes it too easy
10:45:18 <peter1138> to have too many games that you never play
10:46:09 <Wolf01> Still 512 unplayed games
10:56:38 <Wolf01> What? Other 2 games added on my library... some bundle I purchased ages ago
10:57:39 <Wolf01> "Oh it seem you purchased X, here is another of our games for free"
10:58:08 <peter1138> I've seen a few games get revamped versions
10:58:55 <Wolf01> Yeah, usually they give it for free, but I had to purchase again all the serious sam bundle
10:59:19 <Wolf01> Luckily with 91% discount...
11:00:51 <peter1138> "Welcome to the Hypothetical Hurricanes Wiki, a friendly community on which you can create your very own tropical cyclone seasons, made completely from your imagination!"
11:07:53 <Wolf01> OMG Gogle Play store... Cock colouring book... They translated cock the wrong way... the very wrong way ;_;
11:11:47 <__ln__> which kind of a colouring book is it?
11:14:55 <__ln__> Wolf01: btw, do you know what is "have a look at the sea" in finnish
11:15:13 <Wolf01> Say it and I'll call the police XD
11:16:14 <__ln__> so a finnish tourist at the coast of italy could say: "katso merta"
11:16:49 <Wolf01> We say that too, for the same exact thing
11:17:29 <Wolf01> Ok, we say that for every thing...
13:13:16 <Samu> there is a "not-really-a-bug" with opf and doing 90 degree turns~
13:14:33 <Samu> more like a limitation, rather than a bug
13:25:22 <Samu> if there was no limit, it would enter into an infinite loop
13:26:42 <peter1138> there's a "bug" because if there was no limit it would get in an infinite loop?
13:27:20 <Samu> depth is not increased after doing a 45 turn, then a 90, then another 45
13:28:18 <Samu> okay, not a bug, just a peculiar error when following track
13:28:52 <Samu> /* Change direction 4 times only */ if (!only_one_track && track != tpf->rd.last_choosen_track) {
13:30:07 <Samu> !only_one_track is false once it makes the entire 180 turn
13:30:42 <Samu> last choosen track is track_X, and after the 180, the track is still X
13:30:57 <Samu> it doesn't change direction, and keeps following it
13:31:26 <Samu> while the track is still X, the ship is now heading the opposite direction
13:31:37 <Samu> on a paralel track to the previous one
13:32:09 <Samu> depth is not increased :(
13:32:18 <Samu> in my opinion it should increase
13:38:04 <Samu> i suck at explainin things
13:40:35 <Wolf01> We should really remove the 90° turns, also canals
13:41:06 <Wolf01> No canals, no andy bitching for docks looking weird :D
14:16:36 <Samu> TrackBits bits = TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_WATER, 0)) & DiagdirReachesTracks(direction);
14:16:46 <Samu> Track last_choosen_track;
14:17:11 <Samu> Track track = RemoveFirstTrack(&bits);
14:18:01 <Samu> i must try with trackdir and trackdirbits instead
14:19:40 <peter1138> i think there's a patch for that
14:25:24 <peter1138> one of the git repos
14:30:42 <Samu> what is that? I dont use anything like that
14:48:01 <Wolf01> I think I'll try to drain some more resources from the second planet in astroneer... it's really annoying to build an underground settlement because the surface is... shit
14:49:44 <Wolf01> It's even more annoying to find out it didn't save
14:51:33 <Wolf01> Oh wait.. it did... but somewhat it loaded the original terrain
14:59:48 <crem> Did you know that (()) was not a palindrome! ())( is.
15:02:43 *** chomwitt has joined #openttd
15:07:17 *** chomwitt1 has joined #openttd
15:43:10 <Samu> how do i convert TrackdirBits to Trackdir? halp
15:44:48 <crem> TrackdirBits is a set of trackdir actually
15:45:02 <crem> So it can contain more than one trackdir
15:45:42 <crem> I have no clue what trackdirbits is, just googled fro "trackdirbits" and followed the first link.
15:47:22 <Samu> static inline TrackdirBits TrackdirToTrackdirBits(Trackdir trackdir)
15:47:30 <Samu> i was the conversion the other way
15:47:41 <Samu> TrackdirBitsToTrackdir, doesn't exist :(
15:49:54 <peter1138> while Trackdir maps easily to TrackdirBits, the other way doesn't
15:50:17 <peter1138> That applies to any of the X / XBits types
15:52:31 <Samu> TrackdirBits trackdirbits = TrackStatusToTrackdirBits(TrackToTrackBits(track) & DiagdirReachesTracks(direction)); Trackdir trackdir = RemoveFirstTrackdir(&trackdirbits);
15:59:27 <Samu> i got a TileIndex, i got a DiagDirection
16:03:21 <Samu> this conversion looks excessive, is there a way to simplify?
16:05:36 <Samu> all i want is the trackdir
16:05:44 <Samu> i need many conversions, kinda sucks
16:06:28 <Wolf01> Mmmh... I think I just tried to read the keyboard
16:11:11 <Wolf01> Weather says it's raining and 21°C, but is sunny, slightly cloudy and I bet no less than 25°C
16:11:56 <peter1138> ah no, it was track -> trackdir, not trackdir -> trackdirbits
16:16:47 <Samu> what do you mean? i'm a bit lost
16:31:03 <peter1138> 13:18 < Samu> i must try with trackdir and trackdirbits instead
16:31:03 <peter1138> 13:19 <@peter1138> i think there's a patch for that
16:31:30 *** mikegrb has joined #openttd
16:39:32 <Samu> im computing trackdir wrong still... grrr
16:47:04 <Samu> perhaps this is what I'm looking for
16:47:05 <Samu> Trackdir trackdir = TrackExitdirToTrackdir(track, direction);
16:49:21 *** Wormnest has joined #openttd
16:50:30 <Samu> will try TrackDirectionToTrackdir(Track track, Direction dir)
16:54:32 <peter1138> Just make up stuff.
17:00:04 <Samu> Trackdir trackdir = TrackEnterdirToTrackdir(track, direction);
17:02:29 *** Alberth has joined #openttd
17:02:29 *** ChanServ sets mode: +o Alberth
17:04:12 <Samu> TRACKDIR_X_NE != TRACKDIR_X_SW
17:04:29 <Samu> they're both TRACK_X, just different directions
17:05:22 <Samu> now, i wonder if this changes anything at all in the way it searches
17:10:54 <Samu> there's some differences in the chosen paths
17:11:26 <Samu> i wonder how the random function works
17:11:44 <Samu> /* if we reach this position, there's two paths of equal value so far. * pick one randomly. */ uint r = GB(Random(), 0, 8);
17:11:59 <Samu> Random is based on what?
17:23:16 <Samu> isn't random deterministic or
17:24:07 <Alberth> it usually is, except in a very complicated way
17:35:23 <Samu> comparing track vs trackdir, finally
17:36:05 <Samu> if deterministic doesn't fail me
17:36:14 <Samu> i expect some differences in the path chosen
17:38:13 <Samu> yep, it's different yet again
17:38:32 <Samu> different the same way as my previous comparison
17:40:53 <Samu> the real question now is... does it make it smarter?
17:42:09 <Samu> Alberth: do you understand opf pathfinder? what is the depth for
17:42:30 <Samu> i have a vague idea, can't see the whole picture
17:42:47 *** sla_ro|master has joined #openttd
17:49:57 <Alberth> no pictures there either?
17:51:31 *** TheMask96 has joined #openttd
18:11:55 <Samu> it feels less dumb, but still dumb
18:13:04 <Alberth> I don't know how opf works
18:14:06 *** FLHerne has joined #openttd
18:17:50 <Samu> testing fastforward on both
18:18:11 <Samu> see who reaches 2051 with the least cpu time
18:22:20 <Samu> interesting results so far, it's faster
18:22:51 *** frosch123 has joined #openttd
18:22:59 <Samu> and it's earning more money too
18:26:39 <Wolf01> Good onw, I'll get one of my wasabi kitkats
18:28:44 <frosch123> i am not a fan of green tea kitkats
18:36:03 *** andythenorth has joined #openttd
18:36:38 <Samu> instead of relying on track, it relies on trackdir
18:37:03 <Samu> but the pf is still dumb anyway
18:37:09 <Samu> just feels a little less dumb
18:39:47 *** Progman has joined #openttd
19:08:41 *** orudge` has joined #openttd
19:08:42 *** ChanServ sets mode: +o orudge`
19:14:59 <peter1138> anyone fancy fixing helicopter shadows on towers and oilrigs? :p
19:22:31 *** gelignite has joined #openttd
19:29:17 <Eddi|zuHause> you mean like, adjust shadow height by bounding box height? or actual 3D shadows with bump mapping all sprites? :p
19:34:45 *** andythenorth has joined #openttd
19:40:32 <Alberth> magic, with sprinkles
19:41:49 <frosch123> regular expressions?
19:42:25 <andythenorth> there are parts of programming that andythenorth doesn't
19:42:54 <andythenorth> I have about 5 parts of FIRS I have re-engineered
19:42:59 <andythenorth> except for the edge cases :P
19:43:14 <andythenorth> such bullet point notes I have :P
19:44:03 <Samu> trackdir was faster, but i doubt the authtenticy of my tests
19:45:44 <DorpsGek> Commit by translators :: r27847 trunk/src/lang/german.txt (2017-04-04 19:45:36 +0200 )
19:45:46 <DorpsGek> german: 19 changes by planetmaker
19:45:51 <andythenorth> eh, could try the trunk -> NRT merge :P
19:50:20 *** HerzogDeXtEr has joined #openttd
19:57:46 <Samu> i wonder so much what this modification do
19:58:02 <Samu> it's funny, i do stuff without knowing the results
19:59:39 <Samu> explain me how this pathfinder works
20:08:36 <andythenorth> it’s the day of unanswered questions
20:09:43 <Eddi|zuHause> more than usual?
20:27:54 * andythenorth shaves more yaks
20:33:55 <Samu> who can take a look at opf with me ? :( i'm sad
20:40:55 *** ChanServ sets mode: +v tokai
20:42:22 <debdog> oy! IIRC there was some talk in here not that long ago about a patch or something which enables players to zoom out the main map further. so to have more oversight without the need to open the map window. is this a thing or just an idea or WPI? if working, where can I get it?
20:42:55 <debdog> 've searched newgrfs for map and zoom without result
20:43:46 <ST2> as you said, it's a patch - not a newgrf
20:47:49 <debdog> Search found 383 matches
20:47:49 <debdog> Search term used: map zoom patch ignored: map Search these results:
20:48:00 <debdog> any hint please to what to look for
20:48:32 <debdog> hehe, that yellow font on grey background really hurts my eyes
20:49:19 <frosch123> you can also find a link in the topic
20:49:25 <frosch123> or a branch in jgr's git
20:49:28 <ST2> frosch123 to the rescue ;)
20:50:52 <debdog> oh, some neat patches there. thanks guys!
20:52:04 *** andythenorth has joined #openttd
21:02:19 *** andythenorth has joined #openttd
21:24:19 <andythenorth> such new bugs in FIRS
21:28:10 <Samu> how do i extract the direction out of a trackdir?
21:31:07 <Samu> there are 6 trackdirs, there are 8 directions
21:31:21 <Samu> actually, no, there are 12 trackdirs
21:32:28 <Wolf01> Maybe ignore crossings
21:32:47 <Samu> there's more actually, but i'm only interested in 12
21:33:28 <Samu> say, I got a TRACKDIR_X_NE, i wanna get DIR_NE
21:34:17 <Samu> TRACKDIR_UPPER_E - DIR_E
21:34:23 <Samu> TRACKDIR_LOWER_E - DIR_E
21:34:25 *** Stimrol has joined #openttd
21:42:47 <andythenorth> ach, debugging by reading the nml :|
21:42:59 <andythenorth> always a sign of losing
21:52:04 <Samu> Trackdir to Direction, how to convert?
21:56:26 *** orudge` has joined #openttd
21:56:26 *** ChanServ sets mode: +o orudge`
21:56:56 <Rubidium> why do you want direction?
21:57:17 <Rubidium> what does the direction tell you that you need to know?
22:05:13 <supermop> i have been listening to ennio morricone music for several hours now
22:06:28 <supermop> i don't know if i need any more direction than that, but i feel like living in some 19th C silver mining town in nevada now
22:06:59 <supermop> and/or studio backlot in 60s Italy
22:10:39 <Wolf01> Yep seen, yesterday I asked if that was you :P
22:10:40 <planetmaker> __ln__, my guess was actually on you being on vacation in London ;)
22:13:18 <Eddi|zuHause> except it says bristol, and that it's been going on for 13 years?
22:13:21 *** Wormnest has joined #openttd
22:13:32 <Wolf01> ln easier to spot than bansky XD
22:15:25 *** andythenorth has joined #openttd
22:24:20 <planetmaker> nighty nigh, a lberth :)
22:29:00 <__ln__> i've only corrected grammar on some signs inside elevators.
22:44:50 *** andythenorth has joined #openttd
23:10:13 *** Hiddenfunstuff has quit IRC
23:15:48 *** sim-al2 has joined #openttd
23:29:44 *** FLHerne has joined #openttd
23:31:53 <Samu> i still don't understand what depth does
23:39:18 <Samu> hmm, opf is depth-first search?
23:45:36 <supermop> but i assume the word 'depth' in terms of path-finding would be used in the same context
continue to next day ⏵