IRC logs for #openttd on OFTC at 2024-01-24
            
00:03:25 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10606: Feature: Setting to scale cargo production of towns and industries https://github.com/OpenTTD/OpenTTD/pull/10606
00:09:50 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on discussion #11875: Can there be repeats of a keys in a hierarchy of structs in the savegame files? https://github.com/OpenTTD/OpenTTD/discussions/11875
00:10:34 <DorpsGek> [OpenTTD/OpenTTD] WenSimEHRP started discussion #11876: Allow using English as alias https://github.com/OpenTTD/OpenTTD/discussions/11876
00:13:33 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199507246762168360/image.png?ex=65c2cb2d&is=65b0562d&hm=ea11a651cff14a509d48a275f495f009226c48191679ce433f45f0287a4339a5&
00:13:33 <peter1138[d]> Pixels? Where?
00:14:42 <truebrain> looking sharp!
00:14:46 <truebrain> only 3 things left ๐Ÿ˜›
00:14:57 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199507597871566930/image.png?ex=65c2cb81&is=65b05681&hm=ee8e461732e9a9e767efe6f02d0c103e9ea8bfa305fd65f342d5b39e87f88964&
00:14:57 <peter1138[d]> 1x version ๐Ÿ™‚
00:14:59 <truebrain> no, 4
00:15:12 <truebrain> dots, filter thingy, sticky thingy, resize thingy ๐Ÿ˜›
00:15:34 <peter1138[d]> Yeah, I'm manually splitting up an svg icon sheet into separate files.
00:15:38 <peter1138[d]> Takes a while
00:15:42 <truebrain> I can imagine
00:15:44 <truebrain> but the result is impressive
00:15:57 <truebrain> it actually feels hi-res
00:16:04 <truebrain> so after this you are doing a basegraphics right?
00:16:12 <truebrain> as those pixels also need fixing ๐Ÿ˜›
00:16:14 <peter1138[d]> "Possible"
00:16:21 <truebrain> SVG a complete set!
00:16:27 <peter1138[d]> I think SVG for the whole baseset might be a performance issue ๐Ÿ™‚
00:16:38 <truebrain> you will figure out a way
00:16:52 <peter1138[d]> Of course, Zephyris font helps massively.
00:17:22 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199508205064163438/image.png?ex=65c2cc11&is=65b05711&hm=c84ee8b89af5fc1534b6142927b5292fcbd511977160b08cd617225a62964dd6&
00:17:22 <peter1138[d]> Not quite the same right
00:17:59 <peter1138[d]> Hmm, how big is this cursor...
00:18:38 <peter1138[d]> CursorID... that's.. just a SpriteID, surely ๐Ÿ˜ฎ
00:19:24 <_jgr_> Sort of, there are also animated cursors
00:19:50 <truebrain> peter1138[d]: At least pixilate the rest too when you do something like that ๐Ÿ˜›
00:22:56 *** Eddi|zuHause2 has joined #openttd
00:24:48 *** Flygon has joined #openttd
00:25:41 *** Eddi|zuHause has quit IRC (Ping timeout: 480 seconds)
00:30:48 <peter1138[d]> Hehe
00:50:42 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199516596654309418/image.png?ex=65c2d3e2&is=65b05ee2&hm=78dd001db31122f93574872a76a380fa0d392d5a820be8ec2faac7974553251c&
00:50:50 <peter1138[d]> I draw a very bad pin, I guess :p
00:51:10 <_glx_> not too bad
01:24:28 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199525092187709460/image.png?ex=65c2dbcc&is=65b066cc&hm=6798b3767c283484a62a5712d5a3a74eeb0c7e0731c8be49b2f239e4d419bb52&
01:24:28 <peter1138[d]> Hmm, might be a bit too thin.
01:32:44 <peter1138[d]> > Total 22 sprites, cached 0, non-cacheable 22. Optimized 4 duplicates.
01:32:57 <peter1138[d]> Surprised to see that still works for svg.
01:49:04 <DorpsGek> [OpenTTD/eints] pasantoro commented on issue #170: Base language version error https://github.com/OpenTTD/eints/issues/170
02:03:39 *** herms has quit IRC (Quit: bye)
02:04:45 *** herms has joined #openttd
02:07:10 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199535836643991663/image.png?ex=65c2e5cd&is=65b070cd&hm=0872ecd2bada2c9381d39b0cd972339557b751acb736409c8f604b44785e9546&
02:07:10 <peter1138[d]> Came out a bit too large :p
02:09:05 <_glx_> just a little
02:09:26 <peter1138[d]> 256x256.. I thought it would be fine... but of course that's at 1x zoom ๐Ÿ˜„
02:12:44 <rau117> peter1138[d]: idea: double click on the logo to hide it; show it again when re-enter main screen
02:13:25 <peter1138[d]> It was just a test.
02:13:31 <peter1138[d]> The logo is pretty bad, tbh.
02:16:48 <rau117> https://cdn.discordapp.com/attachments/1008473233844097104/1199538261345960026/image.png?ex=65c2e80f&is=65b0730f&hm=105a500b04ab4c8b0ccd4f8224b06b3f094559b8f601385b9778c6d8049469cb&
02:16:48 <rau117> rau117: Well, or not just the logo, but also this text.
02:16:48 <rau117> For example, to watch the titlegame without extra interface
02:28:34 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199541223019524156/image.png?ex=65c2ead1&is=65b075d1&hm=bf0fe5b20450342000b821a3ead2ca0d92abed7136a04dcc244d2e6e23bfe4c7&
02:28:34 <peter1138[d]> Lego axle hole.
02:28:57 <peter1138[d]> Pretty sure making it the same colour as the text is breaking some law.
02:41:39 <reldred> breakin the law breakin the law breakin the law
03:32:47 *** debdog has joined #openttd
03:36:10 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
03:59:33 *** Wormnest has quit IRC (Quit: Leaving)
05:07:35 *** keikoz has joined #openttd
06:26:03 <jfs> talltyler: Either TKM needs to be used carefully in strings, so it never needs to use plural or case forms ("Subsidy duration in periods: {num}" vs "Duration of subsidies: {NUM} period{P "" s}")
06:26:03 <jfs> Or some mechanism to use nested plurals and cases has to be introduced (huge shake up of everything including the core format).
06:26:03 <jfs> Or code needs to be jiggled around so {STRING} can be used to insert variations.
06:32:40 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:53:30 <DorpsGek> [OpenTTD/OpenTTD] michalc commented on discussion #11875: Can there be repeats of a keys in a hierarchy of structs in the savegame files? https://github.com/OpenTTD/OpenTTD/discussions/11875
07:04:18 *** becky_andrew has joined #openttd
07:04:18 <becky_andrew> Hello" everyone i'm sorry to disturb your privacy..."I'll help anyone interested on how to earn 100k in just 72 hours without no doubts from the crypto market. But you will have to pay me my
07:04:18 <becky_andrew> commission! Once you receive your profit! if anyone interested send me a direct message
07:04:18 <becky_andrew> +447456068417
07:15:48 *** Eddi|zuHause2 is now known as Eddi|zuHause
07:26:25 <Heiki> translator.openttd.org is giving me lots of errors like this:
07:26:25 <Heiki> Error: 404 Not Found
07:26:26 <Heiki> Sorry, the requested URL 'https://translator.openttd.org/string/openttd-master/fi_FI/STR_GRAPH_CARGO_PAYMENT_RATES_TIME_LABEL?message=Successfully+updated+string+%27STR_UNITS_VELOCITY_GAMEUNITS_DAY%27+Wed+Jan+24+07%3A25%3A27+2024' caused an error:
07:26:30 <Heiki> String cannot be translated, its base language version is incorrect
07:32:02 <Eddi|zuHause> how is that a 404 and not a 500 error?
07:32:04 <Heiki> oh, https://github.com/OpenTTD/eints/issues/170
07:32:24 *** tokai has joined #openttd
07:32:24 *** ChanServ sets mode: +v tokai
07:33:52 <Heiki> Eddi|zuHause: good question
07:39:05 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
07:55:41 <LordAro> Eddi|zuHause: i did wonder
08:14:48 <_zephyris> peter1138[d]: As long as the text acts as the button too (which it does) it's good UI practice! Looks really nice anti-aliased
08:21:57 <peter1138[d]> Hmm
08:22:37 <peter1138[d]> jfs: Or don't have a setting that changes based on another setting.
08:32:44 <DorpsGek> [OpenTTD/OpenTTD] michalc commented on discussion #11875: Can there be repeats of a keys in a hierarchy of structs in the savegame files? https://github.com/OpenTTD/OpenTTD/discussions/11875
08:38:41 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199634366104608818/image.png?ex=65c34191&is=65b0cc91&hm=a9f2b158c6f9ae8f406fc9dbf65551490fc7e1c83ee1db9f30d0a4f6b2fa723b&
08:38:41 <peter1138[d]> Well
08:40:57 <peter1138[d]> "Just a quick proof-of-concept"
08:45:23 <LordAro> :D
08:48:59 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on discussion #11875: Can there be repeats of a keys in a hierarchy of structs in the savegame files? https://github.com/OpenTTD/OpenTTD/discussions/11875
08:51:33 <_zephyris> peter1138[d]: Looks great! Are they separate SVGs, or an svg sprite sheet?
08:53:20 <DorpsGek> [OpenTTD/OpenTTD] michalc commented on discussion #11875: Can there be repeats of a keys in a hierarchy of structs in the savegame files? https://github.com/OpenTTD/OpenTTD/discussions/11875
08:54:04 <peter1138[d]> Separate SVGs, inserted into a sprite "zoom level" slot. So the game can load them like any other sprite, on demand.
08:54:19 <peter1138[d]> My original font-based implementation used a sprite sheet.
08:54:52 <peter1138[d]> fontcache-based, rather.
08:55:06 <peter1138[d]> So yes it's a bit inefficient.
08:59:05 <peter1138[d]> Potentially it could be one blob of a svg, and then use offsets to slice & dice it. But the game would need to either render the whole thing and crop it every time, or prerender it to a large buffer and then crop that.
08:59:21 <peter1138[d]> But then if you had a spritesheet the size of trg1 that would be... nope.
09:02:25 <locosage> better add some multisprite compression so it can just shrink common svg header to nothing
09:03:19 <andythenorth> svg ftw
09:03:24 <_zephyris> Or just crop on encode. Though I'm sure cropping SVGs is a pain, with curves extending past control nodes, groups, translations, etc.
09:03:26 <andythenorth> pixel game -> vector UI
09:03:52 <locosage> there are probably some libraries for cropping
09:03:58 <_zephyris> Well, each pixel is kinda a perfect vector square!
09:04:31 <andythenorth> "vectors are just pixels at scale"
09:04:32 <locosage> svg isn't that different from raster on a low res
09:04:59 <locosage> if you have 1px line in svg it's gonna scale like shit on anything but integer zoom
09:05:33 <_zephyris> I'm using svg to draw the 4x zoom bridge sprites(!), works really well tbh.
09:05:39 <_zephyris> But, really ideal for UI
09:11:39 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199642663859802133/image.png?ex=65c3494b&is=65b0d44b&hm=920ce301c55aa748ed47a155045acb738028bb86c5d72213ebcee1eac4eb1a1c&
09:12:36 <peter1138[d]> The spanner has some thin bits, but it's reasonable at 1x.
09:13:43 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199643182737137694/image.png?ex=65c349c7&is=65b0d4c7&hm=1a9f386c8f4d51ce8b6e02015c55de8a518716b9df9a3f99b894643d0035b402&
09:13:43 <peter1138[d]> Same at 1.75x. Not sure I consider that "scale like shit"
09:15:56 <locosage> you have wider lines than 1px
09:16:09 <locosage> also it's most noticeable with vertical/horizontal lines
09:16:14 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199643818123858001/image.png?ex=65c34a5e&is=65b0d55e&hm=6e7102b4c37151e040afc34908f46b1608e427eb9a277dfe6fcea4d209cf890b&
09:16:14 <peter1138[d]> Non-SVG does scale-like-shit.
09:16:17 <locosage> they just blur between piels
09:16:22 <peter1138[d]> Of course it has wider than 1px lines, it's 1.75x scale.
09:18:22 <locosage> how does that + looks below?
09:18:41 <locosage> without the disabling
09:20:06 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199644791743451177/image.png?ex=65c34b46&is=65b0d646&hm=fe8bb9f148e11ad5d32682455831ca2bb010d25c1ebf9dbd8590be4086c9d2bf&
09:21:48 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1199645219201765398/Screenshot_from_2024-01-24_14-51-30.png?ex=65c34bac&is=65b0d6ac&hm=45c0407e46e23abbe91309d643bb227896b8e1847486330280f830b8fc7f1a29&
09:21:48 <locosage> this is what I'm talking about
09:22:15 <peter1138[d]> Anti-aliasing is always very visible when you zoom it in lots.
09:23:25 <locosage> yeah, but ideally there would be nothing to alias
09:23:36 <peter1138[d]> It's a 1.75 pixel wide line, so...
09:24:06 <locosage> so almost 2
09:25:29 <peter1138[d]> But not 2.
09:26:19 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1199646355992350720/Screenshot_from_2024-01-24_14-55-36.png?ex=65c34cbb&is=65b0d7bb&hm=f94c786faadde21f20bd06f11e66eeeadfa6d7f63e3a32cb4a574de387e7f5a3&
09:26:19 <locosage> yeah, but it would be 2 if it was hand-drawn for this zoom
09:26:50 <peter1138[d]> Yes, but who wants to hand-draw every possible fractional zoom.
09:29:17 <locosage> well, maybe someone will...
09:29:25 <peter1138[d]> Good luck to theM ๐Ÿ™‚
09:29:41 <peter1138[d]> Btw you can press-ctrl while using the interface scale slider...
09:29:48 <locosage> also 3x=1.5x * 2 so they can be the same...
09:30:03 <locosage> but, anyway, what I'm saying is that for this + there is no difference between raster and vector
09:30:19 <locosage> raster would scale exacly like that if you use interpolation and not nn
09:32:30 *** thelounge345 has quit IRC (Quit: The Lounge - https://thelounge.chat)
09:32:43 <peter1138[d]> Hmm, apparently 15 AIs can run. (Maximum no. competitors: 14)
09:34:55 <xarick> old news
09:35:36 *** thelounge345 has joined #openttd
09:35:49 <_zephyris> Implement hinting for SVGs ๐Ÿ˜›
09:36:22 <_zephyris> But seriously, with a basic guide grid for multiple zoom levels, it's easy to draw sprites that work _well enough_ for many fractional zooms
09:38:25 <_zephyris> Hmm, hinting would be fun!
09:43:36 <peter1138[d]> There's a`shape-rendering` property in SVG2, but that's a draft somewhere and not supported.
09:44:59 <locosage> looks pretty well supported ;) <https://caniuse.com/?search=shape-rendering>
09:45:29 <locosage> though not property of svg itself i guess.
09:48:05 <peter1138[d]> Browser compatibility charts don't tend to list my OpenTTD branches ๐Ÿ˜„
09:48:18 <_zephyris> Hah
09:48:39 <_zephyris> Doesn't seem to be a well-defined spec though, as in it allows the user agent to do things, but the things the agent does aren't defined
09:52:33 <peter1138[d]> Inkscape's default keybindings are weird. No Ctrl-Z to undo...
09:55:43 <_zephyris> https://cdn.discordapp.com/attachments/1008473233844097104/1199653752664248400/image.png?ex=65c3539f&is=65b0de9f&hm=21bc3b4e9514f0b561dddddff1a609e6f3b1caa07e56d375502bc0b54eab903f&
09:55:43 <_zephyris> Is that some weird linux thing? It is on win
09:57:20 <locosage> also ctrl-z on linux for me...
10:02:30 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199655458340868166/image.png?ex=65c35535&is=65b0e035&hm=4472344ef467c15c670bd188cfa82c987085ced006888b1f9b3d0ca9eb400c24&
10:02:30 <peter1138[d]> Hmm
10:29:36 <peter1138[d]> _zephyris: 4x sprites do scale down quite nicely to fractional sizes at least. Not as good as SVG but better than upscaling 1x or 2x sprites.
10:31:52 <_zephyris> Yeah, I can imagine they do... If drawn with downscaling in mind, eg. 4px wide lines for 4x zoom sprite.
10:33:06 *** tycoondemon has quit IRC (Ping timeout: 480 seconds)
10:33:51 <_zephyris> Well this is all looking very interesting. When I tackle 4x GUI I'll definitely try to go from SVG
10:43:05 <peter1138[d]> Well, it's possible you'll be able to use native SVG ๐Ÿ™‚
10:47:53 <_zephyris> ๐ŸŽ‰
10:54:13 <xarick> I've been thinking
10:54:53 <xarick> maybe I can do the search for a depot at the last region without restricting it to the area
10:55:31 <peter1138[d]> Just watch out for the blurry scales-like-shit lines :p
10:56:17 <xarick> it's a teleport search starting at the last region
10:56:49 <xarick> a 3rd attempt, perhaps?
10:57:20 <peter1138[d]> 3rd time lucky?
10:57:31 <peter1138[d]> When I implemented NewStations
10:57:59 <xarick> the search is so complicated to explain, I started writing down what's happening in the PR
10:58:11 <xarick> and I found out, there's still room for improvements
10:58:12 <LordAro> peter1138[d]: will you support embedding js in svgs to implement newgrf behaviour?
10:58:15 <LordAro> :P
10:58:56 <peter1138[d]> ini files surely.
10:59:43 <LordAro> i was just thinking about all the possible new CVEs that would be enabled by doing so
11:02:46 <xarick> <https://github.com/OpenTTD/OpenTTD/pull/10544#issue-1610243251> at the second point, *Pathfinder costs at the destination region*, where it reads "These calls are restricted to just the destination region", I could instead add another step before that which does an unrestricted search, with the starting points at the entry points of the destination region.
11:02:49 <kuhnovic> xarick: I had a quick glance at your PR, I didn't get the chance to go into full detail. But in general I think you are making it way too complicated.
11:04:01 <xarick> it would make the issue I talked about later, "One limitation I can think of is on far distant regions where a depot could be closer by navigating two regions instead of one", dissipate!
11:04:33 <xarick> nice, thx for reading
11:07:22 <xarick> it's brilliant, lol! it's complex, but well if it works as I predict, then it's great
11:08:29 <kuhnovic> It's also going to be full of problems and edge case if you keep it this complex ๐Ÿ˜›
11:09:13 <LordAro> sounds like a job for unit tests :p
11:11:17 <kuhnovic> We all know he's not going to write those
11:12:09 <LordAro> testing and finding edgecases no one else thought about is something that xarick is actually quite good at
11:12:26 <LordAro> finding the right solution to those issues... less so
11:14:14 <kuhnovic> LordAro: True, he did find that issue with aqueducts on edges
11:14:38 <kuhnovic> Still need to look into that one
11:28:58 *** thelounge345 has quit IRC (Ping timeout: 480 seconds)
11:38:11 *** thelounge345 has joined #openttd
12:20:26 *** keikoz has joined #openttd
12:28:34 <xarick> hmm ๐Ÿ™‚ even more improvements to come
12:29:21 <xarick> GetShipDepotInWaterRegionPatch has a list of valid_tiles... the more I look into it, the more I realize, I don't need this list
12:30:19 <xarick> I only need to know if there's a depot in the region
12:30:38 <xarick> 1 is enough
12:31:52 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199693048905465946/image.png?ex=65c37838&is=65b10338&hm=3318f07cca249e297f8b52807622bb2558a5a0bd3d33f0f86506a75f9f5d0e93&
12:31:52 <peter1138[d]> Bugs!
12:32:27 <xarick> just started 14 LuDiAI Afterfixes with breakdowns enabled
12:32:37 <xarick> nearest depot will be used
12:32:46 <xarick> and no buoys
12:32:58 <xarick> let's see if I get an assert or something bad out of this
12:39:38 <locosage> hm, so I made sprite encoder in rust that works slower than python ๐Ÿ˜…
12:46:29 <peter1138[d]> I just ate a load of crap for lunch, then remembered I bought salad-ingredients for that ๐Ÿ˜ฎ
12:57:50 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199699584495132783/image.png?ex=65c37e4e&is=65b1094e&hm=85618ac3462e2684a6bf98c11ee70a96b9021d93ca0b5cf3bd3ba0973e7266d7&
12:57:50 <xarick> that wasn't the kind of crash I expected
13:04:04 <_zephyris> peter1138[d]: Sweet, so when do I get started on ogfx2 svg gui?
13:05:03 <peter1138[d]> When I've nailed down the format maybe. Working out how to fudge colour remap support into it (without redesigning how colour remaps work.)
13:08:02 <peter1138[d]> I've already changed the format to avoid svg NewGRFs crashing vanilla OpenTTD.
13:08:28 <locosage> time to finally do LUTs ;)
13:09:14 <peter1138[d]> You mean GRF-supplied LUTs?
13:09:24 <locosage> yeah, why not
13:09:37 <peter1138[d]> Well, if it's not GRF-supplied then it doesn't help all that much.
13:09:45 <peter1138[d]> Unless the GRF can select from a predefined LUT.
13:10:33 <locosage> do interface sprites even use recolor?
13:10:43 <peter1138[d]> Yes.
13:11:15 <peter1138[d]> But SVG isn't limited to interface sprites either.
13:11:29 <_zephyris> Presumably you're applying recolour to the rasterised sprite?
13:11:34 <locosage> well, to get it started interface is kinda enough
13:11:59 <locosage> but interface recolors are only grf-supplied in a sense that grf can redefine default ones?
13:12:06 <peter1138[d]> _zephyris: Not yet ๐Ÿ™‚
13:12:28 <_zephyris> locosage: Company colour and animated colours jump to mind
13:12:48 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199703349923160255/image.png?ex=65c381d0&is=65b10cd0&hm=190897e7556c66022b97e8af1aa01a3388f2b0de9f2c2fbb85351d4c837c567a&
13:12:48 <xarick> video driver crash?
13:12:50 <locosage> animated colors can't even be redefined
13:13:12 <locosage> they're just hardcoded
13:13:18 <peter1138[d]> A LUT needs to map from RGBA to palette index. `GetNearestColourIndex()` already does that for normal RGBA but explicitly skips the company recolour indices.
13:13:31 <peter1138[d]> That function is designed to be generic and work with existing sprites.
13:13:45 <locosage> wait, why map into palette index?
13:13:49 <peter1138[d]> But for a new feature, it's could be possible for the NewGRF to say "these are company colour indices"
13:13:50 <locosage> unless you're talking 8bpp blitter
13:14:01 <peter1138[d]> Because colour remapping works on palette indices.
13:14:13 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199703708154478612/image.png?ex=65c38225&is=65b10d25&hm=a9c79dbbbb8809399f66147daad564e590d18784354dbfbf61d0c1b4b63c340a&
13:14:19 <locosage> LUT is color remapping
13:14:29 <peter1138[d]> ^ "without redesigning how colour remaps work"
13:15:01 <peter1138[d]> Yes I know it's not the perfect solution that you could knock up in 5 minutes with python.
13:15:02 <locosage> well, whole point of LUT is to redesign that xD
13:15:14 <locosage> otherwise it's just quantization to ttd palette
13:20:13 <locosage> ideally lut should probably be applied in a shader
13:20:26 <locosage> but I guess that's not how openttd video drivers work at all...
13:21:53 <xarick> autosave every 10 minutes?
13:22:00 <xarick> what about every month
13:22:14 <xarick> why change ๐Ÿ˜ฆ
13:22:42 <xarick> i don't want autosaving in real time
13:22:50 <peter1138[d]> Because if the calendar is paused, 1 month doesn't happen.
13:23:41 <xarick> i really have a bad faith about the new time features being introduced ๐Ÿ˜
13:26:22 <xarick> hunting for a crash without a functional autosave... what do I do now
13:28:36 <talltyler> Also autosaving now works if the game is paused, and doesnโ€™t make too many saves when fast-forwarding
13:31:32 <xarick> got the crash!
13:33:59 <_zephyris> peter1138[d]: My gut feeling is to just treat like 32bpp sprites (rasterised anti-aliased), and require a mask svg (rasterised aliased) where exact matches to ttd palette indices are the mask pixels.
13:34:34 <_glx_> xarick: it's the game loop
13:34:57 <xarick> it's my pathfinder, took me a while to get where it was originating from
13:35:39 <_zephyris> It'd be possible to have an xml tag for palette index for recolouring, but I can't think of a tidy way of interpreting that. Perhaps just change the colour everything without a tag to 0000FF. But I can imagine a bunch of corner cases with transparency, handling stroke and path separately, etc.
13:35:43 <_glx_> somehow it throws and nothing catches it before the thread creation function safety try-catch
13:38:46 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199709884485206108/message.txt?ex=65c387e5&is=65b112e5&hm=ddfc498d38e220cc6af17ea264375d07f9d614371cc7087ff02a00ee67fa339a&
13:40:08 <xarick> crashed in a lambda
13:41:19 <_glx_> check the preceding call, you should see which lambda it is
13:42:09 <xarick> it's my code, I see what it is, not entirely sure, but I suspect Yapf().GetVehicle() does not yet have the vehicle set
13:42:33 <xarick> but these 10 minutes autosaves aren't too helpful
13:42:45 <xarick> needed a save the month before it happened
13:46:51 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
13:49:58 <_glx_> you can set it to lower
13:50:14 <_glx_> `set autosave_interval 1`
13:50:58 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1199712956930334871/image.png?ex=65c38ac2&is=65b115c2&hm=faa6e82e177f7c383d719fd00e4cd62cfee5f6a754f41c5bd192e57c69b7ca8a&
13:51:25 <xarick> oh, nice
13:51:54 <locosage> _zephyris: could just do something like what I have in bonkygfx where magenta hue turns into cc
13:52:12 <locosage> not great solution for animated colors though
13:52:29 <_glx_> the GUI just lists the typical intervals
13:57:02 <_glx_> xarick: a pathfinder call without a vehicle seems suspicious
13:59:07 <xarick> it is only set when FindPath is fired
13:59:16 <xarick> but I need it before that
14:00:15 <xarick> need to extract the owner of the ship depot to be the same of the ship
14:00:20 <locosage> problem with indexed colors in svg is that ideally they need to be resolved before rendering
14:00:34 <locosage> otherwise it's impossible to tell if they get covered by something half-transparent
14:01:36 <xarick> maybe there's another way, but these callbacks are going back and forth, and hmm... yeah
14:02:35 <locosage> basically, it's impossible to get RGBAM out of svg without some sacrifices
14:08:48 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1199717443946434640/Screenshot_from_2024-01-24_19-38-03.png?ex=65c38ef0&is=65b119f0&hm=95f90e97281267acc582b77ab08f555d94c64d8a67568c4efe72c29bc17580ec&
14:08:48 <locosage> I don't see how to render even the simplest things like this with cc fill
14:09:38 <locosage> well, this particular thing would work with magenta-to-cc solution
14:09:44 <locosage> but not if it's animated color
14:11:45 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199718185524539472/image.png?ex=65c38fa1&is=65b11aa1&hm=7ff487d524acb130767d9d8f956255eadb819c24f8be66288c2ef0552233f6a8&
14:11:45 <xarick> confirmed...
14:12:04 <xarick> it's an easy fix
14:12:19 <_glx_> a pathfinder call is supposed to have a valid vehicle
14:16:04 <_zephyris> SVGs aren't well suited to the problem, which is why I suggested a svg mask file as the solution. It would have the simple requirement is that the mask svg, rendered aliased, exactly matches a ttd palette index to be used as a mask for that pixel... Its fundamentally very similar to the problem of encoding index recolours for RGBA bitmap sprites.
14:16:28 <xarick> pf.SetVehicle(v); problem solved!
14:16:28 <_zephyris> But, I'm not the one with the skills to implement anything, so all judgement reserved ๐Ÿ˜‰
14:19:19 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199720091990900746/image.png?ex=65c39167&is=65b11c67&hm=3890373c43e12a674d35df2db5253107edc721ce3d0830d2247959aaa03a1b80&
14:19:19 <xarick> we got ship!
14:31:40 <locosage> _zephyris: well, I guess if it's the same greyscale + mask logic as for raster sprites it'll have similar capabilities
14:32:04 <locosage> it's not like you can have non-lightness gradients with indexed colors in raster sprites
14:32:42 <locosage> not sure if combining aliased with antialiased will cause some issues though
14:33:23 <_zephyris> Yup, there would be, but only the same as 32bpp/mask...
14:36:14 *** nielsm has joined #openttd
14:38:05 <locosage> for animated colors bonkygfx uses magenta hue as a signal to use indexed color layer
14:39:37 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1199725196186230834/Screenshot_from_2024-01-11_04-00-13.png?ex=65c39628&is=65b12128&hm=a0765a53f368fcf90ee40d5ad141757bd4f20b974cc2368de31def5c1dca7a43&
14:39:37 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1199725196479824072/Screenshot_from_2024-01-11_03-50-20.png?ex=65c39628&is=65b12128&hm=0b3deba90bd31b6a1857e01b01982115b7e89f8e0c914f9d9c7f4ff6cb89ecf2&
14:39:37 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1199725196752474212/Screenshot_from_2024-01-11_03-50-16.png?ex=65c39628&is=65b12128&hm=3707c2c9cdbbef2448ee7a1ca05253c4c53d91462fe1901f33984149e9e26532&
14:42:54 <locosage> so basically, same thing just different condition for using mask layer
14:45:11 <nanapipirara> locosage: Btw, in this case, wouldn't it be even simpler if the yellow parts would be on a seperate layer and simply use that layers alpha as the mask?
14:46:40 <locosage> well, you still need to have some color on rgba sprite to lightness-adjust indexed colors
14:47:10 <nanapipirara> ah, i see
14:50:23 <locosage> I think I even pass rgba layers as is to openttd
14:50:37 <locosage> so only difference is that it cuts mask by magenta
14:50:54 <locosage> instead of requiring it to match exact pixels
14:51:47 <locosage> not sure how useful it actually is
14:52:21 <locosage> but it evolved from cc approach where magenta actually helps as you don't need a separate layer
14:54:03 <locosage> and cc gradients with mask are quite tricky
15:02:37 <belajalilija> Oh hey the cool thing is being talked about xd
15:18:29 <peter1138[d]> Only bad features, surely.
15:19:23 <belajalilija> Nono
15:19:30 <belajalilija> Itโ€™s a very cool feature
15:19:44 <belajalilija> It will make hand drawing far easier
15:20:33 <belajalilija> Would put to bed any advantage that voxels may have for standard zoom
15:31:46 <locosage> hm, the exact same c sprite encoder algorithm in rust is 10x slower...
15:53:33 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10544: Fix #5713: Use pathfinder to find closest ship depot https://github.com/OpenTTD/OpenTTD/pull/10544
15:57:15 *** Wormnest has joined #openttd
15:59:16 <xarick> how do I use TicToc around returns?
16:00:09 <peter1138[d]> Just return from inside the tictoc.
16:00:57 <xarick> static TicToc::State state1("YapfShipFindNearestDepot", 1000);
16:00:57 <xarick> TicToc ok1(state1);
16:00:57 <xarick> return YapfShipFindNearestDepot(v, max_distance);
16:01:00 <xarick> like that?
16:01:06 <peter1138[d]> Yeah
16:01:14 <xarick> wow, seems better!
16:07:01 <xarick> the explanation is still mildly confusing
16:07:05 <xarick> in the PR
16:08:41 <_glx_> it's just c++ magic, when you used TIC then TOC, you now only need TicToc, which is equivalent of TIC and automatic TOC
16:09:55 <LordAro> presumably it doesn't actually need to be a named variable
16:10:03 <LordAro> could just do `TicToc(state1);`
16:10:31 <_glx_> I think the variable is needed for the scope
16:17:27 <peter1138[d]> Maybe you can do that, never tried.
16:23:15 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199751278071402627/image.png?ex=65c3ae72&is=65b13972&hm=b5eeb8c857fcdefeb00ff27550dec63caef46542afda38fd8d408fe782877e1d&
16:23:15 <xarick> ship service interval is 300 days... and the game just started
16:23:20 <xarick> gonna take a while
16:23:47 <merni> maybe reduce the interval then?
16:24:00 <xarick> I don't think AIs can do that
16:25:32 <locosage> finally xD
16:25:32 <locosage> grf-py-v2-pointer: 0.23 sec, 570092 bytes
16:25:32 <locosage> grf-py-v2: 0.29 sec, 570092 bytes
16:25:32 <locosage> truegrf: 0.39 sec, 570092 bytes
16:25:32 <locosage> grf-py-v1: 0.43 sec, 570092 bytes
16:25:34 <locosage> nml: 0.22 sec, 570092 bytes
16:25:34 <locosage> nml_py: 0.75 sec, 570092 bytes
16:27:16 <DorpsGek> [OpenTTD/OpenTTD] zephyris commented on pull request #10734: Higher max ship speed https://github.com/OpenTTD/OpenTTD/pull/10734#issuecomment-1908483652
16:34:12 <xarick> oops, didn't edit my script to deal with sending ships to depot the nearest depot way...
16:41:34 <xarick> strange, how do I append/insert a nearest depot order with AIs? apparently I can't?
16:41:44 <xarick> i need a destination tile...
16:42:07 <peter1138[d]> You need to find the nearest depot ๐Ÿ˜‰
16:42:42 <xarick> OF_GOTO_NEAREST_DEPOT exists, so it might be possible
16:42:50 <xarick> need to figure it out
16:57:50 <_glx_> it might not be possible in current API
16:58:35 <_glx_> the flags exist, but the API probably not support orders without a valid destination
17:02:44 <peter1138[d]> Nah, it should work.
17:02:45 <_glx_> oh it does, just use INVALID_TILE
17:02:50 <peter1138[d]> Yeah
17:04:20 <DorpsGek> [OpenTTD/OpenTTD] nielsmh commented on issue #9029: Error message opening nowhere near my mouse https://github.com/OpenTTD/OpenTTD/issues/9029
17:05:19 <_glx_> the doc could be better
17:05:29 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199761905405939732/image.png?ex=65c3b858&is=65b14358&hm=ebb606610e712714d3d7c072f02a04fe5a98e254ce2ca875043da6e0e9c8f533&
17:05:29 <peter1138[d]> Hmm, who 'ordered' alpha in 8bpp mode?
17:06:18 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199762113082695782/image.png?ex=65c3b88a&is=65b1438a&hm=055347bebc8927c90158158ca4ef415c45a751bf9ec04bfa02ae31cae362e5d2&
17:06:18 <xarick> oh noes
17:09:29 <_glx_> that's not in master
17:09:59 <xarick> 2800 ships after ๐Ÿ˜ฆ
17:10:04 <xarick> and a crash
17:11:22 <_glx_> const bool is_top_level_call = tile == INVALID_TILE;
17:14:02 <_glx_> then you do ```if (is_top_level_call) {
17:14:02 <_glx_> tile = v->tile;
17:14:02 <_glx_> trackdirs = TrackdirToTrackdirBits(td) | TrackdirToTrackdirBits(td_rev);
17:14:02 <_glx_> }```
17:14:42 <_glx_> but is_top_level_call will still be true
17:15:48 <xarick> I'm looking into this
17:15:53 <_glx_> the assert is just wrong
17:16:07 <xarick> it's possibly one of those "edge cases" I was warned about
17:16:34 <_glx_> tile is now valid, but you assert on the previous state
17:17:20 <xarick> top call found a depot, secondary call is another call after the top one, now with a starting tile at another position, the "teleport search" as I call it
17:17:24 <xarick> it should have a depot
17:18:52 <xarick> it teleports to a tile closest to the area containing the depot
17:19:04 <xarick> so, it's still in the same pathway
17:19:07 <xarick> why does it fail ๐Ÿ˜ฆ
17:20:26 <_glx_> I'm just reading FindNearestDepot(), if you pass INVALID_TILE to it, then this tile is replaced by v->tile, but the function will still continue and trigger the assert
17:21:48 <xarick> I assumed the initial value of 'tile' to be that of the overriding tile
17:22:12 <xarick> if it's not, then it's fixed to the ships current position
17:23:09 <xarick> may need some commenting describing the situation better
17:26:45 <truebrain> peter1138[d]: Fake! ๐Ÿ˜›
17:29:11 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199767869735579678/message.txt?ex=65c3bde6&is=65b148e6&hm=39a40f8ad7ee6c84d158f731b57670230193f177138f15a4b5aafe6a5af2998d&
17:30:39 <xarick> failed to create dump file ๐Ÿ˜ฆ
17:31:52 <xarick> I see 2 calls to YapfShipFindNearestDepot , it failed on the secondary level
17:32:43 <xarick> without dump it's hard ๐Ÿ˜ฆ
17:33:15 <_glx_> it's weird you don't have dump
17:33:49 <_glx_> breakpad is the first thing in vcpkg.json
17:34:04 <xarick> it used to work before
17:34:08 <_glx_> it's the thing creating the dump
17:34:20 <xarick> something changed recently
17:34:37 <_glx_> we switched to breakpad some time ago
17:35:01 <xarick> i dont remember reading breakpad anywhere before
17:35:08 <xarick> that's maybe when it used to work
17:35:37 <_glx_> but cmake should install breakpad during configuration
17:36:00 <xarick> let me check cmake config, or something
17:36:32 <_glx_> cmake runs `vcpkg install`
17:37:18 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199769913124990976/message.txt?ex=65c3bfcd&is=65b14acd&hm=986cc30d7c0c4f258e84a10f860d5bf0c0dcda6389503915952e0d3db4a15ae0&
17:37:50 <_glx_> oh your breakpad is broken
17:38:23 <_glx_> update your vcpkg sources
17:40:12 <_glx_> breakpad was broken from december 12 to december 15
17:40:16 <xarick> Im not sure what I'm supposed to do
17:40:27 <xarick> how do I setup vcpkg
17:41:04 <xarick> deleted cache and reconfiguring, let's see
17:41:12 <_glx_> go to D:/OpenTTD/vcpkg and git pull
17:44:31 <DorpsGek> [OpenTTD/OpenTTD] John-boli commented on discussion #11863: Bananas - Python client? https://github.com/OpenTTD/OpenTTD/discussions/11863
17:44:38 <xarick> it generated a lot of stuff now
17:44:58 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199771844241268776/message.txt?ex=65c3c19a&is=65b14c9a&hm=85ffbb33d48f045e487a3844a90abfd2b19a8c3424763b7e731698fdbac12c81&
17:46:08 <_glx_> 1> [CMake] -- unofficial-breakpad found -- -DWITH_UNOFFICIAL_BREAKPAD -- unofficial::breakpad::libbreakpad_client
17:46:13 <_glx_> seems fine now
17:46:45 <_glx_> you should get dumps
17:46:47 <xarick> ok, let's get this crashing again ๐Ÿ™‚
17:46:54 <xarick> 2800 ships in
17:47:00 <xarick> about 1 hour into the game
17:49:26 <xarick> oh, i had a crash save
17:49:31 <xarick> crashed right away, cool
17:50:06 <xarick> A serious fault condition occurred in the game. The game will shut down.
17:50:06 <xarick> As you loaded an emergency savegame no crash information will be generated.
17:50:09 <xarick> thanks ๐Ÿ™‚
17:51:04 <xarick> my kind of luck
17:51:44 <_glx_> yeah crash saves are usable in debugger though
17:55:36 <locosage> freaking performance, every loop is iterating less time but overall it's somehow 1.5x slower
17:55:50 <locosage> and only difference is some code that executes about never
18:02:42 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199776304652898456/image.png?ex=65c3c5c1&is=65b150c1&hm=80e298455bdcc00180a60f29d089d213b0c15b40e6cb967f902263533a8b5971&
18:02:42 <xarick> this is the place it crashed
18:02:50 <xarick> there is a depot
18:02:57 <xarick> searching for a path to it failed?
18:03:44 <xarick> high level pathfinder found it
18:03:58 <xarick> low level pathfinder didn't ๐Ÿ™‚ that's so strange
18:04:28 <frosch123> i used a 64 char long STR_ id. luckily english.txt is indented for 65 chars ๐Ÿ™‚
18:04:47 <_glx_> that's quite long
18:05:01 <peter1138[d]> Hopefully no language needs to use a case with it ๐Ÿ™‚
18:05:56 <frosch123> that's eints' problem :p
18:06:48 <xarick> do I have to move the tile to the position before the trackdirs?
18:07:06 <xarick> starting outside the edge?
18:09:16 <xarick> hmm it sure makes things slightly more complicated
18:11:43 <xarick> for aqueducts... what kind of tile do i pass as the starting tile?
18:12:39 <xarick> the tile the aqueduct is entered, or the tile it exits?
18:17:36 <peter1138[d]> Hmm, I kinda want a list of permitted palette indices.
18:21:15 <frosch123> transparent/regular/animated/pink/white?
18:24:21 <xarick> aha! there is a solution!
18:24:32 <xarick> the starting tile is the goal tile
18:24:38 <xarick> needs special casing
18:24:49 <xarick> just copy pasting will fix it
18:26:28 <xarick> oh, not really copy pasting ๐Ÿ˜ฆ
18:26:44 <xarick> I do not know the goal tile yet
18:26:57 <xarick> but the goal is the tile it starts, which is skipped by yapf
18:32:53 <kuhnovic> More special casing, just what we need
18:36:28 <xarick> ^_^
18:36:58 *** HerzogDeXtEr1 has quit IRC (Read error: Connection reset by peer)
18:37:02 <xarick> I have a question
18:38:09 <xarick> <https://github.com/OpenTTD/OpenTTD/blob/master/src/pathfinder/yapf/yapf_ship.cpp#L212-L215> what if the ship is in aqueduct
18:39:25 <kuhnovic> Then it will look at the start of the bridge i guess
18:40:07 <xarick> I need to mimic that code, without the ship
18:41:07 <xarick> need to simulate the ship being at a future tile
18:42:38 <kuhnovic> I recommend using the TrackFollower for ships. That way you play by the same rules as the actual ship / pathfinder
18:43:12 <_glx_> Don't reinvent the wheel if not needed
18:44:41 <xarick> hmm, I see two ways to solve this edge case, i treat the start tile as a possibility to be the destination, or I move the starting tile one tile
18:45:01 <xarick> the 2nd approach is risky
18:51:52 *** gelignite has joined #openttd
18:56:04 <peter1138[d]> I did a repo :p <https://github.com/PeterN/openttd-svg-interface/>
18:57:10 <peter1138[d]> Of course this is for a version of OpenTTD that only I have. Exclusivity.
18:57:44 <LordAro> now do the vehicles
18:57:53 <LordAro> svg trains when?
19:05:05 <peter1138[d]> I was going to get it finished tonight, but I'm going out on the bike instead.
19:05:30 <peter1138[d]> aka "better leave that to someone with talent"
19:34:17 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened pull request #11877: Codechange: Split bit numbers from values in RailTypeFlags, RoadTypeFlags enums https://github.com/OpenTTD/OpenTTD/pull/11877
20:07:05 <truebrain> peter1138[d]: now it is more than a prototype ๐Ÿ˜›
20:10:52 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11877: Codechange: Split bit numbers from values in RailTypeFlags, RoadTypeFlags enums https://github.com/OpenTTD/OpenTTD/pull/11877#pullrequestreview-1842280650
21:18:51 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on discussion #11875: Can there be repeats of a keys in a hierarchy of structs in the savegame files? https://github.com/OpenTTD/OpenTTD/discussions/11875
21:21:45 *** gelignite has quit IRC (Quit: Stay safe!)
21:24:38 <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #11877: Codechange: Split bit numbers from values in RailTypeFlags, RoadTypeFlags enums https://github.com/OpenTTD/OpenTTD/pull/11877
21:46:30 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #11878: Add: public key authentication of the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878
21:47:58 <_glx_> oh
21:53:07 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878
21:55:38 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878#issuecomment-1908979508
22:01:45 <peter1138[d]> Hmm, quiet evening.
22:05:40 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:09:16 <xarick> I'm fixing my stuff
22:13:30 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:26:41 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878#issuecomment-1909015163
22:26:53 <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878#pullrequestreview-1842505450
22:31:57 <xarick> > /* By default, we assume the call to this function is not the main one.
22:31:57 <xarick> > * 'tile' and 'trackdirs', if valid, contain information about where the ship
22:31:57 <xarick> > * would be located ahead of its current position in the near future.
22:31:57 <xarick> > * The ship's current position and trackdirs need to be restored if such information
22:31:57 <xarick> > * is missing, thus in turn, making this the first call. */
22:32:01 <xarick> good english?
22:32:15 <xarick> const bool is_top_level_call = tile == INVALID_TILE;
22:33:55 <locosage> wonder if anyone is using admin port with anything but localhost connection xD
22:35:31 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10544: Fix #5713: Use pathfinder to find closest ship depot https://github.com/OpenTTD/OpenTTD/pull/10544
22:36:07 <peter1138[d]> xarick: You lost me at 'not the main one'
22:36:31 <xarick> it's a 2 tier call
22:37:03 <peter1138[d]> Which is what?
22:37:38 <xarick> or a nested call if you will it
22:38:22 <xarick> or uh... forgot the correct wording of it...
22:38:44 <_glx_> recursive maybe
22:38:55 <xarick> yes, recursive, but only once
22:38:59 <peter1138[d]> So rather than assuming it's 'not the main one', you assume it is a nested call (not top-level?)
22:39:56 <xarick> yes, makes for easier handling of parameters
22:40:25 <peter1138[d]> Ok. You asked about the language, I'm trying to guide you here...
22:40:54 <peter1138[d]> Next, is it possible to be certain, instead of having to assume?
22:41:28 <peter1138[d]> Should it be considered a constraint for the caller?
22:43:52 <xarick> maybe the wording needs help... "assume"
22:45:15 <xarick> the main call starts from ship_cmd.cpp - YapfShipFindNearestDepot(v, max_distance);
22:46:25 <xarick> the secondary call starts from water_regions.cpp, already at the destination region - YapfShipFindNearestDepot(v, 0, tile_dist.first, trackdirs);
22:46:25 <xarick> this one with more parameters
22:49:02 <peter1138[d]> I... Assumed, heh, the wording needs help because you asked for it .
22:53:46 <xarick> my brain doesn't work. what do I write in the coment
22:56:47 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878#issuecomment-1909055889
22:57:24 <xarick> > /* If the call to this function is not the main one, 'tile' and 'trackdirs' contain
22:57:24 <xarick> > * information about where the ship would be located ahead of its current position
22:57:24 <xarick> > * in the near future.
22:57:24 <xarick> > * The ship's current position and trackdirs need to be restored if such information
22:57:24 <xarick> > * is invalid, thus in turn, it makes this the first call. */
22:57:46 <xarick> grammar maybe
23:00:47 <truebrain> Rubidium: really cool, #11878 ๐Ÿ™‚
23:08:27 <xarick> > /* 'tile' and 'trackdirs' contain information about where the ship would be located
23:08:27 <xarick> > * ahead of its current position in the near future when the call is not top-level.
23:08:27 <xarick> > * If such information is invalid, then that makes this the top call, so the ship's
23:08:27 <xarick> > * current position and trackdirs need to be restored. */
23:08:27 <xarick> > 3rd attempt
23:10:51 <truebrain> client-side-certificates made easy ... monocypher is pretty nice ๐Ÿ˜„
23:13:17 <truebrain> do we also want server certificate now, so the admin client knows they are talking to the right server? ๐Ÿ˜› (answer: no)
23:14:50 <peter1138[d]> I'm not against any of it btw, I'm just wary of things related to security that look a little homebrew ๐Ÿ™‚
23:15:00 <truebrain> you are absolutely right to ask
23:15:12 <truebrain> he should have linked https://monocypher.org/manual/eddsa in his description, honestly ๐Ÿ™‚
23:15:47 <truebrain> it is the same code I use to validate the signature of the checksum-file for plugins btw; just in reverse ๐Ÿ˜„
23:16:18 <truebrain> well, not even in reverse ..
23:17:58 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878#issuecomment-1909083008
23:19:44 <peter1138[d]> "Render windows with SVG" sounds like a bad idea...
23:19:53 <peter1138[d]> Why did I think of that?
23:20:35 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878#issuecomment-1909085346
23:22:09 <xarick> Some relaxing music before I go to bed https://youtu.be/1HyS80Uf9a8?si=7iuW6LJuWg18Ytgg
23:23:59 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10544: Fix #5713: Use pathfinder to find closest ship depot https://github.com/OpenTTD/OpenTTD/pull/10544
23:24:37 <Rubidium> truebrain: such typical "my brain went faster than my fingers" of me... the actual generating of the keypair in OpenTTD isn't the problem. It's the "how do I get the public key in the server", and "how do I get the public key (of my team mates) in our company"
23:24:57 <truebrain> GUI work! ๐Ÿ˜›
23:25:05 <Rubidium> but I got distracted and didn't write that down :(
23:25:10 <truebrain> as the administration is relatively easy ๐Ÿ™‚
23:26:12 <locosage> peter1138[d]: "To a man with a hammer, everything looks like a nail" ๐Ÿ˜œ
23:27:09 <Rubidium> from a server owner's perspective it's going to be quite cumbersome to have to add all the public keys of people you want to give access. Where a password is shared quite simply on a website or something
23:27:55 <Rubidium> similarly with a company, do I know the public keys of all my team mates?
23:29:38 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878#issuecomment-1909094610
23:30:04 <truebrain> Rubidium: yeah .. when I thought about this, years ago now, I kept coming back to a "lobby" system
23:30:12 <truebrain> where the server own gets: player XXX tries to join your game; allow?
23:30:16 <truebrain> after which it is whitelisted
23:30:25 <truebrain> as for companies, it is a lot easier
23:30:28 <truebrain> they join as spectator
23:30:33 <truebrain> and you can click: invite to company
23:30:50 <truebrain> what ever you do, please never bother the server-owner or client with public-keys ๐Ÿ˜›
23:32:12 <truebrain> Steam and Discord integration helps with all this btw a bit; they can allow inviting people to a server they don't have access to yet. Via the Social Integration the exchange of public keys can be done to whitelist someone
23:32:33 <truebrain> next step ofc would be an in-game "friends" list, but .... yeah ... 2030 called, they know
23:34:23 <truebrain> About X25519, it has this note peter1138[d] will like: `It is fast, simple, and relatively easy to implement securely.` ๐Ÿ˜„
23:34:55 <truebrain> "relatively easy" for who, they never say, but ... ๐Ÿ˜›
23:35:14 <_glx_> relative to what ?
23:35:21 <truebrain> to you know
23:36:29 <locosage> grf-py-v3: 0.13 sec, 552416 bytes (CORRECT)
23:36:29 <locosage> grf-py-v2: 0.23 sec, 552416 bytes (CORRECT)
23:36:29 <locosage> truegrf: 0.38 sec, 570092 bytes
23:36:29 <locosage> grf-py-v1: 0.45 sec, 570092 bytes
23:36:29 <locosage> nml: 0.22 sec, 570092 bytes
23:36:30 <locosage> nml_py: 0.76 sec, 570092 bytes
23:36:35 <locosage> 40% faster 3% smaller and haven't even started on optimizing algorithm yet...
23:42:02 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878#pullrequestreview-1842600968
23:43:28 <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878#issuecomment-1909108189
23:44:29 <truebrain> ah, yes, you don't do Authenticated Encryption ๐Ÿ™‚
23:44:59 <truebrain> ah, no, you do
23:45:07 <truebrain> but the non-streaming; makes sense
23:46:54 <truebrain> I still love DH ... creating a shared secret without ever exchanging the secret on the wire
23:47:05 <truebrain> still blows my mind that is possible
23:47:48 <_jgr_> The trouble is that is that a MITM attacker can do separate DH exchanges with the two sides
23:47:59 <_jgr_> Which is why you need certificates
23:48:01 <truebrain> that is why you need to trust the server pub key ๐Ÿ˜„
23:48:13 <truebrain> we can facilitate that via the Game Coordinator btw
23:48:25 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1199863306400301096/image.png?ex=65c416c8&is=65b1a1c8&hm=c5a508cb671c81853b6f23505132e59497ab41ef2dbb15bcec166cf2000c65b4&
23:48:25 <peter1138[d]> Very gradient, such pruple.
23:48:28 <truebrain> which than acts like a CA ๐Ÿ™‚
23:49:33 <truebrain> (which still ofc allows a MitM attack on the server-side .. but okay)
23:51:37 <peter1138[d]> Hmm, maybe I could try fiddling with the svg and use custom classes to identify bits that should be rendered with specific palette indices.
23:52:18 <truebrain> guess the server-side MitM could be mitigated by listing the pubkey on the servers.openttd.org site, so you can manually check nobody is intercepting your connection ๐Ÿ™‚ But ... not really practical ๐Ÿ˜„
23:53:25 <_jgr_> As if people really check the key fingerpritn that SSH prints out ๐Ÿ˜›
23:53:31 <peter1138[d]> Although that would be a very custom svg renderer. Hmm.
23:53:32 <truebrain> exactly ๐Ÿ™‚
23:53:43 <truebrain> well, I worked at places where it was checked
23:53:59 <truebrain> someone started yelling letters in an open room, for someone else to check if he was seeing the same letters
23:54:05 <truebrain> only then access was allowed
23:54:18 <truebrain> try to MitM that, someone yelling in a room ๐Ÿ˜„
23:56:19 <truebrain> btw, your trick of adding the password in the hash of the shared secret wouldn't work for Rubidium's approach of having the password optional if your client certificate is whitelisted. But it is a nice trick you use there ๐Ÿ˜„
23:57:29 <truebrain> really pleasently surprised by the simplicity of monocypher
23:57:32 <_jgr_> It's not a new trick and I didn't think of it, it's basically <https://en.wikipedia.org/wiki/SPEKE>
23:58:25 <_jgr_> It's pretty convenient in that it doesn't require any more work from the user or server operator
23:59:10 <truebrain> it is nice the password is never exchanged
23:59:59 <truebrain> guess it would still be possible for the admin-port to have both; it just does require a boolean (or packet) to make the distinction