Config
Log for #openttd on 28th February 2024:
Times are UTC Toggle Colours
00:01:11  <_glx_> anyway the special handling is from the time without docking tiles, it's probably not needed now
00:01:35  <peter1138> They can, yes, but that doesn't change the available track bits.
00:01:45  <_glx_> it's when the only way to detect the dock was to bump it
00:16:57  <peter1138> I think it's meant to make the ship arrive and not change direction as it reaches the dock -- it limits track bits to the current ship direction if that track bit is available.
00:17:35  <peter1138> Not sure if that's a work around for bumping, or just to make it look nicer.
00:38:15  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1212197036313677875/image.png?ex=65f0f576&is=65de8076&hm=1c482cc21ed6c3c91c490da6a658287fe103a96d789e9e06e1dfec9a69237334&
00:38:15  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1212197036628385802/image.png?ex=65f0f577&is=65de8077&hm=494258ba259058f4e92cddd097bcd535e112945e42b9d17f8df2fa020d893057&
00:38:15  <peter1138> Hmm.
00:49:48  <johnfranklin> https://cdn.discordapp.com/attachments/1008473233844097104/1212199942081351792/image.png?ex=65f0f82b&is=65de832b&hm=577d0ae2d1e346bad34a2478adaa9c29005d3afec443c70ec4c84fa637c39154&
00:49:48  <johnfranklin> No
00:54:00  <belajalilija> What needs my approval exactly
00:54:18  <belajalilija> The kiosk car thing?
00:57:40  <johnfranklin> belajalilija: Extend vehicle life (remember some have only 8 years)
00:58:54  <belajalilija> I’ll ask meja and brick
01:01:26  <belajalilija> I’ve asked
01:02:10  <belajalilija> Aside from agreeing what vehicles to draw I largely want to leave brickblock and meja alone
01:03:53  <belajalilija> I think the way we write the code should be consistent and the art style
01:04:22  <belajalilija> But i don’t expect either of them to write all the little notes i do
01:04:28  <belajalilija> And such
01:09:40  <belajalilija> Theres only 2 ways in which i will fuck with their work
01:11:38  <belajalilija> 1 it is a good time to do a release but their stuff isn’t ready and they cant be rushed, in such case I’ll disable the vehicle in the code for the bananas release, I already plan to do this with some of my stuff
01:12:58  <belajalilija> 2 they leave the project and i get an urge to redraw something they have already worked on, in such case I’ll all a param to enable old/new sprites so their work isnt lost, whichever they prefer
01:15:05  <belajalilija> I think av8 has a param like that
01:16:40  <belajalilija> belajalilija: And even if i do this I’ll still aim to keep their versions up to date in terms of liveries
02:02:33  *** herms has quit IRC
02:03:13  *** herms has joined #openttd
03:01:12  *** Flygon has quit IRC
03:50:47  *** D-HUND has joined #openttd
03:54:05  *** debdog has quit IRC
03:56:11  *** gnu_jj_ has joined #openttd
03:59:36  *** gnu_jj has quit IRC
04:05:51  *** D-HUND is now known as debdog
05:08:57  *** keikoz has joined #openttd
05:35:21  *** Ox7C5 has joined #openttd
06:20:01  *** keikoz has quit IRC
06:26:22  *** Ox7C5 has quit IRC
06:26:31  *** Ox7C5 has joined #openttd
06:36:47  <kuhnovic> xarick: Well I'm not the one to decide if you should PR or not. But I don't see what problem you have solved here tbh. I agree with peter1138: why do we need to bother with a special case?
07:30:31  *** HerzogDeXtEr has joined #openttd
08:37:00  *** SigHunter has quit IRC
08:40:02  *** SigHunter has joined #openttd
08:49:29  <peter1138> Shall I do my favourite test? How did TTD behave...
08:51:24  <belajalilija> TTD, wasn’t there a limit of 80 vehicles per type?
08:51:32  <belajalilija> Let’s bring that back
08:51:37  <belajalilija> Hard coded limit
08:52:06  <peter1138> Sure.
08:52:26  <belajalilija> Excellent
08:58:02  <ahyangyi> Why do rail/road/tram types have only 2 random bits
08:58:33  <ahyangyi> they don't have triggers, and the random bits are derived from locations -- seems there's no computational burden to provide a few extra bits?
08:59:05  <ahyangyi> nor is there any savegame size or compatibility concerns
09:07:46  <peter1138> Next you'll be asking why it isn't a proper hash function.
09:31:20  <andythenorth> peter1138: there wasn't a mac version, so that's a feature we could drop? 😛
09:31:56  <peter1138> "Is this a regression?"
09:39:17  <ahyangyi> peter1138: Well, I won't ask that, though getting direct access to X/Y values would help
09:39:28  <ahyangyi> After which one can use whatever "proper" hash function they like
09:40:30  <ahyangyi> So this question actually has two parts:
09:40:44  <ahyangyi> 1. can we add access to X/Y coordinates
09:40:59  <ahyangyi> 2. if 1 isn't going to happen, can we extend a few random bits
09:42:16  <peter1138> Can we add truly random data?
09:42:28  <ahyangyi> Why
09:42:31  <peter1138> Although that would really wind up certain people 😄
09:42:51  <ahyangyi> Truly random data means save format changes, bigger saves and other side effects
09:42:55  <peter1138> No reason, just pondering.
09:42:58  <ahyangyi> which I'm not asking for
09:44:03  <locosage> hmmm `X Error of failed request:  BadValue (integer parameter out of range for operation)`
09:44:10  <peter1138> None of that (other than bigger saves due to actually storing random data for no reason) is true 🙂
09:44:17  <locosage> I had that before but in 13.4 I can fix that with `-v sdl`, not in 14.0
09:45:14  <ahyangyi> peter1138: I doubt people will like that saving and loading a game and seeing their roads change their look-and-feel
09:46:03  <ahyangyi> Of course if you add truly random data that's **not** used anywhere, that's another story...
09:57:18  *** gwyd4016 has joined #openttd
09:57:18  <gwyd4016> With the new TTF default font, NewGRFs that modify individual font sprites get ignored unless the old style sprite font setting is enabled, is this the desired behaviour? Can this setting be passed on to NewGRFs that want to modify sprite fonts so they can throw an error?
09:57:20  <peter1138> ahyangyi: Anyway the answer to this question is: nobody has had a need to increase the number of random bits and submitted a PR to change it.
09:57:56  <peter1138> What do NewGRFs do with individual characters?
09:58:08  <gwyd4016> Somewhat silly things
09:58:13  <gwyd4016> Replace them with icons
09:58:21  <peter1138> Throwing an error based on a user setting is not a particularly good idea.
09:58:56  <gwyd4016> Or at least a warning, some NewGRFs will self disable with incorrect configs
09:58:57  <peter1138> That setting can be changed at any time.
09:58:58  <gwyd4016> https://cdn.discordapp.com/attachments/1008473233844097104/1212338144968450048/image.png?ex=65f178e1&is=65df03e1&hm=38108abb5acf3e7b9ec7c2bc5d3b996975b2dd38f793640c200112bb5d9e4a8d&
09:59:09  <gwyd4016> That is a good point
09:59:20  <gwyd4016> I guess this is more readme content than needing a warning
10:04:08  <peter1138> They also won't work for people using CJK languages.
10:07:43  <peter1138> How many different string-based icons are people useing...
10:12:00  <reldred> Changing fonts in OTTD has been around a long time, and have hardly been niche, a grf to replace characters with symbols is a pretty niche use.
10:13:22  <peter1138> But as a feature, it could be supported with a dedicated private-use area.
10:13:41  <peter1138> And hope that different NewGRFs don't use the same codepoints 😄
10:15:06  <peter1138> Doesn't help the size disparity issue though, but maybe SVG sprites could help there.
10:21:36  <kuhnovic> Do we have a function to generate a random bit? I need to generate a random Trackdir from TrackdirBits
10:23:26  <_zephyris> Hmm, I coded contextual substitutions to replace `{train}` with the train symbol etc... I wonder if I ever _removed_ that
10:25:46  <peter1138> You mean the literal text `{train}`?
10:25:51  <_zephyris> Yup
10:26:06  <peter1138> Nice for testing at least 🙂
10:29:17  <peter1138> Oh yes, for SVG you wanted a sprite sheet. Not sure how that should work.
10:35:14  <peter1138> (Either split before embedding into GRF, or split within OpenTTD)
10:36:58  <ahyangyi> peter1138: Yep, hence the question here, what way of implementation is the most likely to get accepted?
10:37:50  <ahyangyi> I don't feel like delving into openttd source code for 20 hours only to submit a PR that gets refused because that's something people dislike
10:40:02  *** tokai|noir has quit IRC
10:40:37  <ahyangyi> As long as there are no objections, I think I can go ahead and increase the bits
10:42:33  <_zephyris> peter1138: Split on grf encode, surely
10:42:41  <peter1138> I'll save you 20 hours. It's very near the top of newgrf_railtype.cpp/newgrf_roadtype.cpp.
10:42:54  <_zephyris> That's how sprite sheets work!
10:43:00  <peter1138> _zephyris: Okay, then it's nothing to do with me 😉
10:43:04  <_zephyris> Hah
10:43:16  <ahyangyi> That's if I just increase the bits
10:43:35  <ahyangyi> Not to deal with various slippery slope questions and alternative implementation suggestions
10:45:07  <peter1138> The main reason not to expose tile xy and allow authors to define their own custom hash is hypothetical (as in nobody has tested it) performance issues.
10:45:33  <ahyangyi> I see
10:45:58  <andythenorth> os the x and y for snow? 😛
10:46:17  <ahyangyi> Considering that native C is going to be faster than any potential hash function implemented with switches
10:46:41  <ahyangyi> you have convinced me that increasing random bits has its benefits regardless of what will happen to the callbacks in the future
10:46:45  <_zephyris> So deliberately just expose a simple pseudo-random like `(x + y * w) % prime`?
10:47:56  <peter1138> I would think the current CountBits() system could be replaced with a decent simple hash. And I would not worry about the bits changing from the previous system, it's just not that important.
10:47:59  <_zephyris> peter1138: Doesn't get to a useable solution though 🙂 A very post-14 problem though
10:48:13  <peter1138> I can make OpenTTD do it.
10:48:42  <peter1138> _zephyris: I can make OpenTTD do it, but it means it has to evaluate everything that isn't drawn too, so not ideal.
10:49:38  <_zephyris> So a grfcodec/nml problem then, is there any major issue there?
10:49:39  *** tokai has joined #openttd
10:49:39  *** ChanServ sets mode: +v tokai
10:49:57  <peter1138> They will need to implement an SVG parser, and know how to crop every SVG.
10:50:08  <peter1138> So it's not exactly non-trivial.
10:50:15  <peter1138> Er....
10:50:21  <peter1138> So it's not exactly trivial.
10:51:11  <_zephyris> How's it actually encoded for ottd use then, as an SVG string?
10:51:31  <peter1138> Yes, it's literally the SVG file embedded into the GRF.
10:51:57  <_zephyris> Mmm
10:52:04  <peter1138> There are binary formats that could be used but that's another dependency.
10:52:12  <_zephyris> Maybe spritesheets aren't worth the effort 😉
10:52:28  <_zephyris> Memory usage presumably isn't an issue, SVGs are comparable to small bitmaps
10:52:37  <peter1138> <https://tinyvg.tech/>
10:53:00  <peter1138> SVGs can be larger, but they're only in memory while they're being converted to a bitmap.
10:53:17  <_zephyris> Yeah, a _proper_ cropping is hard.
10:53:26  <peter1138> They are rendered to a bitmap sprite when first used, just like normal sprites are loaded from file when first used.
10:54:44  <_zephyris> Thinking more broadly, you'd want to restrict the SVG features in the ottd svgs
10:54:53  <LordAro> no js? :(
10:55:01  <peter1138> They are "restricted" by what nanosvg supports currently.
10:55:04  <peter1138> Correct, no js.
10:55:17  <_zephyris> Which is good, and well-defined
10:55:30  <_zephyris> So pre-processing svgs (relatively) intelligently makes sense
10:55:34  <peter1138> This does make it pretty hard to make "textures".
10:55:34  <_zephyris> eg. text -> paths
10:55:40  <xarick> hello
10:55:52  <peter1138> It's good for icons and things but not ideal for say a ground sprite.
10:56:20  <_zephyris> Well, I'd argue this is a design doc problem
10:56:25  <_zephyris> What's the aim.
10:56:32  <peter1138> Might be fine for BonkyGFX though.
10:56:46  <_zephyris> It's not aiming to replace bitmaps, so design the spec to make it complementary
10:57:40  <peter1138> I managed to cobble together a rudimentary company-colour rectangle modelled after the TTD company-colour rectangle by overlaying various gradients in different forms. But it's not very good.
10:57:51  <peter1138> But also, I'm handwriting these SVGs, hehe.
10:58:42  <_zephyris> Man, hand-writing svg gradients...
10:59:34  <_zephyris> What would be useful for testing?
10:59:35  <peter1138> Well, there's a bug in nanosvg's handling of gradient coordinates which doesn't help.
11:00:56  <peter1138> (It treats unqualified coordinates as pixels when they're meant to be fractional)
11:01:11  <peter1138> I have a repo full of the icons I've made so far.
11:01:54  <peter1138> tvg download is 200MB. That's not very friendly.
11:03:02  <peter1138> I'm going to ignore that 😄
11:03:26  <peter1138> There was a tiny google-designed format too, so that's probably already been cancelled.
11:03:32  <reldred> woo! finally got shipping notif for my uconsole 😄
11:03:42  <peter1138> Nice.
11:03:54  <peter1138> OpenTTDconsole
11:04:04  <reldred> only been... *checks notes* thirteen months since I ordered it
11:04:21  <reldred> Yeah it comes running raspbian with openttd already pre-installed apparently.
11:04:41  <reldred> gonna hafta compile jgrpp though
11:05:15  <peter1138> Pffft ;p
11:11:39  <peter1138> Raspbian CI target when? Heh
11:12:20  <reldred> I asked JGR about it and he said no thanks
11:12:22  <reldred> 😛
11:17:14  <_zephyris> peter1138: Did you get a decent strategy for the 8bpp/mask behaviour?
11:17:32  <ajmiles> Is there a standard way the devs like to mark function arguments as unused to silence compiler warnings?
11:17:47  <ajmiles> https://cdn.discordapp.com/attachments/1008473233844097104/1212357983007416390/image.png?ex=65f18b5b&is=65df165b&hm=00b685d8880011b7fc0552ef266e2231991e5809ba3e7742fdd93b712f670f30&
11:18:55  <LordAro> [[maybe_unused]]
11:19:48  <ajmiles> OK, I can go with that
11:20:34  <ajmiles> It's a bit verbose/distracting in these interface style headers to have every param marked that way
11:21:47  <peter1138> Either that, or remove the names.
11:22:30  <ajmiles> Yeah, I considered removing the names, but that seems more reasonable if an particular implementation of the VideoDriver elects not to use one rather than the base class just having a virtual 'return' version that doesn't
11:22:58  <ajmiles> I think if I were implementing a new VideoDriver I'd expect to go to videodriver.hpp and see what the args are
11:23:23  <peter1138> Yeah if it's the base classic and therefore the "canonical definition" when go with `[[maybe_unused]]`.
11:23:56  <peter1138> reldred: I don't know what's involved, a quick look is mostly about running CIs *on* ARM...
11:27:20  <xarick> Lol, Square Enix is destroying Tifa
11:27:36  <xarick> what a world
11:29:07  <reldred> whats a tifa
11:29:10  <peter1138> <https://boundingintocomics.com/wp-content/uploads/2024/02/FF7-Remake-Patch-Tifa-Censor.png>
11:29:13  <reldred> is that like that soccer game
11:29:17  <peter1138> You mean this? Looks like a good change to me.
11:29:24  <ajmiles> "destroyed"...
11:29:47  <reldred> oh final fantasy
11:29:53  <reldred> that game i care so much about
11:30:21  <peter1138> I played a bit of one on Playstation years ago.
11:30:44  <reldred> we only owned a ps2 in our house because at the time it was the cheapest dvd player we could get
11:31:14  <reldred> it came with a weird version of simpsons hit and run that was like, super different to the actual store bought copy of the game
11:31:16  <reldred> was weird
11:31:17  <xarick> looks like censorship in action
11:31:21  <xarick> is what it looks
11:31:25  <reldred> meh
11:31:49  <ajmiles> She's supposed to be 15...
11:32:03  <ajmiles> It's an unusual hill to die on
11:32:50  <reldred> NOOOOOOO WHY CANT I SEE DOWN THE 15YR OLDS TOP NOOOOOOOOO THIS IS CENSORSHIP THIS IS DEMOCRACY MANIFEST
11:33:25  <peter1138> 15? Oh gods.
11:33:46  <peter1138> It's better anyway, but definitely better.
11:33:46  <reldred> there's no trains, there's no logistics, there's nothing for my tism to hyperfixate on, and like that you've lost me
11:33:48  <xarick> she's still 15 after all these years?
11:33:56  <ajmiles> It's a flashback scene
11:36:06  <peter1138> Well there are trains in FF 🙂
11:36:16  <xarick> I have no idea what her age is supposed to be. But it's an inconic character that's being changed for the sake of wokeness
11:36:25  <peter1138> Good.
11:36:29  <peter1138> Woke is good.
11:36:48  <reldred> this is dumb and I don't care, I'm going to bed.
11:37:11  <ajmiles> They haven't changed her in the 'present day' game, so you can still go and look at her when she's not underage if you like
11:38:26  <_jgr_> Seems like a very small teacup to have a storm in to me
11:38:30  <LordAro> i think this is the point where we reach "this is actually off topic, go talk about something else"
11:38:42  <andythenorth> I have never seen that happen before, but I think it just arrived
11:39:16  <xarick> alright, back to ships
11:42:24  <ajmiles> Out of pure interest, what is the limiting factor on maps > 4K today? Is it memory, performance or some inherent "*we've run out of bits!*" limitation?
11:43:11  <kuhnovic> JGRPP does support bigger maps
11:43:31  *** jinks has quit IRC
11:43:46  <ajmiles> Yeah, though I'm guessing their non-inclusion in the shipping version of the game speaks to some dissatisfaction with them?
11:44:45  <_jgr_> Most likely they don't want to deal with big reports like "I made the map enormous and now things are a bit slow"
11:45:02  *** jinks has joined #openttd
11:45:10  <ajmiles> That wouldn't be like users of free software at all.
11:45:45  <_zephyris> Big maps are too big to be useful in most cases
11:45:50  <_zephyris> Maybe massive multiplayer games?
11:45:59  <_zephyris> But then slowness is even more important
11:46:04  <_zephyris> And they're not that popular: https://openttd-survey-web.pages.dev/summaries/2024/wk08#14.0-RC1-game.settings.game_creation.map_x
11:47:53  <peter1138> Even 4kx4k is too much.
11:48:32  <ajmiles> I like playing on larger maps with town and industries reduced to at least Low, it gives a more realistic spacing between things
11:49:18  <ajmiles> But then my dreams of connecting up every industry to a single network will never be realised, so small maps are fun too
11:49:53  <peter1138> Huh, we've just passed the 10 year anniversary of 4k maps.
11:50:04  <johnfranklin> Cannot play xUSSR in <2k^2 maps
11:50:31  <peter1138> But yeah, people do play 4kx4k and wonder why the game is so slow because it's an old game from the 90s right...
11:51:42  <peter1138> <https://github.com/OpenTTD/OpenTTD/commit/4cbab4f744e531d17d7e523d80092f54b4e4659d> Such a massive change 😄
11:51:58  <peter1138> (There may have been a few supporting commits before that.)
11:51:59  <talltyler> Core devs could make large maps run faster if they didn’t refuse to multi-thread the game
11:52:29  <peter1138> ((Although it doesn't look like it))
11:52:30  <talltyler> Wow they threw out limitations just like that huh
11:52:31  <kuhnovic> And the original game had a map limit of 256x256. That's 1/256th the amount of tiles.
11:54:03  <_jgr_> The tile loop can be made faster without needing to go to multiple threads
11:54:37  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1212367251005640724/image.png?ex=65f193fd&is=65df1efd&hm=711ceaefdf883a8ae265c7480fcf35b9935908fcc2aaad3ebe1e83abb5079a2b&
11:54:37  <xarick> i have these dock here with a station spread of 64 tiles. ship prefers to make a big detour to the one at the right instead of the other at the left
11:55:40  <andythenorth> why isn't Iron Horse drawing loop multi-threaded? 😛
11:55:49  <andythenorth> can action 3 results desync the game?
11:55:56  <andythenorth> temp storage?
11:56:15  <peter1138> Ah the old extreme edge-case...
11:58:11  <kuhnovic> xarick: Is this path a result of checkShipReverse? If so then it's restricted to the HL path, which could explain this.
11:58:26  <xarick> no, it's chooseshiptrack this time
11:58:51  <kuhnovic> Ah ok. And it is restricting or not?
11:59:49  <xarick> not sure, I suspect is related to... the big docking tile area encompassing almost the entire map
12:00:04  <peter1138> I have a patch that multi-threads terrain generation, but it can only use a "normal" perlin noise generator instead of the fast generator that tgp uses. So it has to do more work and ends up not being any faster... 😄
12:00:25  <xarick> gonna check
12:01:01  <peter1138> 3 docks all over the map, good design 😄
12:01:04  <ajmiles> I did do a little profiling of the game earlier on a 4K map at a zoomed out level to see where the time was being spent, just to see if there was any low hanging fruit
12:01:19  <peter1138> I didn't even notice the one on the far right at first.
12:01:54  <kuhnovic> Yeah that's definitely going to confuse the PF a bit 😛
12:01:56  <peter1138> Rendering isn't really the issue, it's the sheer amount of tiles to process and everything on it.
12:02:07  <ajmiles> Right, and that's what was showing up
12:02:15  <kuhnovic> My money is on the tile loop
12:02:19  <ajmiles> I just wanted to make sure my stuff wasn't making things worse
12:04:24  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1212369711824633967/image.png?ex=65f19648&is=65df2148&hm=cfdb82498cbc0033ae281dcb35ca5bd5f46daf2b70db93b4db65a6b2774536a3&
12:04:24  <xarick> this is the docking tile area, if not mistaken
12:05:04  <_jgr_> The tile loop cost is linear with map size, so though expensive on big maps is still well-behaved
12:05:33  <xarick> CalcClosestStationTile should really check for tiles that are actually dockable
12:06:46  <peter1138> docking_station only contains actually dockable tiles, but "closest" requires... pathfinding.
12:10:45  <_jgr_> Most of what I've done to make it faster comes down to avoiding cache misses due to unnecessary reads of neighbour tiles
12:11:25  <xarick> yapf_ship_regions does the right checks
12:11:46  <xarick> yapf_ship kind of doesn't
12:12:10  <_jgr_> Water flooding, snow line movement and stuff like that were a problem on that front
12:13:40  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1212372042150580234/image.png?ex=65f19873&is=65df2373&hm=84cb051605fb841e48a49be749ae3a8f65a9dd5f0752ca0f6813911a75fd2931&
12:13:40  <xarick> the origins
12:13:44  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1212372062744616990/image.png?ex=65f19878&is=65df2378&hm=a00507dce2a086767bc9b753e7be1526e848e5e1f2276297b9f27910d7c8e5c2&
12:13:44  <peter1138> 😉
12:14:24  <xarick> woah, that's a lot of rivers
12:14:50  <reldred> Rookie numbers. You should see what I did to rivers in JGRPP
12:15:04  <xarick> more rivers than the max allowed num of towns
12:15:10  <kuhnovic> _jgr_: Did this make it back to openttd vanilla?
12:15:16  <reldred> I miss when the setting was called ‘about a few’
12:15:32  <reldred> Now it’s ‘extremely many’
12:16:25  <reldred> That said there are some weird conditions for rivers that slow down generation and prevent creating some nice chained river systems
12:16:52  <_jgr_> kuhnovic: No, it increases code size/complexity, and is less important when vanilla is capped at 4kx4k
12:17:09  <kuhnovic> Makes sense
12:17:46  <xarick> there is a bug in the river generation related to terraform, it caused stalls. The stalls no longer happen in master, but the rivers end up disconnected
12:19:12  <xarick> hmm... GetBestOpenNode
12:19:43  <xarick> Kuhnovic the way you made this work, adding the origin points as actual destinations...
12:20:23  <xarick> there are 3 very distant regions as origin points
12:20:31  <xarick> they're not even neighbours
12:20:44  <kuhnovic> That's fine
12:21:24  <kuhnovic> They will all "grow their own path" towards the ship position. Whoever gets there first (based on cost) wins.
12:21:41  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1212374062681169990/image.png?ex=65f19a55&is=65df2555&hm=2a460f1a4f004b7e004c79aa84702a18a98c4e2dd3031975729996b3bbee5197&
12:21:41  <peter1138> Oh dear.
12:22:08  <peter1138> Also why is this on 4x :S
12:22:09  <kuhnovic> That's too many rivers then 😛
12:22:59  <peter1138> Nice, 100ms per tick just for world ticks... in the scenario editor, with no towns and no industries.
12:23:08  <peter1138> What's JGRPP's max size...
12:27:28  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1212375517911584859/image.png?ex=65f19bb0&is=65df26b0&hm=882c854877f80e6f80205ce4c0b381f050f61fa785612dfbb88430fc893fcdd2&
12:27:28  <xarick> from the  high lvl pf standpoint, the closest region is the one to the right
12:28:02  <xarick> it's 3 regions, vs 4 to the left vs 5 to the south
12:28:18  <xarick> but the closest is the one to the left in my opinion
12:30:51  <kuhnovic> Yup, but the high level pathfinder is making the decision, not your opinion 😛
12:32:19  <kuhnovic> This is a good example of the trade offs that have to be made when using a HL pathfinder. You will end up with situations that lead to suboptimal paths, simply because you ignore terrain details at the high level.
12:40:22  <merni> peter1138: 16k x 16k, or 1 million x 266
12:40:37  <merni> Or anything in between
12:40:54  <merni> I doubt anyone actually uses the 1 million though lol
12:45:01  <peter1138> TGP failed, my map is completely water 😄
12:45:04  <ajmiles> The scrolling would be... pain
12:45:15  <merni> JGRPP has more zoom-out levels
12:47:32  <_jgr_> The absolute maximum size is not all that useful for actual play, but people kept asking for it and it was not hard to bump the number
12:48:13  <merni> yeah makes sense
12:48:28  <merni> I play 8k and I'm not surprised if people asked for 16k
12:56:29  <peter1138> Trying to play with as if the scale is larger means towns are all tiny. And station catchment is becomes too small.
12:56:59  <peter1138> "This rail station has parking spaces, but they drive in from 4 tiles away" is a bit silly 😄
12:59:04  <_jgr_> There is a setting to increase the catchment radius
13:02:47  *** Flygon has joined #openttd
13:07:25  <peter1138> _zephyris: No, not yet.
13:13:42  <DorpsGek> [OpenTTD/OpenTTD] npabisz commented on issue #11336: [Bug]: Missing servers on server listing https://github.com/OpenTTD/OpenTTD/issues/11336
13:18:09  *** jinks has quit IRC
13:19:29  *** jinks has joined #openttd
13:30:05  <kuhnovic> Ugh, I've discovered a bug deep in YAPF...
13:32:49  <andythenorth> well done 🙂
13:33:04  <ajmiles> Save that for after he's fixed it 😄
13:34:44  <kuhnovic> Well bug, or "failure by design", that can de debated. A* should stop when the destination node is the best tile on the open list. YAPF instead stops when it adds the destination node to the open list. But there might be a better path to that destination that's yet to be added. And I have such a case.
13:35:55  <kuhnovic> Oh man, I'd love to fix it, but I'm afraid I might break something. YAPF is such a beast.
13:36:11  <ajmiles> Just write YAYAPF
13:36:41  <kuhnovic> YOLOPF
13:37:49  <ajmiles> I'm about to test the optimisation where I draw the entire world and UI in one draw call instead of one per sprite. Already had some fun GPU hangs getting here
13:38:35  *** SigHunter has quit IRC
13:39:40  *** SigHunter has joined #openttd
13:41:46  <xarick> i found something
13:43:10  <xarick> really strange, it wants to pathfind to exactly where it is
13:43:14  <xarick> and fails
13:43:39  <xarick> the docking tile area is not v->dest_tile
13:44:25  <xarick> 1st attempt fails then, the 2nd attempt is called
13:45:26  <kuhnovic> Attach the debug and step into YAPF. That's the only way to really see what's going on.
13:48:47  <xarick> i wish there was a better way to visualize the failed path
13:50:57  <xarick> in this situation the first attempt wasn't supposed to fail
13:51:39  <xarick> so i wanted to visualise what the heck it did before it failed
13:52:51  <xarick> what neighbours what path it tried, etc..
13:55:22  *** keikoz has joined #openttd
13:56:39  *** nielsm has joined #openttd
14:14:01  <xarick> managed to get something
14:14:07  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1212402354431991878/image.png?ex=65f1b4ae&is=65df3fae&hm=2c080bfcdbc862ee9aa12d42ad87e7c91e0b1c8fa6558eb172da1ac032c62073&
14:14:14  <xarick> this is what it did before it failed, lol
14:17:06  <xarick> it really wants to pathfind to itself
14:23:24  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1212404691648905316/2024-02-28_14-21-40.mp4?ex=65f1b6db&is=65df41db&hm=aa5dab1e628401c2224f06749fbad3633fbdd5a5fddb4688ebff44f133e71da3&
14:23:24  <xarick> a massive docking tile area is the culprit
14:24:19  <xarick> destination tile is done via CalcClosestStationTile, and the closest tile is exactly where the ship is atm
14:24:29  <peter1138> kuhnovic: Affecting rail and road pathfinding too?
14:42:28  *** gelignite has joined #openttd
14:47:24  <kuhnovic> peter1138: Yup, all YAPF variants are affected
14:55:36  <peter1138> Okay, so while multi-stop docks probably didn't help, they were modelled on the existing ways of handling that, so not directly my fault 😉
14:57:20  <xarick> I just invented: CalcClosestDockingTile https://gist.github.com/SamuXarick/54d39935c2ab2a3417ba9f0a1b4cdf12
14:57:39  <xarick> excelent coding skills
14:58:32  <peter1138> lol
14:58:49  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1212413606449254410/image.png?ex=65f1bf29&is=65df4a29&hm=6581f922f0e21b5e518629680e6619d767aa4adb2a42ce1a904f252055f5f3e4&
14:58:49  <xarick> solved the problem right away!
14:59:16  <xarick> totally ignores the high level pf
14:59:25  <xarick> and goes for the closest
14:59:51  <peter1138> Which works until the closest is not reachable.
15:00:07  <peter1138> (Or is a longer path than one slightly further away)
15:02:48  <kuhnovic> I vaguely remember somebody complaining about how as-the-crow-flies distance was bad 😛
15:03:08  <xarick> well, true
15:03:22  <xarick> i could make it do a yapf call to each docking tile
15:03:53  <kuhnovic> peter1138: This. Fixed the edge case, broke the general case. The typical edge case whack-a-mole.
15:04:22  <kuhnovic> xarick: And absolutely murder the performance in the process 😆
15:05:03  <xarick> maybe it's possible to add multiple destinations
15:05:15  <xarick> not sure how yapf accepts that
15:05:56  <xarick> or do as Kuhnovic does... add multiple origins
15:06:15  <peter1138> `std::vector<TileIndex> docking_tiles` could be stored with the station if it is actually necessary for pathfinding (and performance) but whether it really helps is another matter.
15:08:18  <kuhnovic> Yapf can work with multiple destinations, but calculating the heuristic (the estimate) becomes more difficult. Which destination are you going to estimate to? An average of all destinations?
15:09:00  <xarick> I see
15:09:11  <xarick> it would estimate to each
15:09:25  <xarick> and return the shortest estimate, maybe
15:09:33  <kuhnovic> That was one of the reasons I went for a reverse search for water regions. That way you have one "destination": the ship
15:10:54  <kuhnovic> xarick: That would probably work, but you might end up doing lots of calculations if you have many destination tiles. It doesn't scale well.
15:13:01  <kuhnovic> It might become so significant that it's better to just forget about the estimate and set it to 0. That turns A* into Dijkstra. But now i'm just speculating, measure before you make such choices.
15:45:16  <ajmiles> https://cdn.discordapp.com/attachments/1008473233844097104/1212425291172151396/image.png?ex=65f1ca0b&is=65df550b&hm=8c4516319bad07f68f55ad830f50cb665cc1bdef03998d9898066112ba501dbb&
15:45:16  <ajmiles> https://cdn.discordapp.com/attachments/1008473233844097104/1212425292245897236/image.png?ex=65f1ca0b&is=65df550b&hm=79e5b1bee490579e480fa544a025ea4a8e71c80b35316f10d9a6ec2ed75c90b9&
15:45:16  <ajmiles> One draw call working! And it's 10x faster for heavy frames than it was before.
15:46:17  <ajmiles> 10x faster for the GPU. Need to measure what the CPU perf uplift was from not having to issue so many draws
15:49:02  *** Wormnest has joined #openttd
15:51:56  <ajmiles> 60x faster the CPU. Good news too
15:56:20  <Eddi|zuHause> so it's now 600x faster overall. that's how that works. right? :p
15:58:21  <ajmiles> Then you take that 600 and square it
16:04:01  <xarick> this just in! I invented multiple destinations for yapf! let's see how broken it iss now
16:05:29  <xarick> SetIntermediateDestination might be a problem yet, I need to see what happens for now
16:14:46  <xarick> it wasn't too hard, I thought it would be harder to implement
16:15:41  <_glx_> if you have multiple destination just reverse and switch to multiple sources
16:16:33  <_glx_> ships are not affected by any one way limitations so A->B and B->A are the same
16:28:42  <peter1138> One-way canals 😄
16:29:13  <peter1138> Nice, an AI updated to not use buoys.
16:32:41  <peter1138> Hmm, it's still placed some buoys, but not using them.
16:37:43  <ajmiles> I'm trying to figure out what a safe maximum is for the number of sprites that the renderer will try and draw in one frame and I'm already up to 1 million
16:40:28  <peter1138> Potentially a lot 🙂
16:42:37  <ajmiles> I probably need to implement some sort of growable buffer or I'm just going to have to pick a big number
16:43:36  *** j_n has joined #openttd
16:43:36  <j_n> ajmiles: it feels cursed seeing a game as old as OpenTTD being rendered using triangles
16:44:44  <ajmiles> Save that until I start raytracing water reflections 🙂
16:45:17  <ajmiles> I was joking as I didn't think it'd be possible, now I'm not so sure...
16:46:10  <andythenorth> peter1138: you have a patch for that?
16:46:29  <andythenorth> TBH, it would be better as a flow value, signed byte
16:46:48  <andythenorth> 127 or -127 are untraversable in one direction
16:46:54  <andythenorth> everything else is a multiplier to speed
16:54:55  *** xertov has quit IRC
16:59:55  <kuhnovic> peter1138: This would instantly break the water region pathfinder haha
17:14:12  <_glx_> river slopes are one way, but untraversable anyway
17:14:38  <peter1138> So they're not one-way, they're no-way.
17:15:00  <_glx_> they could be handled as one way
17:15:13  <LordAro> but with a chance of crashing the boat
17:15:18  <LordAro> :D
17:19:45  <xarick> wondering if i just add the intermediate dest into the mix
17:20:03  <xarick> or make it solo
17:23:58  <peter1138> Well. This morning it looked like it was going to be raining all day and most of the evening. Now it's... just a little bit.
17:24:46  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1212450336334151720/image.png?ex=65f1e15e&is=65df6c5e&hm=db68f1117fa3770e35add0cbbfef30556ba648390384afe5a868e9bd9a6bf44c&
17:24:46  <peter1138> I've broken that icon 😄
17:24:59  <LordAro> smol
17:40:59  <ajmiles> https://cdn.discordapp.com/attachments/1008473233844097104/1212454416821522462/image.png?ex=65f1e52b&is=65df702b&hm=9cc458c06e252f8685cf76c77fc4239b8dcfde30f523022c04043a06bdcfc543&
17:40:59  <ajmiles> There's something wrong with the FPS counter in the game, as it disagrees with both my own FPS counter also NVIDIA's
17:41:07  <ajmiles> 6500 is the right number
17:43:19  <xarick> 4090, I need
17:43:30  <xarick> hmm better not
17:43:33  <xarick> could melt
17:43:53  <LordAro> release the magic smokoe
17:43:59  <ajmiles> It would be amusing if OpenTTD were the game to melt it
17:46:03  <xarick> teach me how to make a list of docking_tiles on stations
17:46:17  <xarick> TileArea but not really TileArea
17:46:26  <_glx_> it's already stored in the station IIRC
17:46:49  <xarick> hmm yes, but... no
17:47:05  <xarick> not the real docking tiles only
17:49:12  <_glx_> for (TileIndex tile : st->docking_station) {
17:49:12  <_glx_> if (IsDockingTile(tile)) /* Add to your list */;
17:49:12  <_glx_> }```
17:50:18  <xarick> i wanted a quick access NOSAVE cache kind of list on each station
17:50:33  <xarick> or i'd have to calculate that for every pathfinder call
17:51:32  <peter1138> BitmapTileArea is also a thing, but that is actually larger in your extreme test case.
17:51:47  *** Wolf01 has joined #openttd
17:53:56  <peter1138> Also it's a `std::vector<bool>` which is quite... "hmm" now.
17:55:28  <LordAro> "mostly fine"
17:55:35  <LordAro> unless you're doing weird things with it anyway
17:57:12  <andythenorth> rivers with flow
17:57:15  <andythenorth> unpowered boats
17:57:18  <andythenorth> logs!
17:57:31  <andythenorth> then we do rivertypes
17:57:36  <andythenorth> then we have conveyors and pipes
17:57:44  <andythenorth> 'flowtypes'
17:58:16  <andythenorth> v14 not feature frozen yet, right?
17:58:16  <LordAro> if it's not accurately modelling fluid dynamics then it's not getting in
17:58:34  <andythenorth> well
17:58:44  <andythenorth> I did fluid dynamics in my civil engineering degree
17:59:24  <andythenorth> although there is CFD analysis for e.g. aviation, civil engineering relies very largely on empirical models and established priors
17:59:49  <andythenorth> so stuff like 'turbulent flow' is just considered 'complex' and there's a rule of thumb for how many tonnes of concrete might be needed, and what shape
17:59:59  <andythenorth> then you build a scale model in a sandbox and run water
18:02:23  <peter1138> Sand game?
18:02:23  <_glx_> 14 is branched so only bug fixes
18:04:09  <andythenorth> peter1138: tile erosion rate?
18:04:16  <andythenorth> hmm Erosion GS maybe?
18:04:30  <peter1138> Tractive Effort Coefficient of sand erosion.
18:05:28  <andythenorth> flat sand
18:05:36  <andythenorth> disappearing docks?
18:18:37  <locosage> there was some article about a way to make rivers pretty well
18:18:39  <locosage> and fast
18:20:34  <_jgr_> There was the rainfall river generator patch from the forums which did some kind of flow simulation
18:20:41  <_jgr_> Though "fast" it was not
18:21:15  <locosage> I have a generator based on that article on citymania and it's fast enough
18:21:39  <locosage> but couldn't quite figure all the quirks so they sometimes flow upward 😅
18:23:35  <_jgr_> For what it's worth I did a whole bunch of fluid dynamics and related stuff in my degree as well, and have used exactly 0 of it since then
18:25:28  <locosage> what i did isn't really simulating fluid dynamics or even erosion afaict
18:28:02  <locosage> <https://github.com/dandrino/terrain-erosion-3-ways>
18:28:13  <locosage> third method, it generates river network and then terrain that matches it
18:35:43  <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/c4f94795071754a0aaf54549cf22f0f9f285c774
18:35:44  <DorpsGek>   - Update: Translations from eints (by translators)
18:47:05  <xarick> BitmapTileArea isn't too smart, how do I add tiles to it?
18:47:25  <xarick> .Add ?
18:48:07  <_zephyris> I did a game dev forum and git poke for the terrain generators recently. Lots of nice and fast stuff, but the challenge would be ensuring rivers aren't on diagonal slopes afaict
18:49:41  <andythenorth> terraform 😛
18:49:43  <andythenorth> GS!
18:50:10  <ahyangyi> _zephyris: Yep, I thought about importing river data, and "fix" the slopes later
18:50:24  <_zephyris> Yes, except for all of the corner cases where terraforming for one river tile prevents another one
18:50:30  <ahyangyi> yep
18:50:48  <ahyangyi> And also when there are two choices, which one to take
18:50:49  <_zephyris> Could probably iterate from the river mouth upstream across all rivers?
18:51:02  <_zephyris> And give up when the route won't work
18:51:18  <_zephyris> That'd do rivers till the terrain gets too steep
18:51:19  <ahyangyi> Probably an iterative process not unlike a BFS should work
18:54:45  <peter1138> xarick: I wasn't suggesting you use that.
18:55:22  <xarick> uhm, what was I supposed to do?
18:55:29  <ahyangyi> Question: A station has at most 8 tile types, right?
19:01:21  <kuhnovic> _zephyris: When river pathfinder?
19:03:06  <_zephyris> Well... I think you're the man for the job!
19:03:20  <andythenorth> when water region support for industry tile varact 2? 😛
19:03:36  <peter1138> u wot m8?
19:08:00  <andythenorth> ports in tiny lakes
19:08:18  <andythenorth> obviously now I *try* to get a map with one, I can't 😛
19:08:26  <andythenorth> but usually they are frequent
19:09:20  <andythenorth> oh, 'smooth' landscape gen doesn't do many lakes, but 'rough' does
19:09:30  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1212476690358599720/image.png?ex=65f1f9e9&is=65df84e9&hm=3fe9bd2f1606dbcece360e6cae44be3bc67bcc1dd6bd39ae8691aab7c0fc5511&
19:09:30  <andythenorth> ok got one on the first 'rough' map
19:10:01  <_jgr_> You should be able to check tiles up to a distance of 15 in each axis
19:10:06  <peter1138> Ah you want "connected to large amount of water"
19:10:41  <peter1138> "Connected to N regions" would be more useful probably.
19:11:39  <andythenorth> yes
19:11:58  <andythenorth> _jgr_: I could do a tile walk
19:12:32  <andythenorth> there are lots of cases where that will fail in 3 directions, but the water area is actually large
19:12:44  <andythenorth> odd-shaped coasts
19:12:50  <andythenorth> islands, isthmuses etc
19:15:48  <peter1138> kuhnovic: Do you think there's an easy way to query for connected water regions without involving path finding?
19:15:58  <peter1138> Or relatively easy way, I should say.
19:16:25  <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on pull request #12164: Add: Highlight in white all pieces of company owned infrastructure in the viewport https://github.com/OpenTTD/OpenTTD/pull/12164#issuecomment-1969678349
19:21:06  *** jinks has quit IRC
19:30:35  <andythenorth> water regions are fixed size?
19:30:56  <peter1138> Not exactly.
19:32:01  <frosch123> number of towns reachable by water or road?
19:37:19  <DorpsGek> [OpenTTD/OpenTTD] LC-Zorg commented on discussion #11132: Add confirmation when sending vehicle group to depot https://github.com/OpenTTD/OpenTTD/discussions/11132
19:39:13  <andythenorth> lolcats
19:41:24  <ahyangyi> Good point, perhaps the new pathfinding algorithm could finally provide the solution for the "port in a small lake" problem
19:42:18  <ahyangyi> Or, could we relax the requirements and get a rough number?
19:43:00  <ahyangyi> If that helps with performance
19:49:53  <xarick> why doesn't BitmapTileArea initializes automatically
19:50:04  <xarick> I need to babysit it
19:54:46  <xarick> I fail at understanding how this works
19:55:42  <peter1138> Don't you just need a list of docking tiles?
19:57:58  <xarick> yes
19:59:12  <peter1138> start with `std::vector<TileIndex>` then
20:08:40  <DorpsGek> [OpenTTD/OpenTTD] dkle87 commented on issue #12175: [Crash]: Game error on Depot Actions https://github.com/OpenTTD/OpenTTD/issues/12175
20:13:18  <peter1138> Okay, what rail/road/tram type GRFs use random bits?
20:19:09  <xarick> nice, that was much easier
20:21:11  <_glx_> BTW BitmapTileArea is a TileArea with extra stuff, so you still need to Add() first before using SetTile() or ClrTile()
20:22:11  <ahyangyi> peter1138: ASUB ||Ahyangyi's secret unreleased bullshit™||
20:22:27  <peter1138> BTA::Initialize() is used to cover the entire area first.
20:22:45  <ahyangyi> But... not really
20:50:51  <_glx_> yeah BTA flow is weird
20:50:56  <peter1138> Okay so I guess the rail/road type random bit 'hash' comes from tree_cmd.cpp;530
20:51:48  <peter1138> BTA is built on top of a TileArea with some specific use-cases.
20:52:37  <_glx_> it has TileArea methods, but they are not usable it seems as they don't update the bitmap
20:52:38  <peter1138> Calling `Add()` on it will actually most likely not work.
20:53:11  <_glx_> Add() will increase the area, but the internal data will be broken
20:55:24  <peter1138> Not my finest work, but it does work.
21:05:13  <xarick> kuhnovic, there is a problemo
21:06:25  <xarick> regarding 12181, caching the whole path till the end might not be a good idea
21:06:30  <xarick> let me show u
21:07:01  <xarick> https://media.discordapp.net/attachments/1008473233844097104/1212413606449254410/image.png?ex=65f1bf29&is=65df4a29&hm=6581f922f0e21b5e518629680e6619d767aa4adb2a42ce1a904f252055f5f3e4&=&format=webp&quality=lossless&width=1246&height=662
21:07:10  <xarick> that red line is 100% cached
21:08:16  <xarick> in this situation, it won't even get back on track
21:08:40  *** gelignite has quit IRC
21:09:07  <xarick> the black squares is where the hpf thought would be a good path
21:09:29  <peter1138> Does it have a path to the destination?
21:10:22  <xarick> yes
21:11:12  <_glx_> and both high and low use the same destination ?
21:11:38  <xarick> the high pf was given the regions for each docking tile
21:11:49  <xarick> 3 regions
21:12:22  <xarick> the low pf was given the docking tiles, 8 tiles
21:12:51  <xarick> maybe it's a me problem
21:13:04  <xarick> I'll create a clean branch about the work I'm doing
21:13:12  <xarick> but it won't mix well with 12181
21:19:36  *** nielsm has quit IRC
21:21:22  *** thelounge345 has joined #openttd
21:35:53  <xarick> almost there
21:35:58  <xarick> I'm too slow
21:38:21  <xarick> https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:check-next-tile-is-a-docking-destination-
21:38:24  <xarick> I got this atm
21:39:46  <xarick> unsure about the cache
21:39:56  <xarick> maybe desync prone
21:43:56  <andythenorth> limit approaches very ` nmlc info: Concurrent spritegroups: 238/256 ("generated/iron-horse.nml", line 641965)`
21:46:41  <kuhnovic> peter1138: There certainly is. Look in the water_regions.h header. I don't have the code here in front of me right now, but I believe the function is called VisitWaterRegionNeigbours.
21:50:45  <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #12192: Codefix: Remove no-longer used ship special-case. https://github.com/OpenTTD/OpenTTD/pull/12192
21:50:53  <kuhnovic> xarick: So why is this bad? The LL PF disagrees with the HL PF and finds a better path to a better destination tile. It's a pretty radical difference in this case, but I don't see what's wrong with it. Unexpected maybe.
21:52:06  <xarick> it wasn't supposed to cache the last few tiles near the target
21:52:45  <kuhnovic> PeterNviaGitHub: I did actually hit a breakpoint on that case recently, when a ship was entering a depot. Not sure if it matters, but I thought I should mention it.
21:53:27  <peter1138> Yeah, when entering a depot it'll be following the path into the depot anyway.
21:53:50  <kuhnovic> Yeah it doesn't have a lot of choice
21:54:13  <peter1138> This special-case makes it ignore the pathfinder when just for the (old) docking tile. It isn't really necessary.
21:54:41  *** thelounge345 has quit IRC
21:54:46  <peter1138> As glx said, probably something to do with bumping the dock. But we've since implemented ship rotation since then as well.
21:55:09  <peter1138> Eh, missing words again 😦
21:55:11  <xarick> hmm peter1138, that fix might not work for depot
21:55:21  <kuhnovic> Oh you mentioned it in the description. I need to read before I open my mouth.
21:56:40  <xarick> i guess it's fine, but the problem is that it's gonna flag the ship as lost?
21:56:44  <kuhnovic> I'm actually looking into that ship rotation part. I might be able to combine checkShipReverse and chooseShipTrack into one function and hopefully simplify things further.
21:56:50  <kuhnovic> But that's WIP
21:56:58  <xarick> gonna test peter's
21:58:00  <peter1138> Why would the ship be lost?
21:59:05  <xarick> there is an issue with how yapf works, when the next tile is the destination, a path won't be found, but now since there's the high lvl pf, I guess it's found from there?
21:59:14  <xarick> im gonna test
21:59:53  <peter1138> Ships definitely still enter depots without being lost...
22:00:37  <DorpsGek> [OpenTTD/OpenTTD] Kuhnovic commented on pull request #12192: Codefix: Remove no-longer used ship special-case. https://github.com/OpenTTD/OpenTTD/pull/12192#issuecomment-1969991947
22:02:37  <xarick> interesting, now I'm confused
22:02:48  <kuhnovic> xarick: This might actually be related to the yapf-bug I discovered today. The is-at-destination-check is done in a weird way. But I need to spend some time digging deep into the details of yapf.
22:02:58  <kuhnovic> And I haven't had time yet
22:04:07  <xarick> that was what the special case was handling
22:04:16  <xarick> and now I can't trigger it, ... lol
22:05:15  <andythenorth> naptime?
22:06:04  <peter1138> Nah
22:06:07  <peter1138> Stay up all night.
22:06:11  <peter1138> Finish those pixels.
22:08:18  <andythenorth> pff
22:09:26  *** keikoz has quit IRC
22:12:20  <xarick> I have no idea why it works now 🙂
22:12:23  <xarick> magic!
22:12:48  <xarick> i even made a video
22:13:20  <peter1138> Well
22:14:06  <andythenorth> definitely naptime 🙂
22:14:12  <andythenorth> all the pixels can wait
22:14:25  <xarick> <https://discord.com/channels/142724111502802944/1008473233844097104/1212404692412399658> here's the video, ship was lost all the time here
22:14:35  <xarick> it was pathfinding to itself
22:15:19  <kuhnovic> Are you sure those weren't because of your local changes?
22:15:41  <kuhnovic> You were trying out all kinds of things
22:16:18  <xarick> in this place it was tile == CalcClosestStationTile
22:16:54  <andythenorth> should I play OpenTTD?
22:16:58  <kuhnovic> Well that must have been the issue
22:17:51  <xarick> the huge docking tile area was always the next tile, and in this situation the pathfinder was always failing to find a path
22:19:28  <xarick> it's not much different than peters approach, now a ship next tile can be the ship depot entry, and it magically finds a path
22:19:32  <xarick> I'm confusen
22:25:14  *** sinas128 has joined #openttd
22:25:14  <sinas128> andythenorth: yes
22:25:24  <sinas128> take some time off horsing, enjoy the game
22:38:37  <xarick> pff...
22:39:04  <reldred> Horsey horsey horsey, I’m waiting for some higher speed horses in my game. It’s 1972.
22:40:31  <xarick> okay, I don't even need
22:40:54  <xarick> master is sufficient to expose the issue
22:44:17  <andythenorth> reldred: change your daylength speed 😛
22:47:24  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1212531528391720991/dock_station_spread.sav?ex=65f22cfc&is=65dfb7fc&hm=2cc36a0093932d5dc1ef4f994628166eeebe1cee78be455f03a9767a508fd7d8&
22:47:24  <xarick> place a breakpoint on this line and load this savegame. <https://github.com/OpenTTD/OpenTTD/blob/master/src/pathfinder/yapf/yapf_ship.cpp#L252>
22:47:24  <xarick> you will notice it will fail to find a path on `attempt 0`. `v->tile == m_destTile`
22:53:57  <_glx_> I accidentally triggered the NOT_REACHED() from game thread and it failed to generate screenshot (_screen was nullptr)
22:54:38  <reldred> andythenorth: no, I will make it longer >:3
22:54:42  <_glx_> but this NOT_REACHED is annoying, I can't see how I triggered the crash
22:55:19  <reldred> I'm actually enjoying spending longer lengths of real world time moving through each generation in Horse
22:55:29  <andythenorth> I should try it
22:56:07  <xarick> gonna create an issue, I think it's important enough to warrant it
22:56:38  <reldred> also, plz merge my allignments PR, cooking my own version every release is tedious 😛
22:56:58  <reldred> I need to do another horse+nars game
22:59:30  <andythenorth> oof
22:59:40  <peter1138> I keep putting tabs in vs code when hitting a break point... who came up with the idea of removing shift as fast forward?
22:59:48  <andythenorth> I set the Horse alignment per peter1138 bug reports 😛
22:59:54  <andythenorth> "others are wrong"
23:00:41  <peter1138> I what
23:01:10  <reldred> nah I'm just stirring shit again, I need to get around to making that new-nars
23:01:16  <andythenorth> you reported Horse offsets were wrong twice 😛
23:01:34  <andythenorth> so I fixed them, then I fixed the fix
23:03:12  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain approved pull request #12192: Codefix: Remove no-longer used ship special-case. https://github.com/OpenTTD/OpenTTD/pull/12192#pullrequestreview-1907616033
23:03:41  <_glx_> GSStrings are so annoying
23:05:42  *** tokai|noir has joined #openttd
23:05:42  *** ChanServ sets mode: +v tokai|noir
23:12:37  *** tokai has quit IRC
23:19:50  *** Wolf01 has quit IRC
23:23:54  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened issue #12193: [Bug]: CalcClosestStationTile on a huge docking area makes Yapf fail pathfinding on first attempt https://github.com/OpenTTD/OpenTTD/issues/12193
23:26:44  <xarick> truebrain: I wouldn't merge it just yet until kuhnovic figures out this https://discord.com/channels/142724111502802944/1008473233844097104/1212520304468041728
23:27:07  <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1212541522474442782/image.png?ex=65f2364a&is=65dfc14a&hm=d373514cb19ded6de0497709aac262f53cae70bfee493652b299ea4324489427&
23:27:07  <_glx_> so it's just one hill formed GS string (STR_UNDEFINED is from a workaround adding dummy extra parameters)
23:50:32  <xarick> waiting for tictoc
23:54:36  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1212548441755090964/image.png?ex=65f23cbc&is=65dfc7bc&hm=5797b39b769b8673f3f69e0e3a55f529bced17dbfd7f92a0001393584c634e1f&
23:54:36  <xarick> the game works in mysterious ways
23:55:19  <xarick> fast = from the station cache
23:56:00  <xarick> slow = from the station other cache + testing for actual ship destination docking tile
23:57:14  <xarick> not worth the risk
23:57:18  <xarick> im going with the slow

Powered by YARRSTE version: svn-trunk