IRC logs for #openttd on OFTC at 2019-01-18
            
00:02:07 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7023: Use some consistency for project dependencies determination https://git.io/fh4XN
00:02:14 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7023: Use some consistency for project dependencies determination https://git.io/fhsl7
00:04:59 *** Thedarkb2-T60 has quit IRC
00:06:24 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7065: Change: Make ships stop and change direction slowly instead of instantly turning. https://git.io/fh413
00:07:06 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7065: Change: Make ships stop and change direction slowly instead of instantly turning. https://git.io/fh41C
00:41:26 *** APTX_ has quit IRC
00:41:36 *** APTX has joined #openttd
00:44:35 *** Thedarkb2-T60 has joined #openttd
00:44:46 *** APTX has quit IRC
00:45:52 *** APTX has joined #openttd
00:46:40 <Samu> doing 90 deg for ops is not becoming an easy task :(
00:46:55 <Samu> i still fail to understand how this whole thing works
00:48:09 *** APTX has quit IRC
00:48:12 *** APTX has joined #openttd
00:50:23 *** APTX has quit IRC
00:50:26 *** APTX has joined #openttd
00:51:21 *** tokai has joined #openttd
00:51:21 *** ChanServ sets mode: +v tokai
00:58:14 *** Samu has quit IRC
00:58:17 *** tokai|noir has quit IRC
00:58:41 *** Samu has joined #openttd
01:04:48 <DorpsGek_II> [OpenTTD/website] LordAro approved pull request #19: typo fix: idillic -> idyllic https://git.io/fh4Sg
01:05:07 <DorpsGek_II> [OpenTTD/website] LordAro merged pull request #19: typo fix: idillic -> idyllic https://git.io/fhcoV
01:08:18 *** Flygon has joined #openttd
01:12:22 <peter1138> Hmm, non-stack is slower.
01:12:42 <peter1138> I wonder where I messed up :p
01:13:33 <peter1138> Oh shit, way too late, night night
01:33:53 *** Thedarkb-X40 has joined #openttd
01:40:14 *** Thedarkb2-T60 has quit IRC
01:41:22 *** snail_UES_ has joined #openttd
03:02:33 <Samu> i think i made it
03:02:40 <Samu> 90 degrees for opf
03:02:46 <Samu> still wanna make sure
03:16:24 *** HerzogDeXtEr has joined #openttd
03:59:42 <Samu> hmm, there are some situations where it's ideal for opf not to reverse based on bird_dist
04:19:30 *** HerzogDeXtEr has quit IRC
04:20:36 *** HerzogDeXtEr has joined #openttd
04:26:12 *** HerzogDeXtEr has quit IRC
04:26:30 *** Wormnest has joined #openttd
04:28:22 *** HerzogDeXtEr has joined #openttd
04:31:09 *** HerzogDeXtEr has quit IRC
04:56:05 *** Wormnest has quit IRC
04:58:04 *** D-HUND has joined #openttd
05:01:27 *** debdog has quit IRC
05:06:44 *** Samu has quit IRC
05:16:24 *** glx has quit IRC
05:29:42 *** Thedarkb-X40 has quit IRC
05:47:17 *** snail_UES_ has quit IRC
05:52:47 *** tokai|noir has joined #openttd
05:52:47 *** ChanServ sets mode: +v tokai|noir
05:59:29 *** tokai has quit IRC
08:03:47 *** HerzogDeXtEr has joined #openttd
08:24:34 *** HerzogDeXtEr has quit IRC
08:59:16 *** chomwitt has joined #openttd
09:10:16 *** WWacko1976-work has joined #openttd
09:26:50 *** tokai has joined #openttd
09:26:50 *** ChanServ sets mode: +v tokai
09:33:39 *** tokai|noir has quit IRC
09:56:28 <peter1138> Hmm, can't convert a Trackdir to a TrackdirByte.
09:56:47 <peter1138> Which is odd, cos I could earlier.
10:08:47 <DorpsGek_II> [OpenTTD/OpenTTD] Gabda87 updated pull request #7047: Add #6887: Highlight tiles within local authority of towns https://git.io/fhn44
10:11:33 <peter1138> Ah, I can assign a Trackdir to a TrackdirByte *, but not directly. Hmm.
10:40:54 *** andythenorth has joined #openttd
10:44:37 <peter1138> andythenorth will know.
10:51:02 *** andythenorth has quit IRC
10:53:06 <peter1138> I see.
11:16:15 <LordAro> lol
11:19:23 <peter1138> Mmm, white chocolate covered oreo biscuit.
11:19:43 <peter1138> Well, "snow" covered they called them.
11:20:07 <peter1138> Fortunately it's not snow, because then I'd have a soggy biscuit.
11:36:12 *** tokai|noir has joined #openttd
11:36:12 *** ChanServ sets mode: +v tokai|noir
11:43:09 *** tokai has quit IRC
12:09:33 <peter1138> Ok...
12:09:44 <peter1138> TrackdirByte a = pNode->GetTrackdir() does not work;
12:09:52 <peter1138> TrackdirByte a; a = pNode->GetTrackdir() does work.
12:09:57 <peter1138> . . . . .
12:11:33 <peter1138> And it's not because of the method. TrackdirByte a = TRACKDIR_X_NE; also does not compile.
12:13:03 <peter1138> Have I got a compile bug here? :p
12:37:57 *** Mahjong has joined #openttd
12:42:22 *** Mahjong1 has quit IRC
12:45:38 <michi_cc> peter1138: TinyEnumT has an assignment operator for the enum type, but not a constructor.
12:51:07 <peter1138> Ah. Adding it breaks compilation too, elsewhere :D
13:12:37 <Eddi|zuHause> sounds like you're having fun
13:15:13 <peter1138> I can settle for assignment, just looks a bit weird.
13:18:17 <LordAro> that is sad
13:18:44 <LordAro> TinyEnumT can be replaced with c++11 enums now, i think
13:40:43 <Eddi|zuHause> i know, let's completely rewrite openttd in a MODERN language
13:44:27 <peter1138> :D
13:44:29 <peter1138> Delphi!
13:44:36 <peter1138> </belugas>
13:44:43 <LordAro> lol
13:45:22 <Eddi|zuHause> the most hyped and vivid language of the decade!
13:45:42 <peter1138> It was RAD! Rapid Application Developmenet!
14:11:15 <peter1138> But spelled correctly.
14:26:55 *** snail_UES_ has joined #openttd
14:47:33 *** snail_UES_ has quit IRC
14:54:09 <peter1138> https://www.tt-forums.net/viewtopic.php?f=33&t=84713
14:54:12 <peter1138> ^ this guy again, lol
14:57:50 *** Flygon has quit IRC
15:06:44 *** Samu has joined #openttd
15:06:58 <Samu> hi
15:07:13 <planetmaker> well, at least he knows some stuff. And it's not the worst of ideas. But tmwftlb IMHO
15:08:49 *** Extrems has quit IRC
15:09:37 <peter1138> Not sure it's the same guy, as this one offer to put something together, instead of ... well...
15:10:19 *** Extrems has joined #openttd
15:10:21 <peter1138> Hmm, how close are we to nightlies? And are they a good thing? We seem to have more active contributors at the moment... :p
15:13:03 *** acklen has quit IRC
15:13:08 *** acklen has joined #openttd
15:14:23 <planetmaker> that guy is also here on IRC and on github and yesterday(?) made the PR which started with a one spelling fix (but changed it to more fixes)
15:14:55 <peter1138> :D
15:15:00 <peter1138> Ah, different guy then, phew.
15:20:20 <LordAro> the regression tests are woeful, it must be said
15:20:29 <LordAro> it's difficult to make unit tests for gamea
15:20:38 <LordAro> just because of the amount of global state
15:26:43 <Eddi|zuHause> yeah, what constitutes a "unit"?
15:27:26 <Eddi|zuHause> it doesn't make a whole lot of sense to force "unit" tests on a thing that wasn't designed with "units" in mind
15:46:46 <Samu> initial tests with 90 degrees for opf makes it less cpu intensive
15:46:54 <Samu> and dumber
15:51:52 <Samu> i have a savegame with locks and aqueducts, wanna test it?
15:52:04 <Samu> your cache for ships testing?
15:52:27 <Samu> and buoys and yapf and forbid 90 deg
15:52:47 <Samu> played by a human
15:57:19 <peter1138> No because my cache is only for YAPF.
15:57:24 <peter1138> OPF is dead.
15:57:29 <peter1138> Legacy code.
15:57:40 <Samu> it's yapf
16:02:21 <Eddi|zuHause> ok: first "unit" test: code marked as "legacy" shall not be changed
16:04:10 *** HerzogDeXtEr has joined #openttd
16:06:11 <peter1138> :p
16:06:31 <peter1138> I'm not interested in its performance.
16:06:58 <Samu> sec
16:07:08 <peter1138> But I misunderstood Samu, he has a savegame for me to test, not his 90 degrees stuff.
16:08:39 <Samu> https://github.com/OpenTTD/OpenTTD/issues/5531
16:08:56 <Samu> it's old, but it's played by a human, on a multiplayer server
16:09:27 <Samu> ignore the problem being reported, i think it was already taken care of, what matters is that it got aqueducts, buoys, yapf, 90 deg
16:10:55 <Samu> and locks
16:16:07 <Samu> hmm, i think i just deleted a table from opf
16:16:10 <Samu> lol
16:16:26 <Samu> it apparently isn't necessary
16:18:58 <Samu> instead of DiagDirection, I am making it use Trackdir, which is more precise, allows me to add support to forbidden 90 degrees, and a bonus of removing a table :)
16:19:09 <Samu> win win win
16:19:50 *** sla_ro|master has joined #openttd
16:24:03 <Samu> waiting for asserts
16:24:18 <Samu> if i don't get an assert, i'm gonna pr
16:30:28 *** stefino has joined #openttd
16:34:01 <stefino> hi, is possible to add sounds for industry?
16:35:07 <stefino> cause basic industries has a sounds but I can't find any callback or somethink like that like in vehicles
16:36:33 <Eddi|zuHause> what about https://newgrf-specs.tt-wiki.net/wiki/Action11 ?
16:36:59 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick opened pull request #7070: Feature: Forbid 90 degrees for OPF https://git.io/fhRwt
16:37:55 <stefino> Eddi|zuHause: mmm, this looks good but is it possible for NML too?
16:38:27 <Eddi|zuHause> dunno, never tried to use it
16:39:25 <stefino> it is only idea ho to make our industry set better
16:40:03 *** Wormnest has joined #openttd
16:41:56 <Eddi|zuHause> in nml/regression there's a sounds.nml file which has lines like: param[0] = sound("beef.wav", 80);
16:43:32 <Eddi|zuHause> where i assume "param[0]" would then contain the ID of that sound
16:44:05 <peter1138> Ah, SlList is actually a SlRefList.
16:46:21 <stefino> Eddi|zuHause: uh :D o.o ¨
16:46:47 <Eddi|zuHause> stefino: i can't find it on the nml wiki
16:47:56 <stefino> mmm, I ll ty to ask on forum if somebody has experience with this
16:48:49 <stefino> but if you're right, it's good that it is possible :)
16:54:24 <Samu> i see opf reversing in situations where it looks ugly
16:54:33 <Samu> but that's another matter
16:54:40 <Samu> not related to what i've done now
16:57:14 <peter1138> Well it compiled, let's ship :p
17:02:08 <Samu> yes plz
17:03:29 *** nielsm has joined #openttd
17:08:22 <LordAro> peter1138: pun unintended?
17:14:42 <DorpsGek_II> [OpenTTD/OpenTTD] gregcarlin updated pull request #7003: Feature #6918: Add option to adjust font size separately from GUI size. https://git.io/fhLFX
17:39:17 *** frosch123 has joined #openttd
17:45:08 <Samu> next goal: let's make OPF not reverse
17:45:39 <Samu> in very much all situations where there's tracks ahead
17:45:44 <Samu> let's see
17:51:19 <Samu> so basically, cut in half the cpu usage needed
17:51:30 <Samu> sounds too good to be true if it works
18:01:24 <Samu> this means the skiptile isn't needed anymore
18:01:42 <Samu> less code
18:03:24 <Samu> which also means, the structure can be reduced in size
18:03:59 <Samu> bird dist are also not important
18:04:12 <Samu> lenght also not
18:04:22 <Samu> less structure!
18:05:36 <Samu> oh no, i actually need bird dist and length
18:05:49 <Samu> i almost could see a way not requiring it
18:05:58 <Samu> but... will see about it, later
18:10:12 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #7070: Feature: Forbid 90 degrees for OPF https://git.io/fhRys
18:11:41 <Samu> i dont need to return a bird dist however, only the track
18:14:58 <Samu> it's not dead, it's in the game :(
18:15:14 <Samu> some servers still use it
18:22:21 <Samu> it doesn't really cut cpu usage in half, but cuts about 1/3
18:22:23 <Samu> not bad
18:22:28 *** Thedarkb2-T60 has joined #openttd
18:22:47 <Samu> because it doesn't need to pathfind to decide whether it's better to reverse
18:23:45 <Samu> if it actually needs to reverse, then it's because the track ahead is non-existant, not because of a bird_dist being lower on reverse
18:26:08 *** Progman has joined #openttd
18:26:37 <Samu> did u change something about mouse pointer?
18:26:49 <Samu> i can't sell large ships properly
18:27:22 <Samu> well I can, but drag and drop feels like it's on the right part of the ship instead of middle
18:27:33 <Samu> i started dragging from the middle
18:39:37 <Eddi|zuHause> didn't we want to go the opposite direction? allowing 90° for the other ones?
18:40:40 <Samu> I'm too biased to answer
18:42:46 <Samu> the only situation where it's better to reverse is when leaving depot
18:43:39 * peter1138 returns.
18:43:49 <Samu> it points the ship direction towards north, and sometimes that's not the best direction
18:44:03 <Samu> what can I do to avoid calling the pathfinder here?
18:52:49 <peter1138> Yay, it crashes.
18:53:57 <Samu> what crashed? my stuff?
18:54:11 <peter1138> No, mine.
18:54:18 <Samu> :|
18:55:06 <Samu> how do I detect the vehicle just poped out of depot
18:55:13 <Samu> the ship, in this case
18:58:12 <Samu> TRACK_BIT_DEPOT
18:58:16 <Samu> hmm
19:02:01 <Samu> ...// OPF always allows reversing
19:02:03 <Samu> COUGH
19:14:52 <Samu> hmm ok, gonna let opf pathfind twice when v->state == BIT_TRACK_DEPOT
19:15:02 <Samu> reverting some code :(
19:15:41 <peter1138> Foiled again, I need runtime template parameters :p
19:19:03 *** stefino has quit IRC
19:33:31 <Samu> i'm changing OPF to allow reversing only when leaving depot
19:33:52 <Samu> it's still about 1/3 less cpu usage
19:34:22 <Samu> is there any other situations where it's better for opf to reverse?
19:34:27 <Samu> that I'm not aware atm
19:34:28 <Samu> ?
19:34:38 *** Wolf01 has joined #openttd
19:45:43 <peter1138> Hmm, have I actually got std::deque saveload working? o_O
19:45:54 <Wolf01> o/
19:46:46 *** gelignite has joined #openttd
19:47:13 <Samu> running along an aqueduct
19:47:18 <Samu> cannot reverse
19:47:24 <Samu> in any of the pf's
19:48:06 <Samu> which is fine for me
19:48:29 <Samu> running along a lock, only opf reverses, but i changed it to not reverse
19:48:50 <Samu> what else
19:49:47 <Eddi|zuHause> <peter1138> Foiled again, I need runtime template parameters :p <-- you mean, like, normal parameters? :p
19:50:42 <Samu> following a canal line, and skipping an order to go to a dock located in the opposite direction, yapf and opf behave ugly, npf behaves best, but displays ship is lost
19:51:07 <peter1138> Eddi|zuHause, nope.
19:52:17 <peter1138> I settled for a switch block to decide which template to use.
19:53:44 <Samu> perhaps the intention is to "behave ugly" because there is actually a track on the sides which are used to reverse and reduce distance
19:54:08 <Samu> that could mean npf, while "behaving pretty", is bugged
19:55:10 <peter1138> They aren't meant to behave the same. They are different pathfinders.
19:56:18 <Samu> well, i know, but i'm just trying to achieve some consistency
20:12:39 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick opened pull request #7071: Change: Make OPF check reverse only when exiting depot https://git.io/fhRNP
20:16:54 *** andythenorth has joined #openttd
20:18:04 <andythenorth> yo
20:18:11 <Samu> hi
20:18:21 <andythenorth> electro-diesel pax train for Horse? o_O
20:18:33 <peter1138> electro-diesel horses.
20:18:36 <Wolf01> So, andythenorth, save money for upcoming summer sets or waste what I have in the wallet for... anything I can grab now?
20:18:51 <andythenorth> peter1138: turbo horse
20:18:56 <Heiki> hydrogen horses!
20:19:09 <andythenorth> Wolf01: how much room have you got?
20:19:14 * andythenorth has way too much Lego
20:19:25 <andythenorth> I'm going to give some to my kids school
20:19:28 <andythenorth> tto get rid
20:19:34 <Wolf01> Meh, I forgot about the room
20:19:49 <andythenorth> you don't have everything 2018 already?
20:19:54 <Wolf01> Nope
20:20:21 <andythenorth> big blue tow truck?
20:20:34 <Wolf01> Yes, I have that
20:20:36 <andythenorth> it's got a wolf sticker
20:20:38 <andythenorth> it's crap
20:20:43 <andythenorth> but my kids like it
20:20:47 <Wolf01> Still MISB
20:20:51 <andythenorth> mack?
20:20:57 <Wolf01> Yep
20:21:54 <andythenorth> forest machine is crap
20:22:00 <andythenorth> volvo zeux is weird
20:22:04 <andythenorth> rally car is blah blah
20:22:07 <Wolf01> I purchased 2 EV3, a full sets of motors, cables, battery, sensors, and the entire overwatch series, so I should wait a bit for purchases
20:22:24 <andythenorth> there's nothing there I'd buy
20:22:44 <Wolf01> Forest machine is on the living room, waiting to become the next part donor
20:23:02 <andythenorth> it's crap
20:23:09 <andythenorth> real shame, it looks quite boss
20:23:13 <andythenorth> and is fun to drive
20:25:02 <Wolf01> BTW I'll go only for big sets, mid sets as parts donors, maybe 1 or 2 small sets if I really like them
20:25:23 <andythenorth> it's all a bit blah blah to me
20:26:25 <Wolf01> But for the next year I'll go full microscale
20:29:09 <andythenorth> eh loads of github notifications
20:29:14 <andythenorth> $someone was busy
20:31:16 *** Gja has joined #openttd
20:38:16 <DorpsGek_II> [OpenTTD/OpenTTD] andythenorth commented on pull request #7071: Change: Make OPF check reverse only when exiting depot https://git.io/fhRx9
20:39:34 *** Wormnest has quit IRC
20:53:19 *** Wormnest has joined #openttd
20:54:58 <Samu> hmm got an assert, have to test this better
20:57:57 *** glx has joined #openttd
20:57:57 *** ChanServ sets mode: +v glx
20:59:59 <Samu> ah, i see
21:00:10 <Samu> i get an assert when testing with both changes combined
21:00:28 <Samu> but when testing in separate, no asserts occur
21:00:40 <Samu> hmm, how to solve
21:06:11 <m1cr0man> I just discovered the caca renderer, and I am so impressed :D
21:06:23 <m1cr0man> quick question though, uh, how do I exit it? XD
21:06:33 <glx> use the menu ;)
21:06:40 <m1cr0man> EMM
21:06:53 <glx> alt-F4 may work
21:08:09 *** Wormnest has quit IRC
21:57:40 *** gelignite has quit IRC
21:57:44 *** Yotson has quit IRC
21:59:20 *** Yotson has joined #openttd
22:02:00 *** Samu has quit IRC
22:06:07 *** Samu has joined #openttd
22:07:40 *** erani has quit IRC
22:16:52 <Samu> yes, i made it! forbid 90 deg + dont check reverse combined
22:18:11 <Samu> results in about 50% less cpu usage
22:18:17 <Samu> @calc 40/90
22:18:17 <DorpsGek> Samu: 0.444444444444
22:18:24 <Samu> 55% then
22:18:45 <andythenorth> is your proposal to replace YAPF with OPF?
22:18:54 <Samu> no
22:19:06 <Samu> keep them all
22:20:49 <peter1138> Hmm
22:21:13 <peter1138> I need grid lines on water tiles :p
22:27:13 <andythenorth> :o
22:27:26 <andythenorth> such why?
22:29:01 <Samu> 5000 ships + opf + forbid 90 deg + no reverse game speed factor is still below x1.00
22:30:15 <Samu> unsure where else to improve
22:30:27 <Samu> it's at 0.70x
22:30:43 <peter1138> andythenorth, for easy counting of tiles moved.
22:30:50 <andythenorth> when we delete OPF, game speed factor with it will be ∞
22:31:17 <Samu> t.t
22:31:18 <andythenorth> peter1138: bulldoze altternating squares :P
22:32:32 <glx> put signs
22:33:42 <andythenorth> redraw an entire base set? o_O
22:33:57 *** Speedy` has quit IRC
22:34:06 <peter1138> Well, just 1 tile...
22:37:03 <peter1138> Hmm, when I follow the ships path to the end, it stops differently at docks.
22:37:08 *** Speedy` has joined #openttd
22:38:01 <peter1138> If I ignore the last trackdir of the path, the ship reaches the end, does a new pathfind, and stops as it does without the cache.
22:38:14 <peter1138> Am I missing some special casing? :/
22:38:43 <peter1138> I'm only fiddling inside ChooseShipTrack() so anything special in the controller will still happen.
22:38:55 <peter1138> Hmm, path costs maybe.
22:39:13 <Samu> destination being the same as where the ship is?
22:40:00 <peter1138> Oh, yeah. Hmm.
22:40:23 *** sla_ro|master has quit IRC
22:40:28 <andythenorth> Samu is now our best pathfinder expert :)
22:41:01 <peter1138> /* handle special case - when next tile is destination tile */
22:41:04 <peter1138> it's even in the comments :p
22:41:40 * Wolf01 booked a fly for Billund
22:45:34 <m1cr0man> Is there a way to default vehicle cloning to share orders?
22:47:15 *** wodencafe has quit IRC
22:47:24 <peter1138> With that 'fix' the savegame runs quite a bit slower :(
22:47:52 <peter1138> No longer realtime.
22:49:34 <Samu> which fix?
22:49:47 <peter1138> Mine.
22:49:51 <Samu> oh
22:49:57 <peter1138> I just pop the last trackdir off the stack
22:50:25 <peter1138> Oooh got it!
22:50:29 <peter1138> Back to realtime.
22:53:50 <peter1138> 16ms instead of 30ms, wow
22:53:56 <Samu> :)
22:54:11 <peter1138> Oh, and that's 16ms instead of 60ms without any path cache
22:54:36 <Samu> woah, impressive gains
22:55:51 <andythenorth> Wolf01: legoland? o_O
22:56:26 <peter1138> http://fuzzle.org/~petern/ottd/shipcache2.png
22:57:03 <andythenorth> super duper
22:57:17 <andythenorth> 5000 ships?
22:57:18 <Samu> which savegame is that?
22:57:31 <peter1138> That 5000 ship one you gave me with the dodgy AI.
22:57:35 <peter1138> Lots of blocked routes.
22:57:49 <Samu> Otvi?
22:57:57 <Samu> that's 1000~ ships
22:58:14 <Samu> nonocab?
22:58:17 <Samu> nocab?
22:58:57 <peter1138> nocab v499 (y), 1.6.1-rc1.sav
22:59:01 <Wolf01> <andythenorth> Wolf01: legoland? o_O <- yup
22:59:20 <Samu> ah
22:59:29 <peter1138> Hmm
22:59:30 <Wolf01> Lego house + legoland
22:59:39 <peter1138> the nonocab one drops to 2.3ms per tick
23:00:03 <Samu> have you tested the otvi?
23:00:13 <peter1138> no
23:00:30 <Samu> otvi with npf, switch it to yapf, should be the slowest of the pack i got here
23:00:38 <Samu> and only 1000~ships
23:00:41 <peter1138> nonocab drops from 3.85ms to 2.9ms,
23:00:51 <peter1138> an improvement but not struggling to start with
23:01:02 <peter1138> Can you link it again?
23:01:05 <Samu> ok
23:01:16 <Samu> letme find it in the forum
23:01:49 *** Wormnest has joined #openttd
23:02:09 <frosch123> hmm, eints repo does not include a copy of the gpl
23:02:10 <peter1138> I probably ought to test path blockages again.
23:02:35 <Samu> https://www.tt-forums.net/download/file.php?id=195263
23:03:06 <Samu> it's the one named OtviAI v418 (N), 1.6.1
23:03:18 <Samu> it's NPF, so don't forget to switch to yapf
23:04:24 *** andythenorth has quit IRC
23:04:52 <peter1138> That runs much faster than the one I'm testing.
23:05:06 <peter1138> It spikes without the cache, but is still usuable.
23:05:09 <peter1138> usable.
23:05:20 <peter1138> 7.5ms without cache
23:05:23 <peter1138> 0.9ms with cache
23:05:27 <Samu> well then :(
23:05:28 <peter1138> that's... actually very impressive.
23:05:48 <Samu> i guess there's no worse than nocab :(
23:06:09 *** wodencafe has joined #openttd
23:06:11 <peter1138> nocab suffers because of the blockages. no route is basically the worst possible outcome.
23:06:30 <peter1138> K, I gotta make this PR-able.
23:06:48 <peter1138> Cos this little experiment turns out to work really well.
23:09:10 <Samu> make it check if there are tracks at the destination tile
23:09:19 <peter1138> It does.
23:09:42 <Samu> and prevent pathfinding? hmm probably not a good idea
23:09:56 *** Thedarkb-X40 has joined #openttd
23:10:03 <peter1138> Hmm? No, if there are no tracks it abandons the cache and pathfinds again.
23:10:19 <peter1138> That should only happen if terrain is changed under the path.
23:13:17 *** wodencafe has quit IRC
23:14:05 <peter1138> Hmm, can I reorder commits...
23:14:24 *** wodencafe has joined #openttd
23:16:11 <peter1138> Yes, just fiddle in git rebase -i :0
23:17:37 <nielsm> today's even dumber project: installed openwatcom and wrote a C program to control the TTD DOS music driver
23:17:45 <nielsm> current challenge: timing
23:18:18 <nielsm> (the built-in delay() function doesn't have 1 ms resolution as they suggest, it's much slower)
23:22:08 <nielsm> https://0x0.st/shxW.webm
23:27:36 *** frosch123 has quit IRC
23:31:37 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7072: Change: Add path cache for ships https://git.io/fh0Yl
23:36:30 <peter1138> ^ Maybe Samu will implement the cache for OPF :p
23:38:35 <Wolf01> :D
23:39:36 <peter1138> Doesn't help with Wentbourne Transport save.
23:40:12 <peter1138> Train and RV ticks outnumber ships massively in that.
23:41:10 <Samu> eh, i doubt it'll help that much
23:41:30 <Samu> most of the time opf doesn't reach destination
23:41:34 <peter1138> Even with no trains *running* it uses 20ms per tick for trains.
23:42:01 <peter1138> 4833 trains.
23:43:06 <peter1138> Okay, maybe it needs a 'cache' of train heads, instead of iterating all ... however many vehicles there are.
23:44:09 <peter1138> Yeah, with that all paused, ship ticks drops from 3.4ms to 2ms. Significant but no impact.
23:48:39 <peter1138> nielsm, hmm... this framerate window...
23:49:46 <nielsm> it rates your frames
23:49:48 <peter1138> I removed the performance counter for train ticks, and ... it's a massive difference :(
23:50:03 <nielsm> :(
23:50:39 <peter1138> game loop total average with 135ms, average without 92ms. That's just removing it for trains.
23:50:58 <peter1138> 8 fps -> 12 fps
23:51:05 <peter1138> Still not playable but better.
23:51:06 <nielsm> okay yeah
23:51:41 <peter1138> Maybe it needs to be turn-off-able
23:52:29 <nielsm> if vehicle processing was grouped so it first did all trains, then all rvs, then all ships, etc
23:52:36 <peter1138> Yeah, I know.
23:52:42 <nielsm> the individual vehicle counting wouldn't be needed
23:52:43 <peter1138> Ok, RVs is not a problem.
23:52:53 <peter1138> It's because it's running even for *non-head* trains.
23:53:26 <nielsm> building lists of vehicles that actually need to be processed would be a good idea I think
23:53:34 <peter1138> Yes.
23:54:08 <peter1138> Okay, only counting ticks of train heads improves it massively.
23:54:34 <peter1138> It's basically the same as not counting it.
23:54:44 <peter1138> 95ms average
23:55:00 <peter1138> of course train ticks is then slightly wrong, but it's not skewing it massively like before.
23:55:40 <peter1138> I wonder, is it reasonable to stop performance counting if the gui is not open?
23:57:24 <nielsm> imo not
23:57:44 <nielsm> part of the idea was also to let you run it on headless servers
23:57:56 <nielsm> (there is a console command)
23:57:58 <peter1138> Well you could add a command to enable/disable it.
23:59:50 <nielsm> I'd rather optimize the game so it doesn't need to accumulate thousands of individual calls