IRC logs for #openttd on OFTC at 2024-01-25
            
00:00:10 <truebrain> if you want to authenticate with your pub-key, send packet A without a password
00:00:30 <truebrain> if you want to authenticate with your password, send packet B with the password in the hash
00:00:47 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1199866419022659657/image.png?ex=65c419ae&is=65b1a4ae&hm=be12115a834af831430d7fb2ef07a359746cb937fc0ece1363c3931ba7bdecef&
00:00:47 <xarick> waiting for December (300 days service intervals)
00:01:13 <truebrain> and maybe a third one for "backwards compatibility", where you can just send password plaintext
00:01:55 <peter1138[d]> Don't support too many options.
00:02:09 <truebrain> I suggest to remove the plain-text πŸ˜›
00:02:15 <peter1138[d]> Yeah
00:02:24 <truebrain> but the other two options might solve Rubidium's puzzle: if you want to login by password, you can
00:02:32 <truebrain> if you are whitelisted, that is fine too (and you don't need the password)
00:05:37 <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-1909126471
00:05:46 <truebrain> I think that is the summary, right _jgr_ ? Anything to add to it? πŸ™‚
00:08:23 <_jgr_> That seems like a good summary to me πŸ™‚
00:08:31 <truebrain> Cheers
00:33:02 <truebrain> Rubidium: 4 years old, but might contain some ideas for you: https://gist.github.com/TrueBrain/05d5d066efedd656ec7daa05f92fa012
01:00:56 *** Flygon has joined #openttd
03:31:29 *** D-HUND has joined #openttd
03:35:11 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:37:25 *** Wormnest has quit IRC (Quit: Leaving)
04:48:50 *** krushia has joined #openttd
04:49:08 <krushia> you guys see this? https://www.youtube.com/watch?v=Q15Py17tiEA
05:09:24 *** keikoz has joined #openttd
06:12:33 <DorpsGek> [OpenTTD/team] EricNakamura opened issue #479: [pt_BR] Translator access request https://github.com/OpenTTD/team/issues/479
06:12:59 <DorpsGek> [OpenTTD/team] EricNakamura opened issue #480: [pt_PT] Translator access request https://github.com/OpenTTD/team/issues/480
06:25:26 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:32:03 *** tokai|noir has joined #openttd
07:32:03 *** ChanServ sets mode: +v tokai|noir
07:39:01 *** tokai has quit IRC (Ping timeout: 480 seconds)
07:53:24 *** D-HUND is now known as debdog
08:09:50 <truebrain> I know what is missing with arrow-key movement .. acceleration. When you press really short, you expect 1 pixel, but you always get 10 πŸ˜›
08:17:32 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11865: Change: make smooth-scrolling based on actual time https://github.com/OpenTTD/OpenTTD/pull/11865
08:17:57 <truebrain> finally figured out what that 512 * ZOOM_LVL_BASE was .. I think. Had nothing to do with zoom. Just 128 * TILE_SIZE. Makes a lot more sense πŸ˜„
08:20:08 <peter1138[d]> That is kinda what I said.
08:20:17 <truebrain> the "kinda" part is important πŸ˜›
08:20:22 <truebrain> but it did trigger me to look at it again πŸ™‚
08:20:44 <peter1138[d]> I mean, I thought that's what you understood already πŸ™‚
08:21:33 <truebrain> clearly, I did not! πŸ˜„
08:21:33 <peter1138[d]> No actually, I misread.
08:21:35 <peter1138[d]> Sorry.
08:21:44 <peter1138[d]> I don't know what you mean now ;D
08:22:27 <peter1138[d]> 512 is just a random value that "someone" choose without really thinking about it.
08:22:44 <truebrain> yeah, the 512 wasn't the issue. The ZOOM_LVL_BASE seems incorrect πŸ˜„
08:22:47 <peter1138[d]> Then when 4x extra was introduced that needed to be scaled up because the base size changed.
08:23:00 <peter1138[d]> So * ZOOM_LVL_BASE does that.
08:23:20 <truebrain> but a tile still has 16 pixels in the viewport
08:23:23 <truebrain> no matter what zoom πŸ˜›
08:23:28 <truebrain> that never changed
08:26:20 <peter1138[d]> No. Tiles only have 16 subtile positions.
08:26:28 <peter1138[d]> But scrollpos_x/_y are in pixels.
08:27:00 <peter1138[d]> `RemapCoords()` does the same * ZOOM_LVL_BASE.
08:28:33 <truebrain> so then I am still confused what it has to do with ZOOM_LVL_BASE πŸ˜›
08:28:59 <peter1138[d]> Well we made every 4x larger.
08:29:13 <truebrain> so the viewport pixels were made larger?
08:29:18 <truebrain> or smaller
08:29:19 <truebrain> πŸ˜„
08:32:59 <peter1138[d]> Subtiles are still 16 positions, that never changed (hah yet). The 3D tile x/y/z coordinates are converted to screen x/y coordinates. Screen coordinates were bumped up by ZOOM_LVL_BASE.
08:33:15 <truebrain> okay
08:33:23 <truebrain> there are a few odds and bits about this still ... hmm
08:33:37 <truebrain> has to do with arrow-movement btw
08:35:57 <peter1138[d]> I can't find that bit again πŸ˜„
08:36:04 <truebrain> yeah, took me a while too
08:36:07 <truebrain> window.cpp, 2732
08:36:14 <truebrain> okay .... so the movement isn't 20
08:36:19 <truebrain> but 20
08:36:24 <truebrain> as there is a secret `2`
08:36:37 <truebrain> did not see that one coming
08:37:32 <truebrain> that explains why my math wasn't adding up there; okay, another thing that I now understand
08:37:38 <peter1138[d]> It's 10 or 50 * shift * the table lookup * current zoom level.
08:37:50 <truebrain> yeah, the table lookup was of surprising values πŸ˜„
08:37:57 <truebrain> makes sense, just didn't see it coming πŸ˜›
08:38:19 <peter1138[d]> Don't forget about autoscroll which everyone forgets about.
08:38:32 <truebrain> right, back to the max_scroll we go ..
08:38:43 <truebrain> as 512 tiles per 30ms is a weirdly large value
08:38:58 <peter1138[d]> And yet you said it scrolls too slowly πŸ™‚
08:39:08 <truebrain> not after my fixes!
08:39:17 <truebrain> the value was fine, as it turns out; it was just not per time-unit
08:39:24 <peter1138[d]> Oh, it's not 512 tiles. It's 512 pixels.
08:39:32 <truebrain> indeed
08:39:40 <peter1138[d]> * ZOOM_LVL BASE πŸ˜„
08:39:53 <truebrain> scrollport is always in pixels at 4x zoom, right?
08:39:58 <truebrain> even if zoomed out, it doesn't rescale?
08:40:01 <peter1138[d]> Yes.
08:40:20 <truebrain> and there are 64 pixels in a tile, in the width
08:40:37 <truebrain> so that would mean 8 tiles per 30ms
08:41:46 <peter1138[d]> Sounds about right. That's slow when you're jumping from tile 0,256 to 256,0.
08:42:09 <truebrain> about a second
08:42:38 <truebrain> ah, yes, so that is why I doubled it
08:42:42 <truebrain> wauw, big circle much?
08:45:08 <peter1138[d]> I don't think it's 1 second. That's 65536 * ZOOM_LVL_BASE pixels to move, limited to 512 * ZOOM_LVL_BASE pixels.
08:45:45 <peter1138[d]> 128 steps. 1/30 * 128 = 4.2624 seconds, ignoring the slowing down at the end.
08:46:02 <truebrain> that for sure isn't true, as we can measure it is not over 2 seconds easily
08:46:15 <peter1138[d]> Oh you know what I did.
08:46:23 <peter1138[d]> 65536 is at ZOOM_LVL_BASE a;lready.
08:46:26 <truebrain> it is 16384 * ZOOM_LVL_BASE to scroll 256 tiles, not?
08:46:28 <truebrain> πŸ˜„
08:46:53 <peter1138[d]> 1.0656 seconds, correct πŸ˜„
08:47:06 <peter1138[d]> Yes.
08:47:31 <peter1138[d]> No wonder we have no idea what we're doing.
08:47:42 <peter1138[d]> I forgot I multiplied about 2 seconds after doing it.
08:47:54 <peter1138[d]> "we" loosely here.
08:48:36 <truebrain> my math says 960ms btw
08:48:56 <truebrain> it is 30ms btw, not 1/30 of a second πŸ™‚
08:49:08 <truebrain> or am I wrong .. checkingggggg
08:49:13 <truebrain> (I feel like a certain person now πŸ˜› )
08:49:27 <peter1138[d]> So with SVG RGBA to palette index, I also need a way to allow you to draw pixels in the animated range. They are effectively all magenta at this point :/
08:50:48 <truebrain> owh, this is in game-ticks ofc
08:51:03 <truebrain> well, I made it 30ms by dividing by 30ms πŸ˜›
08:51:48 <truebrain> what do we run on now ... I forgot
08:52:04 <truebrain> 1000 / 74
08:52:22 <peter1138[d]> I hope scrolling is not related to game ticks πŸ˜„
08:52:28 <truebrain> it is updated during
08:52:34 <peter1138[d]> (Yes I probably bungled that calculation too)
08:54:48 <truebrain> no, I can't be right
08:54:49 <truebrain> ugh
08:54:57 <truebrain> owh, draw-tick, yeah, pfew
08:55:13 <truebrain> this explains why it was scrolling at a different speed for some people
08:55:17 <truebrain> it is bound to the Hz you selected
08:55:22 <truebrain> lolz
08:55:47 <truebrain> so smoothscrolling was done during UpdateWindows(), which is called refresh-rate times per second
08:55:56 <truebrain> which can be 30Hz .. 60Hz ... πŸ˜›
08:56:05 <truebrain> and in my case: 144Hz!
08:56:11 <peter1138[d]> lol
08:56:43 <peter1138[d]> So your changes to make it timed-based are definitely correct (not that I thought that was wrong anyway)
08:56:51 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11865: Change: make smooth-scrolling based on actual time https://github.com/OpenTTD/OpenTTD/pull/11865
08:56:55 <truebrain> yeah, but confirms we really should do it πŸ˜›
08:56:58 <truebrain> please proof-read my comments
08:57:01 <truebrain> I think I got it right now
09:05:11 <peter1138[d]> Do you know what/ SetViewportPosition is very weird.
09:06:17 <peter1138[d]> Okay, the last bit is magic.
09:07:02 <peter1138[d]> It is literally moving pixels around, checking what's in front of the viewport, so avoid having to actually redraw the viewport.
09:07:17 <peter1138[d]> So that explains the window iterator.
09:08:39 <peter1138[d]> This looks better, however there is one thing that might be nice to change.
09:09:20 <peter1138[d]> It's kind of separate to this issue but related enough that it could affect your changes significantly.
09:09:50 <peter1138[d]> intro_gui.cpp:242-255
09:10:17 <peter1138[d]> That is where the intro game is automatically panned when using the release-version intro game.
09:11:15 <peter1138[d]> It handles slow panning by itself, but it bypasses smooth scrolling (it wants to get to a specific point at a specific speed, rather than as fast as the smooth scrolling goes)
09:12:17 <peter1138[d]> Looks like it also depends on user activity. Oof.
09:14:39 <peter1138[d]> Oh. You know what. Forget it, this is horrible too πŸ˜‰
09:15:11 *** thelounge345 has quit IRC (Quit: The Lounge - https://thelounge.chat)
09:15:36 *** thelounge345 has joined #openttd
09:20:15 <peter1138[d]> It might've been smooth but just following a vehicle at the time I was looking. Which will never be smooth πŸ˜„
09:20:48 *** thelounge345 has quit IRC (Quit: The Lounge - https://thelounge.chat)
09:23:08 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #11865: Change: make smooth-scrolling based on actual time https://github.com/OpenTTD/OpenTTD/pull/11865#pullrequestreview-1843213474
09:23:48 *** thelounge345 has joined #openttd
09:29:51 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #11865: Change: make smooth-scrolling based on actual time https://github.com/OpenTTD/OpenTTD/pull/11865
09:29:54 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed issue #11873: [Bug]: something's wrong with center view on tiles https://github.com/OpenTTD/OpenTTD/issues/11873
09:30:06 <peter1138[d]> truebrain: you're a trend-setter. They're changing the "Allow Cheats" option to "Allow Commands" in Minecraft.
09:32:32 <truebrain> peter1138[d]: haha, excellent πŸ˜›
09:32:48 <truebrain> peter1138[d]: I will make it a point to look at it some day πŸ™‚ For now, I want to push my "change default to smooth scrolling" πŸ˜›
09:33:00 <peter1138[d]> πŸ™‚
09:33:23 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11860: Change: set smooth-scrolling on by default https://github.com/OpenTTD/OpenTTD/pull/11860
09:33:40 <truebrain> can't believe it depended on the refresh-rate
09:33:42 <truebrain> that is so silly
09:34:05 <peter1138[d]> I guess nobody noticed.
09:34:22 <truebrain> also relatively new ofc, that refresh-rate can be configured
09:34:27 <peter1138[d]> Relatively.
09:34:54 <peter1138[d]> I guess it would've been affected by fast-forward at some point in the past.
09:35:23 <truebrain> lolz
09:35:39 <truebrain> ugh, starting vscode makes a DNS request to their update server
09:35:42 <truebrain> but there are so many CNAMEs in there
09:35:50 <truebrain> that it exceeds the MTU of UDP when you are behind a VPN
09:35:54 <truebrain> so ... DNS resolving fails
09:35:58 <peter1138[d]> I'm trying to work out what 11860 conflicted with to require an update. Or was it just too many commits behind now...
09:36:02 <truebrain> why do people use such long CNAMEs 😦
09:36:23 <peter1138[d]> Nice.
09:36:41 <reldred> truebrain: fucking WHAT?
09:36:42 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #11860: Change: set smooth-scrolling on by default https://github.com/OpenTTD/OpenTTD/pull/11860#pullrequestreview-1843241689
09:36:46 <reldred> why would you even DO THAT
09:36:59 <truebrain> peter1138[d]: It was just a rebase for me to enable preview so you can see it in the browser πŸ™‚
09:37:08 <truebrain> reldred: do what?
09:37:12 <truebrain> do DNS over UDP?
09:37:15 <truebrain> dunno, since the 80s?
09:37:46 <reldred> Have CNAME's so long they can possibly exceed MTU in encapsulated traffic
09:37:56 <reldred> like
09:37:57 <reldred> jesus
09:38:07 <truebrain> `dig update.code.visualstudio.com` and have fun
09:38:14 <truebrain> at the moment it is relatively short
09:38:26 <truebrain> but they use random words for their load balancing
09:38:29 <truebrain> so sometimes there are very long words
09:38:41 <reldred> azure
09:38:45 <reldred> blame azure for everything
09:38:54 <reldred> and by association, blame microsoft
09:38:59 <peter1138[d]> I could just pi-hole it πŸ™‚
09:39:05 <truebrain> it is also the infrastructure I work in, as the DNS repeater should know about the MTU limit πŸ˜›
09:39:32 <truebrain> but it is a fun issue, where I cannot launch VSCode for good parts of the day
09:39:35 <truebrain> I just have to be lucky
09:39:38 <truebrain> and not shut it down after
09:39:42 <truebrain> makes starting the day interesting
09:40:14 <reldred> I got involved in a really hilarious four way fight once between Apple, Avaya, and two different engineering teams from our largest telco in Australia
09:40:26 <reldred> Over fragmented UDP
09:40:37 <truebrain> fragmented UDP doesn't exist πŸ˜›
09:40:50 <reldred> One of the two engineering teams wanted it to πŸ˜›
09:40:52 <truebrain> it either arrives or doesn't; I refuse to believe in any other world πŸ˜„
09:41:04 <truebrain> our network protocol used UDP to talk to the master-server
09:41:07 <truebrain> so much regret
09:41:12 <truebrain> the issues that gave ........
09:41:20 <truebrain> (the reason it is now TCP btw)
09:41:30 <truebrain> some corperate networks do HORRIBLE shit with their traffic
09:42:11 <truebrain> but yeah, over the years more than one person suggested to fragment UDP. Which always made me giggle πŸ˜›
09:43:15 <reldred> So yeah, funny story, and I wasn't NDA'd so I'm free to share it. We kept running into a weird issue with the SIP trunks from $carrier getting a weird call dropout but *only* from incoming mobile phone calls from $carrier that were made from iPhones and only after a particular firmware version, and *only* when voice over LTE was enabled on the handset (which became the default pretty soon before).
09:43:25 <peter1138[d]> "i have a joke about fragmented udp but you wouldn't get it"
09:43:46 <truebrain> peter1138[d]: hahahaha, lol, wth! πŸ˜› That is funny πŸ˜„
09:44:04 <reldred> So unlike most other carriers in Australia, this carrier was basically doing proxied SIP end to end. If you pulled apart a header you could see it had originally came from the LTE network and even see details about the originating tower, yadda yadda.
09:44:30 <reldred> At this time, $carrier was also mandating that all SIP trunks had to be set to UDP
09:45:15 <reldred> And what we found, was for calls coming from the VoLTE network, the goddamn codec list in the SIP header made the SIP invites get to nearly 1700 bytes...
09:46:26 <reldred> So the four way fight ended up being Apple and the PABX vendor beating the shit out of $carrier's SIP trunking team for mandating everyone use UDP. $carrier's SIP trunking team insisted on using UDP because they didn't want to wear the overhead of TCP.
09:47:11 <peter1138[d]> Oof
09:47:46 <reldred> but why did it only happen after a particular firmware version? Apple added an extra flag to the SIP INVITE's *they* were sending to the VoLTE network that the end party needed to follow the RFC's to the fucking letter. Some 3GPP consortium specification blah blah blah.
09:48:52 <reldred> The Avaya PABX on the far end, got the fragmented UDP - which it had no problems reassembling btw - saw the flag in the header to obey the RFC's and silently drop any invites that didn't comply, and shitcanned all the phone calls coming specifically from iPhones running a certain firmware version.
09:49:23 <reldred> Some other PABX's however would memory leak and crash approximately 30mins after receiving the fragmented invite...
09:50:21 <reldred> (but I didn't have to maintain those makes of PABX, just the Avaya's, so my colleagues had the fun job of dealing with the frequent crashes after I identified what the cause was)
09:50:33 <truebrain> devices that support reassembling fragmented UDP have a nice issue called I WILL SHIT OVER YOUR DEVICE AND YOU WILL RUN OUT OF MEMORY NOW
09:53:08 <reldred> so yes, I spent far too much time at my last job reading sip invite headers and picking fights with carriers
09:53:58 <truebrain> I once had an ISP that had such crappy switches that UDP packets dropped in ~50% of the time. On its own annoying, but not a real problem. The real problem? They used EAPOL for authentication .. you had about 50% chance of being able to authenticate. It was "fun" πŸ˜›
09:54:09 <reldred> ooof
09:54:30 <truebrain> especially fun was the part where a shithead of 19 years old start telling their IT department what the problem is ... LALALALA
09:55:19 <reldred> I monitor the DC setup I look after pretty obsessively. Everything's tracked, in Grafana, and on the wall for all to see.
09:55:42 <LordAro> truebrain: bwhaha. (re CNAMEs)
09:55:51 <truebrain> tnx for adding the context πŸ˜„
09:56:02 <truebrain> wait till you read peter1138[d] 's joke .. it is the best one of today
09:56:20 <peter1138[d]> I do wish it was mine, heh
09:56:24 <reldred> so yes, your little DNS fragmented UDP issue made me chuckle TrueBrain lmao
09:57:25 <LordAro> truebrain: i knew i was still scrolled up :p
09:59:43 <peter1138[d]> Hmm, music perhaps.
10:01:08 <peter1138[d]> Maybe I need something a bit more custom with SVG rendering that allows drawing a specific palette index directly.
10:01:33 <LordAro> that's a very old UDP joke
10:01:35 <LordAro> :p
10:01:39 <LordAro> still funny though
10:01:43 <LordAro> reldred: excellent story
10:03:06 <reldred> I just love imagining the dutiful little avaya pabx, handling fragmented UDP all day without a care in the world, carefully reassembling headers and getting on with the work, then all of a sudden getting one from an iphone, seeing the flag and going 'OK THEN!' and throwing it in the fucking *trash*
10:03:35 <reldred> and then saying *nothing*
10:03:38 <reldred> nothing in the logs
10:03:45 <reldred> nothing in the pcaps
10:03:48 <reldred> nothing
10:03:59 <reldred> (until you collect from the wire level)
10:04:04 <LordAro> i dread to think how hard that was to debug
10:04:26 <truebrain> "fun" πŸ˜„
10:05:13 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10544: Fix #5713: Use pathfinder to find closest ship depot https://github.com/OpenTTD/OpenTTD/pull/10544
10:06:21 <_zephyris> peter1138[d]: Surely the simple work-around is to pre-process the svg, replacing colours that don't exactly match a palette colour? Gradients can't match, so should go blue. Semi-transparent shifts the colour of anything under it, so draw as blue. Etc.
10:07:40 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #11860: Change: set smooth-scrolling on by default https://github.com/OpenTTD/OpenTTD/pull/11860
10:08:17 <DorpsGek> [OpenTTD/team] lrlopez opened issue #481: [es_ES] Translator access request https://github.com/OpenTTD/team/issues/481
10:09:45 <peter1138[d]> Nope, we can already convert RGB to palette index. Issue 1 is when you need to use or avoid specific palette indices for remapping, we can support this by limiting which palette indices we can map to. Issue 2 is the palette animation indices, which don't actually have a nearest colour they can map to (they're all 0,0,0 in the base palette table).
10:10:01 <peter1138[d]> (No amount of RGB LUTs would solve issue 2)
10:11:15 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200020051374374992/image.png?ex=65c4a8c3&is=65b233c3&hm=932bedf8f86661cb6c06beccf691eb2fe841a6a96690fc2ca6d396666815e904&
10:11:15 <peter1138[d]> I did this which lets you limit which palette indices are used by selecting (at the NewGRF level, not SVG) a pre-defined palette index restriction.
10:11:44 <peter1138[d]> But that doesn't help with animated indices, so I think is not the right way.
10:13:55 <peter1138[d]> It could be possible to add a "everything in this svg layer is palette index 220" attribute, so it basically ignores the any colour and just goes by alpha.
10:14:37 <peter1138[d]> But "svg layer" here means a separate SVG file embedded into the same sprite -- a bit like the mask sprite now, but you'd need one for each colour.
10:15:03 <peter1138[d]> Hmmm, or maybe a RGB X = Palette Index Y look up table provided by the NewGRF.
10:15:59 <peter1138[d]> Still a separate layer but it would be possible then to just use one layer for the remap.
10:17:42 <peter1138[d]> For authors it's a pain for sure, however it's done.
10:19:28 <_zephyris> IMO a layer for remap gets annoying. Because you might define a CC bit of the picture with a stroke occluded by another filled object, etc.
10:20:01 <_zephyris> I probably need to make a demo file to illustrate what I'm suggesting.
10:21:38 <peter1138[d]> No, I understand.
10:22:10 <peter1138[d]> To have it all in one svg file definitelky requires a custom SVG renderer that understands RGBAM.
10:23:37 <peter1138[d]> And still needs some custom attribute to specify which palette index to use, which no other svg software will understand.
10:24:06 <reldred> probably not the worst abuse of the SVG spec that's been committed
10:28:58 <emperorjake> I just saw that 11624 got merged as well, awesome
10:29:06 <emperorjake> time to make more PRs
10:30:30 <peter1138[d]> πŸ™‚
10:32:50 <peter1138[d]> Extending nanosvg might be possible but it's all quite limited and basically a dead implementation at the moment.
10:33:16 <peter1138[d]> On the other hand, that means no need to worry about merging in updates.
10:33:38 <peter1138[d]> lunasvg is more capable but quite a bit larger, and we'd have to vendor that if we customize it.
10:34:16 <truebrain> lunasvg is available in vcpkg, so there is that
10:34:28 <peter1138[d]> That's useful to know.
10:34:30 <truebrain> just don't customize it! πŸ˜›
10:34:46 <peter1138[d]> I was considering switching as it supports stylesheets, nanosvg ignores them completely.
10:34:49 <truebrain> it is not available in Ubuntu, sad
10:35:03 <peter1138[d]> Nor Debian.
10:35:19 <truebrain> so Linux would get dependant on vcpkg too; not sure that is a bad thing, honestly
10:35:30 <truebrain> it does deliver much more up-to-date versions of things
10:35:53 <peter1138[d]> I vendored nanosvg for now, in fact that's how it's designed to be used, it's basically a header-file implementaiton.
10:36:22 <truebrain> that is nice
10:36:49 <peter1138[d]> I don't think we can do easier-to-use palette index stuff without customising, sadly.
10:38:09 <peter1138[d]> "Reverse-rendering" would help with Zephyris point (draw palette index first, overwrite with rgba second) but it's not easy for authors to use.
10:38:42 <truebrain> pff, since when do we care about authors
10:40:53 <locosage> the most cursed rust code I've ever written...
10:40:53 <locosage> while {
10:40:53 <locosage> iptrm = iptrm.add(1);
10:40:53 <locosage> iptrm < iptrm_end && *iptrm == *{jptr = jptr.add(1); jptr}
10:40:53 <locosage> } {}
10:41:35 <peter1138[d]> I hope that's nothing to do with pointers.
10:41:44 <peter1138[d]> But given ptr...
10:41:47 <locosage> oft it has
10:42:30 <peter1138[d]> I don't know must about rust... is this a big unsafe block, or is each dereference checked?
10:42:50 <xarick> hi
10:42:51 <locosage> yeah just wrapped everything in unsafe
10:43:12 <xarick> could you make autosaves multithreaded
10:43:24 <xarick> lzma:9 takes 1 minute to save 4k maps
10:43:35 <locosage> trying to measure performance of different variations and random boundary checks in rust aren't helping
10:43:55 <truebrain> xarick: it is
10:43:58 <peter1138[d]> So basically writing C in rust... good work.
10:44:17 <xarick> it only uses 1 thread to compress
10:44:28 <truebrain> yes; which is not the same thread as the game
10:44:30 <locosage> it is somehow faster than c++ xD
10:44:32 <truebrain> ergo: multi thread
10:45:29 <xarick> weird
10:45:48 <peter1138[d]> The lzma part could possibly be multithreaded these days?
10:46:09 <xarick> yes, please
10:46:24 <peter1138[d]> Make a PR. My 256x256 maps don't need it.
10:46:43 <locosage> locosage: it's basically a variation of this loop <https://github.com/OpenTTD/nml/blob/master/nml/_lz77.c#L83>
10:47:05 <xarick> eh... well I tried looking at lzma code, it's a different style
10:47:22 <truebrain> peter1138[d]: xz, yes; lzma, not sure?
10:51:44 *** keikoz has joined #openttd
10:59:30 <xarick> oh lzma source is different now
10:59:42 <xarick> it's a vcpkg thing
11:08:08 <xarick> Easy .xz Stream encoder initialization
11:23:18 <xarick> yeah, i have no idea what im looking at
11:30:59 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200040117197344798/image.png?ex=65c4bb73&is=65b24673&hm=54e1c1c09d2740961265bf30029f04eb31f552a5f8fdfe4320e0d0e322ad3a69&
11:30:59 <xarick> those averages are scary high 😦
11:44:13 <xarick> at this pace... i predict about an average of 50 ms ship ticks when there's 5000 ships on all companies, that's 75000 ships
11:44:25 <xarick> 50-60
11:44:44 <xarick> gonna wait
11:44:58 <xarick> 70000 ships* only 14 ais, my bad
11:46:00 <truebrain> So the argument is: in my super unrealistic use case it only takes 50ms to handle all ships? Not sure why that is "scary high", but that might be just me.
11:47:22 <belajalilija> no one needs 200+ ships on a multiplayer server
11:47:39 <xarick> the scary high part is about YapfShipFindNearestDepot in comparion with YapfShipChooseTrack/YapfShipCheckReverse
11:47:46 <belajalilija> and no single person needs 2800 ships on single player
11:48:04 <emperorjake> I beg to differ
11:50:10 <truebrain> Everyone should play how they like πŸ˜„
11:50:21 <truebrain> just assuming we can handle 70000 ships in a timely manner is .. unrealistic πŸ˜„
11:50:35 <truebrain> (as with any other vehicle type πŸ˜› )
11:50:55 <emperorjake> https://cdn.discordapp.com/attachments/1008473233844097104/1200045131206762516/image.png?ex=65c4c01f&is=65b24b1f&hm=062b1f9f3666a2780f202c2661cc94bd9b2f474195ea820c4f83b84c5a90eeb0&
11:51:17 <truebrain> those 5 aircrafts
11:51:20 <truebrain> poor little things
11:52:35 <emperorjake> The rest of the aircraft are owned by a separate company. There were 4 companies to get around the vanilla 5000 vehicle limit but I merged them in JGR to show the full amount of ships, trains and RVs
11:52:49 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200045609755873371/image.png?ex=65c4c091&is=65b24b91&hm=8c1d802f0d5904218d4c09b2454468e07891a98ec86ce62f295986d913b88d2f&
11:52:49 <xarick> wow, this still happens
11:53:12 <truebrain> emperorjake: very nice πŸ˜„
11:54:15 <emperorjake> My long running games always end up with hundreds of ships, even in MP
11:55:27 <xarick> what's the edge case gonna be now
12:04:22 <truebrain> hmm, OpenTTD isn't on the Epic Launcher .. how difficult would that be? πŸ˜›
12:05:50 <peter1138[d]> Ew :p
12:06:10 <xarick> TRACKDIR_BIT_NONE (0) how ?
12:07:28 <xarick> for some reason I'm passing a teleported starting tile with no tracks
12:08:30 <xarick> that traversability bits is either lying to me or...
12:13:14 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200050748898152589/image.png?ex=65c4c55a&is=65b2505a&hm=12c564dfed0f11901349fcfafb463368b5730ce13f3641828c9ad95793712b58&
12:13:14 <xarick> crashed here...
12:13:45 <xarick> another case of starting tile edge case, but how come it got no tracks from here?
12:21:23 <xarick> i dont trust breakpad debugger... these values make no sense
12:23:13 <xarick> why are the values optimized away?
12:27:24 <truebrain> Complain A: omg, this is so slow
12:27:30 <truebrain> Complain B: omg, why are things optimized
12:31:00 <xarick> I don't trust this
12:31:24 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200055320765009940/image.png?ex=65c4c99c&is=65b2549c&hm=f2de653e16b3c984f25b96bbbc2c27e5fb199bf1f8f1d7d295f9a0652f4a15a5&
12:31:24 <xarick> if the diagdir was invalid, it would assert at DiagdirReachesTrackdirs
12:31:36 <xarick> it asserted later
12:34:02 <xarick> useless debugger
12:37:28 <reldred> Hmm, looks similar to the road direction stuff that was causing me issues with diagonal roads. What I found with that was you could have invalid diagdirs and they wouldn’t necessarily assert there, I was getting asserts for articulated vehicles shearing in two 🀣
13:12:38 <peter1138[d]> breakpad isn't a debugger.
13:14:35 <_glx_> Yeah it just writes the dump, and the dump is exactly like the old one
13:16:03 <_glx_> Dumps can give a hint on what happens, but not really more
13:19:28 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10544: Fix #5713: Use pathfinder to find closest ship depot https://github.com/OpenTTD/OpenTTD/pull/10544
13:19:45 <xarick> im too old for this
13:39:52 <xarick> if I start a newgame with seed 1, will that also make the random seeds of AIs based of it?
13:40:44 <belajalilija> what
13:40:59 <xarick> for some reason I'm not getting the AIs to replicate the same play they had before
13:41:07 <xarick> they're doing differently
13:45:36 <LordAro> map seed is not the same as random seed
13:55:26 <xarick> lzo is so fast
13:55:38 <xarick> half a second and a 4k map savegame is done
14:19:16 <_glx_> It's fast but the savegame is huge
14:27:17 <xarick> expecting a crash any moment now
14:27:31 <xarick> calls to findnearestdepot have started
15:17:06 <peter1138[d]> 40 minutes later...
15:20:27 <xarick> no crash yet 😦
15:32:03 <_glx_> Might be simpler to implement a function to change service interval
15:32:51 <_glx_> Or just ctrl-send-to-depot
15:38:44 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200102463542415522/image.png?ex=65c4f584&is=65b28084&hm=46e4d71cfea5e1e75ba2060f9cf7dd7559b55c0f1b5093cb10324631ac93fb60&
15:38:44 <xarick> i should be happy, but i'm not... a crash is expected... I didn't change anything
15:38:57 <xarick> only rebased
15:39:47 <xarick> something I did however was clear database errors, rescan solution, delete caches and rebuild
15:40:02 <xarick> but the code is unaltered
15:41:47 <LordAro> crashes that you can't reliably reproduce are the worst
15:43:48 *** nielsm has joined #openttd
15:54:55 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200106534202527814/image.png?ex=65c4f94e&is=65b2844e&hm=ef00efab8d7fd0a23ade81866f32b65550f709d659c36f3e1c10193c79fa738a&
15:54:55 <xarick> I suppose I didn't update the script properly
15:56:55 *** Wormnest has joined #openttd
15:58:16 <xarick> erm, yep I didn't
15:58:20 <xarick> local depot_order_flags = AIOrder.OF_STOP_IN_DEPOT;
16:00:29 <xarick> local depot_order_flags = AIOrder.OF_STOP_IN_DEPOT | AIOrder.OF_GOTO_NEAREST_DEPOT;
16:00:35 <xarick> should be this
16:00:41 <xarick> restart the test?
16:02:36 <xarick> gonna change choosetrack to 10000
16:02:45 <xarick> 1000 spawns too often
16:12:25 <xarick> nice, it works
16:12:27 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200110949831545005/image.png?ex=65c4fd6b&is=65b2886b&hm=4f06d2f4970047b4ed1ddf3a2952babec250ff475eb950b89627b5a4acab936e&
16:13:51 <truebrain> I am hungry
16:13:54 <truebrain> peter1138[d]: is it dinner time?
16:20:41 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11874: Change: rebrand Cheats as Sandbox Options https://github.com/OpenTTD/OpenTTD/pull/11874
16:21:20 <peter1138[d]> Yes.
16:33:58 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
16:34:41 <peter1138[d]> Hmm, what to do about the closebox sprite...
16:46:56 <truebrain> Owh boy.. github is bitching about node16 stuff πŸ˜„
16:52:09 <LordAro> truebrain: how dare you use a slightly old version of nodejs
16:52:13 <LordAro> terrible.
16:52:24 <truebrain> I know right!
16:53:19 <peter1138[d]> Bye bye legacy?
16:57:20 <peter1138[d]> I see at least one other project did the pinning thing...
17:08:14 <peter1138[d]> Uh, this is so weird.
17:23:30 <peter1138[d]> So SPR_CLOSEBOX is sprite no 143. That means it is actually a font sprite, complete with shadow. But we draw it as a normal sprite, with some special colour remap handling.
17:48:14 <rau117> The buoys will not be removed/hidden after the introduction of the new ship pathfinder?
17:48:30 <_glx_> of course not
17:48:31 <peter1138[d]> No
17:48:45 <rau117> Ah, okey
17:48:46 <_glx_> they still have a use
17:48:53 <wensimehrp> As waypoints
17:50:27 <xarick> i got the crash!
17:50:47 <xarick> after 10 thousand years
17:50:48 <xarick> at last
17:55:49 <xarick> seems to involve locks, again
17:56:15 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200137069150875668/Unnamed_1979-11-17.png?ex=65c515be&is=65b2a0be&hm=e812d6cc05b162473ee9c204354781a9c1e31982b0c3ab72639230db11ef18b5&
17:58:05 <peter1138[d]> Are you trying to pass through the lock wall?
17:59:17 <xarick> not all parameters make sense
18:01:36 <xarick> difficult to decipher whether the values are real or guesses
18:03:22 <xarick> the 2 regions involved apparently are the square at the bottom and the square at the left side
18:03:58 <xarick> which one is the parent, which one is the current
18:06:01 <xarick> there is a depot on the left region, so that's the current region
18:07:20 <xarick> there's none on the south, it's entering from the bottom to the left, the yapf is called at the region with the lock
18:07:31 <xarick> at the border shared by 2 regions
18:07:44 <xarick> the crash is on the lock, ok, it's starting to make sense
18:08:02 <xarick> let me show u depot screenshot
18:10:39 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200140694367522846/image.png?ex=65c5191f&is=65b2a41f&hm=dc3aee2f0e3f07cd79eb9a5c3a01fc999ff816f1f5f904f32a59539fc42f9ddb&
18:10:56 <xarick> traversability bits are lying
18:11:27 <xarick> there is no tracks when entered from the yellow arrow
18:11:35 <xarick> from that direction
18:11:52 <xarick> but somehow... the bit was set
18:12:32 <xarick> the green arrow is yapf starting a teleport pathfind call
18:12:39 <xarick> to the closest ship depot
18:12:43 <xarick> with is that one as red
18:12:56 <xarick> but without tracks...
18:13:01 <xarick> of course it fails
18:14:24 <xarick> I'm like 90% sure the bug is actually not the pathfinder
18:14:29 <xarick> but the traversability bits
18:14:35 <xarick> wasn't updated
18:15:00 <xarick> must investigate
18:17:07 <xarick> assert((trackdirs & ~TRACKDIR_BIT_MASK) == TRACKDIR_BIT_NONE); this assert is misleading
18:18:00 <xarick> (TRACKDIR_BIT_NONE & ~TRACKDIR_BIT_MASK) == TRACKDIR_BIT_NONE
18:18:11 <xarick> it's not what I thought it is
18:24:35 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200144200465924097/image.png?ex=65c51c62&is=65b2a762&hm=08e41df6df03cdc46e00a2d850329df6f56beb1a12fe9c4b3f9c07dede0450ec&
18:24:35 <xarick> confirmed!... the bits lie
18:24:47 <xarick> 65535
18:24:55 <xarick> it wasn't updated
18:26:31 <xarick> not invalidated
18:26:44 <xarick> similar to the situation with object tiles
18:29:30 <xarick> need to look at buildlock code, see what it does (not) do
18:40:03 <xarick> an actual source for desync
18:41:25 <xarick> clear command is skipped...<https://github.com/OpenTTD/OpenTTD/blob/master/src/water_cmd.cpp#L316-L337>
18:42:04 <_glx_> oh nice find
18:42:26 <xarick> i'm sure I had a hand in this part too
18:42:29 <xarick> lol
18:42:36 <xarick> now it's biting me in the ass
18:43:43 <xarick> build lock code is so different than the other build commands
18:45:07 <_glx_> easy to fix
18:45:17 <_glx_> (I have it ready)
18:45:41 <peter1138[d]> Nice. My comment was kinda right then πŸ˜‰
18:46:40 <DorpsGek> [OpenTTD/actions] TrueBrain opened pull request #65: Upgrade: bump the dependencies of annotation-check and upgrade to node20 https://github.com/OpenTTD/actions/pull/65
18:47:36 <peter1138[d]> > No description provided.
18:47:46 <peter1138[d]> You did a me πŸ˜„
18:47:55 <truebrain> except it was no accident πŸ™‚
18:48:03 <truebrain> if you actually need a description for that PR, something is wrong πŸ˜›
18:48:12 <_glx_> yeah and he will most likely do a forced merge πŸ˜‰
18:48:20 <DorpsGek> [OpenTTD/actions] TrueBrain opened pull request #66: Add: [Dependabot] automatically update workflows https://github.com/OpenTTD/actions/pull/66
18:48:28 <truebrain> no, it fails πŸ˜›
18:48:51 <truebrain> I need the other one first, it seems
18:49:12 <truebrain> at least it still works with Node20
18:49:12 <truebrain> shocker
18:49:32 <DorpsGek> [OpenTTD/actions] TrueBrain merged pull request #66: Add: [Dependabot] automatically update workflows https://github.com/OpenTTD/actions/pull/66
18:51:29 <DorpsGek> [OpenTTD/OpenTTD] glx22 opened pull request #11879: Fix b38d3c2208: missing water regions invalidation when building locks https://github.com/OpenTTD/OpenTTD/pull/11879
18:53:02 <truebrain> ironically, Annotation Check doesn't notice its own annotation πŸ˜„
18:53:23 <_glx_> it doesn't have access to them
18:53:48 <DorpsGek> [OpenTTD/actions] TrueBrain updated pull request #65: Upgrade: switch annotation-check to node20 https://github.com/OpenTTD/actions/pull/65
18:54:00 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11879: Fix b38d3c2208: missing water regions invalidation when building locks https://github.com/OpenTTD/OpenTTD/pull/11879#pullrequestreview-1844427650
18:54:17 <truebrain> seems next month I will also be adding a ton of entries in dependabot file, to auto-bump workflows
18:54:22 <truebrain> should make life a bit easier
18:54:42 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #11879: Fix b38d3c2208: missing water regions invalidation when building locks https://github.com/OpenTTD/OpenTTD/pull/11879#issuecomment-1910800420
18:55:09 <talltyler> Ah, didn’t scroll up πŸ™‚
18:56:26 <DorpsGek> [OpenTTD/actions] TrueBrain merged pull request #65: Upgrade: switch annotation-check to node20 https://github.com/OpenTTD/actions/pull/65
18:56:44 <_glx_> but it was faster for me to fix it now πŸ™‚
18:56:58 <truebrain> owh, I have a lovely chicken/egg issue
18:57:02 <truebrain> need to spam a bit more
18:57:38 <_glx_> as long as you don't move an issue with many comments to discussion πŸ˜‰
18:57:39 <DorpsGek> [OpenTTD/actions] TrueBrain created new tag: v5.0.0 https://github.com/OpenTTD/actions/releases/tag/v5.0.0
18:57:46 <DorpsGek> [OpenTTD/actions] github-actions[bot] created new tag: v5 https://github.com/OpenTTD/actions/releases/tag/v5
18:57:52 <truebrain> as now I release v5, but we use v4 in our own actions
18:57:56 <truebrain> so next I need to update them to v5
18:57:59 <truebrain> and release a new v5
18:58:01 <truebrain> πŸ˜›
19:01:25 <DorpsGek> [OpenTTD/actions] TrueBrain created new tag: v5.1.0 https://github.com/OpenTTD/actions/releases/tag/v5.1.0
19:01:35 <truebrain> and only now we can do OpenTTD ... I think
19:03:59 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #11880: Add: [Dependabot] introduce Dependabot to keep our workflows up-to-date https://github.com/OpenTTD/OpenTTD/pull/11880
19:04:58 <truebrain> even filled in the template! πŸ˜›
19:05:21 <truebrain> I will need to force-squash this PR; but I will nicely wait for an approval on this repo πŸ˜›
19:05:49 <peter1138[d]> Hmm, I guess I should try loading fractional bitmap sprite too.
19:06:01 <peter1138[d]> _zephyris: do you happen to have anything drawn I can use? πŸ˜„
19:11:50 <DorpsGek> [OpenTTD/actions] TrueBrain opened pull request #70: Fix: tibdex/github-app-token changed syntax slightly in upgrade to v2 https://github.com/OpenTTD/actions/pull/70
19:13:20 <DorpsGek> [OpenTTD/actions] TrueBrain merged pull request #70: Fix: tibdex/github-app-token changed syntax slightly in upgrade to v2 https://github.com/OpenTTD/actions/pull/70
19:13:33 <DorpsGek> [OpenTTD/actions] TrueBrain created new tag: v5.1.1 https://github.com/OpenTTD/actions/releases/tag/v5.1.1
19:15:28 *** Wolf01 has joined #openttd
19:33:29 <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-1910853338
19:34:30 <xarick> what about a rewrite of BuildLock?
19:36:04 <peter1138[d]> Why?
19:39:22 <xarick> have it run DoClear on those tiles
19:41:59 <xarick> it's an outlier
19:42:50 <xarick> run DoClear, discard the price if water, something like that
19:51:16 <peter1138[d]> It needs to maintain the water type, that's why it does not clear the tile.
19:51:27 <peter1138[d]> IIRC
19:53:25 <xarick> gonna try something there
19:54:45 <_zephyris> https://cdn.discordapp.com/attachments/1008473233844097104/1200166890681683999/20px_toolbar_train.svg?ex=65c53184&is=65b2bc84&hm=b0a884eb1adb51f0e0b8039311622f83c60ac973f3fcbcaaef63adf79ccb9270&
19:54:45 <_zephyris> https://cdn.discordapp.com/attachments/1008473233844097104/1200166891155636274/20px_toolbar_train.png?ex=65c53184&is=65b2bc84&hm=22c7d61a079c82c919fb3d3d8988eeb863ff07e52665c5ac77f7cb96784c30dd&
19:54:45 <_zephyris> peter1138[d]: SVGs? I've got a couple of prototypes kicking around...
19:55:24 <peter1138[d]> Nice, but, but I want to test fractional bitmap too. I guess I can just render SVG and try that πŸ™‚
19:58:06 <_zephyris> Oh, I eee - yeah, nothing specific I'm afraid. I think the old OpenGFX+ Big GUI newgrf has 1.5x equivalent sprites?
19:58:37 <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-1910899099
20:09:19 <_glx_> oh no, my PR fails because stupid nodejs version enforcement πŸ™‚
20:09:27 <truebrain> so approve mine already
20:09:58 <truebrain> I forgot a smiley πŸ˜„
20:10:34 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #11880: Add: [Dependabot] introduce Dependabot to keep our workflows up-to-date https://github.com/OpenTTD/OpenTTD/pull/11880#pullrequestreview-1844597384
20:10:42 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #11880: Add: [Dependabot] introduce Dependabot to keep our workflows up-to-date https://github.com/OpenTTD/OpenTTD/pull/11880
20:10:42 <_glx_> hehe you PR failed too πŸ™‚
20:10:48 <_glx_> but it was expected
20:11:04 <truebrain> I Was prepared πŸ˜„
20:12:00 <_glx_> yeah it's a pain to force merge on openttd master
20:13:18 <truebrain> with good reason, ofc πŸ˜„
20:14:23 <_glx_> very good reasons
20:15:09 <DorpsGek> [OpenTTD/OpenTTD] dependabot[bot] opened pull request #11881: Bump the actions group with 9 updates https://github.com/OpenTTD/OpenTTD/pull/11881
20:15:31 <truebrain> now to test this on a fork to see if releases still work ..
20:15:41 <_glx_> don't unmute the bot on this repo πŸ™‚
20:16:47 <_glx_> it's annoying for other repos but I think it's ok for main one
20:17:00 <truebrain> yup; that is why I kept it like this πŸ˜„
20:17:58 <_glx_> hehe commit checker
20:18:04 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11881: Bump the actions group with 9 updates https://github.com/OpenTTD/OpenTTD/pull/11881
20:18:22 <_glx_> isn't there something to tell it the proper format ?
20:18:39 <truebrain> it will learn after the first, I believe
20:19:09 <truebrain> https://github.com/TrueBrain/OpenTTD/actions/runs/7660001907
20:19:09 <truebrain> Let's see if anything broke
20:19:59 <_glx_> legacy might be an issue
20:20:45 <truebrain> at least one mistake in CDN upload; but I will fix when the CI is done checking this πŸ™‚
20:21:14 <_glx_> yup legacy is an immediate fail
20:21:14 <truebrain> yeah, legacy barks hard
20:21:21 <_glx_> expected
20:21:29 <truebrain> well, I tried
20:21:32 <truebrain> but time to sunset it, I guess
20:21:50 <_glx_> will be hard to keep it
20:22:45 <_glx_> people needing a very old linux compatible will have to self build
20:26:17 <Rubidium> well... good luck ;)
20:26:17 <_glx_> guess you'll need to update the token thing here too
20:26:52 <truebrain> yeah, I have that ready; just not pushing it yet πŸ™‚
20:29:50 <xarick> glx, removelock also doesn't do clearsquare 😦
20:31:29 <xarick> oh it does, nevermind
20:31:32 <xarick> my bad
20:31:43 <xarick> MakeWaterKeepingClass
20:32:19 <DorpsGek> [OpenTTD/team] glx22 commented on issue #479: [pt_BR] Translator access request https://github.com/OpenTTD/team/issues/479
20:32:50 <DorpsGek> [OpenTTD/team] glx22 commented on issue #480: [pt_PT] Translator access request https://github.com/OpenTTD/team/issues/480
20:33:33 <DorpsGek> [OpenTTD/team] glx22 commented on issue #481: [es_ES] Translator access request https://github.com/OpenTTD/team/issues/481
20:34:00 <truebrain> owh, gcc-matcher is still an issue
20:34:25 <truebrain> you wanna make a fork out of that repo _glx_ and make it node20 instead of node16? πŸ˜„
20:34:32 <truebrain> or shall we add it to the actions repo?
20:34:35 <truebrain> might be better, I guess ...
20:35:08 <xarick> pt_PT and pt_BR by the same translator, hmm
20:37:07 <_glx_> gcc and msvc are both on node16
20:37:36 <_glx_> same owner
20:38:44 <xarick> nevermind, I better not say it
20:41:54 <_glx_> let's open an issue on the repos, seems to react quite fast
20:42:08 <truebrain> you do that? Cool, tnx πŸ™‚
20:42:15 <truebrain> I will prepare a fork in the meantime, but let's hope it is not needed
20:45:26 <_glx_> at least for 12 to 16 the new release happen on the same day the issue was open
20:46:35 <_glx_> https://github.com/ammaraskar/msvc-problem-matcher/issues/3#event-11602173290 πŸ™‚
20:47:28 <_glx_> msvc is already fixed
20:48:17 <truebrain> that was SCARY quick
20:48:41 <_glx_> it's nice when action author reacts fast
20:48:45 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200180481820471346/image.png?ex=65c53e2d&is=65b2c92d&hm=5cfe81ab7e744afb486ef8a67bd86de69f0a9c50bcb30f9943da1c9ee4b78817&
20:48:47 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:48:48 <_glx_> or just reacts
20:48:53 <peter1138[d]> I think that works...
20:49:20 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11881: Upgrade: [CI] bump the actions group with 9 updates https://github.com/OpenTTD/OpenTTD/pull/11881
20:49:21 <_glx_> and gcc is fixed too
20:49:28 <truebrain> good; so now this should be green πŸ™‚
20:49:38 <truebrain> we remove legacy afterwards
20:52:19 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200181379267305502/image.png?ex=65c53f03&is=65b2ca03&hm=39af7b000624e6d39d9890170d984addef219f881eeea4ccab87856a98611770&
20:52:19 <peter1138[d]> Nice, even vanilla works, it just ignores the unknown zoom level.
20:54:35 <peter1138[d]> Hmm, so I guess better source zoom level choice would make sense.
20:57:00 <peter1138[d]> Also a bit inefficient with loading, but maybe not worth caring. All provided zoom levels are loaded, and then it either picks the matching sprite, or scales the highest zoom sprite to the desired zoom.
20:57:24 <peter1138[d]> "Probably fine" but perhaps scaling 1x to 2x is better than scaling 2.5x to 2x.
20:59:15 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200183123191808171/image.png?ex=65c540a2&is=65b2cba2&hm=bc28af88307cc862b453be9b4fdf971415b84ef22a6a2708320492b2bacc2874&
20:59:15 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200183123422478496/image.png?ex=65c540a2&is=65b2cba2&hm=8802f705eb3d8ec1dbb8d2d511c78fc1034a91b26ac15068494390e3919ae06a&
20:59:15 <peter1138[d]> Although...
21:03:35 <locosage> it's a very interesting question what zoom lvl is better to scale
21:03:51 <locosage> I'm afraid in general it depends on how sprites are drawn
21:04:30 <locosage> there is also stuff like 1.5x might be preferable for 3x or vice versa
21:04:34 <locosage> instead of say 2x
21:05:27 <peter1138[d]> Yeah, and also scaling down can be preferable to scaling up.
21:06:17 <locosage> there is also difference between svg an raster
21:06:31 <peter1138[d]> Avoiding-the-plague-option: configuration option to disable fractional scaling...
21:07:28 <locosage> well, you definitely need it for old raster stuff
21:07:38 <peter1138[d]> Hmm, also viewport sprites need care. I've only dealt with interface sprites really.
21:08:26 <peter1138[d]> Sure, there are people who complain about the sprites not being fractional, and then those who will complain about it :p
21:08:37 <locosage> veiwport scaling is already weird even without fractional
21:11:14 <peter1138[d]> I guess the option there is "don't provide fractional sprites for them"
21:11:55 <peter1138[d]> Unless I magically implement fractional viewport scaling too πŸ˜„
21:12:58 <locosage> what if viewport sprite is used in the gui?
21:13:40 <locosage> I mean station previews etc
21:14:18 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain approved pull request #11881: Upgrade: [CI] bump the actions group with 9 updates https://github.com/OpenTTD/OpenTTD/pull/11881#pullrequestreview-1844691447
21:22:37 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #11881: Upgrade: [CI] bump the actions group with 9 updates https://github.com/OpenTTD/OpenTTD/pull/11881
21:24:49 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11874: Change: rebrand Cheats as Sandbox Options https://github.com/OpenTTD/OpenTTD/pull/11874
21:30:04 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #11882: Remove: [CI] Linux Legacy support https://github.com/OpenTTD/OpenTTD/pull/11882
21:30:45 <truebrain> Build running on https://github.com/TrueBrain/OpenTTD/actions/runs/7660691214, let's see if that now works. Will take an hour.
21:33:00 <peter1138[d]> Hmm, I guess basing NewGRF-provided fractional scale as 1.0 == ZOOM_NORMAL makes most sense.
21:34:43 <peter1138[d]> Most people still consider ZOOM_LVL_OUT_4X to be normal 1x zoom. Such terminology.
21:35:28 <frosch123> i would expect 1.0 as the original TTD zoom level
21:35:59 <frosch123> the current 4x zoom-in is arbitrary, future screensizes may add more zoom levels
21:36:01 <peter1138[d]> Yes, that is what I meant. grf-py (and I think nml?) uses ZOOM_NORMAL for that.
21:36:31 <peter1138[d]> frosch123: Yup, this is precisely why I decided this πŸ™‚
21:36:41 <frosch123> ok πŸ™‚ so just ottd's ZOOM_LVL_NORMAL is confusing
21:36:49 <peter1138[d]> Interface already goes up to 5x.
21:36:55 <peter1138[d]> Because "lol"
21:38:07 <peter1138[d]> It is confusing, and I think we did originally have it set up so that NORMAL was original 1x. Hazy memory.
21:38:30 <peter1138[d]> And of the relevant settings refer to them as 1x 2x 4x zoom in levels.
21:44:57 <peter1138[d]> Hm, now I should put in sprite 731 as an svg.
21:45:08 <DorpsGek> [OpenTTD/OpenTTD] glx22 updated pull request #11879: Fix b38d3c2208: missing water regions invalidation when building locks https://github.com/OpenTTD/OpenTTD/pull/11879
21:52:19 <locosage> peter1138[d]: yeah, I even switched grf-py from ottd naming because it was confusing af
21:58:02 <_zephyris> peter1138[d]: It's a slightly 'messy' file - I'm interested how the svg rasteriser handles it. It's got gradient fills and strokes, transparent gradients, and linked/duplicate groups.
21:59:16 <peter1138[d]> Yes I noticed πŸ™‚
22:00:01 <_zephyris> peter1138[d]: Looks really good TBH. I guess the optimal behaviour would be to downscale from the next higher integer multiple zoom, or the next higher level if not available. ie. 2x, if missing, from 4x. 1.5x, if missing, from 3x. 1.5x, if missing 3x missing, from 2x, etc.
22:00:10 <peter1138[d]> Okay,well...
22:00:44 <peter1138[d]> Remember I said it didn't support much?
22:01:18 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200198739093102592/image.png?ex=65c54f2e&is=65b2da2e&hm=106bb92a23e2f87d8af025f27ec15c67a447cf480585fb2760234aafe2da0666&
22:01:18 <peter1138[d]> 5x interface scale.
22:01:38 <peter1138[d]> It is a bit wonky on the wheels.
22:01:51 <_zephyris> Yeah, that's the linked duplicates
22:02:05 <_zephyris> https://cdn.discordapp.com/attachments/1008473233844097104/1200198936233791518/20px_toolbar_train.plain.svg?ex=65c54f5d&is=65b2da5d&hm=4bfe4d2d3236498fcd2f92b945d0160ea7845c0a834a9a4a368da171194cac4f&
22:02:05 <_zephyris> How does inkscapes 'plain svg' fare?
22:02:33 <_zephyris> Practically, if you can get a useful output from inkscape then it's probably useable for artists.
22:03:31 <peter1138[d]> It's the same. Hmm.
22:03:42 <_zephyris> Annoying
22:03:54 <_zephyris> But, telling people not to use linked duplicates is easy πŸ˜‰
22:04:57 <locosage> nml/grf-py/whatever could in theory solve that
22:05:39 <peter1138[d]> Your viewbBox is 0 0 20 20.000001 πŸ™‚
22:07:00 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200200174555910255/image.png?ex=65c55084&is=65b2db84&hm=e9255c44d8d29d140c0053a463a00ff9ec57bd19046168cd92ddc34cbf00725e&
22:07:00 <peter1138[d]> My minifier makes a mess of it though.
22:07:36 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200200323709550642/image.png?ex=65c550a7&is=65b2dba7&hm=96fb66a54849f88a94d8cf7aac0ffc63f4bab3120bf916ab68cdd9d753005bfa&
22:07:36 <peter1138[d]> Of course, that's kind of expected...
22:09:27 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200200790116151418/image.png?ex=65c55117&is=65b2dc17&hm=566f24adaf9e537569c02a8855ca1fc98bd302e73d5254807a11ff81b5df45a2&
22:09:27 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200200790338453564/image.png?ex=65c55117&is=65b2dc17&hm=c0d4c5d3bed96de74b9452a9f923f13e64d499efee4e82138b40a81e1f231a2e&
22:09:27 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200200790556549251/image.png?ex=65c55117&is=65b2dc17&hm=2d6f1cbb73a746658e9f3856a76825355e2075ea5e70606f8613b0cc5ae1c6fc&
22:09:27 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200200790757879928/image.png?ex=65c55117&is=65b2dc17&hm=64b69f2c1278a822205257cb58a6f88f742c161b453ae7c318b229d5deedaaaf&
22:09:42 <peter1138[d]> As for realistic sizes... these at 1x, 1.5x, 2x and 2.5x
22:09:53 <peter1138[d]> Damn, need to click to see actual size πŸ˜„
22:10:26 <peter1138[d]> Hmm, I should try mixing it.
22:12:21 <peter1138[d]> Ah, AlternateSprites does not understand SVGSprite yet.
22:13:04 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #11882: Remove: [CI] Linux Legacy support https://github.com/OpenTTD/OpenTTD/pull/11882#pullrequestreview-1844771443
22:14:45 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:18:30 <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #11879: Fix b38d3c2208: missing water regions invalidation when building locks https://github.com/OpenTTD/OpenTTD/pull/11879
22:23:25 <xarick> yeh... I guess
22:23:39 <xarick> was trying to come up with an alternative solution
22:24:18 <peter1138[d]> It would definitely not have been more concise that two Invalidate calls.
22:24:46 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #11882: Remove: [CI] Linux Legacy support https://github.com/OpenTTD/OpenTTD/pull/11882
22:25:10 <truebrain> "What did you do all day?" - "Fix build systems"
22:25:11 <truebrain> great
22:25:24 <truebrain> tnx _glx_ for the assist etc πŸ™‚
22:25:30 <_zephyris> peter1138[d]: Hah. A perfect example of an imperfect input svg.
22:28:09 <xarick> how do I quote code in discord
22:28:39 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1200205621807566878/message.txt?ex=65c55596&is=65b2e096&hm=373d52d640dc717968362a6aaf5af4676619ee24060ace05739977c3e034486a&
22:28:39 <xarick> anyways, I was trying something like this
22:29:14 <xarick> and similar to upper
22:29:31 <tabytac> use 3 ` around the text ```like this```
22:30:08 <xarick> ```test```
22:30:11 <xarick> ah, nice
22:30:56 <_glx_> more complex than needed πŸ™‚
22:31:39 <xarick> alright, time to test the pathfinder again
22:32:17 <xarick> I should perhaps correct that assert I mentioned a few hours earlier
22:32:26 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:32:43 <andythenorth> such tax payment time
22:32:47 <andythenorth> adultng
22:34:27 *** goddess_ishtar has joined #openttd
22:34:27 <goddess_ishtar> are there any resources for developing patches, or is it just "crack open the OpenTTD source and go to town"?
22:34:55 <_glx_> basically get the source, do your changes πŸ™‚
22:35:56 <_glx_> and follow <https://wiki.openttd.org/en/Development/Coding%20style>
22:36:21 <xarick> TrackdirBits
22:36:46 <goddess_ishtar> given that I don't really know C++ this is going to be *interesting*
22:37:23 <xarick> IsValidTrackdirBits does not exist! need help!
22:37:48 <dwfreed> goddess_ishtar: that's okay, nobody knows C++
22:38:11 <truebrain> goddess_ishtar: there are also livestreams and youtube movies of people coding (even for OpenTTD). Not sure how helpful that is πŸ˜„
22:40:19 <peter1138[d]> Oh of course, the svg of 731 is "32bpp" and the 1x bitmap of 731 is 8bpp. We don't bother loading 8bpp if 32bpp are present.
22:44:06 <goddess_ishtar> I want to change things regarding town generation and that isn't exposed to NewGRFs so that doesn't leave many other options
22:44:44 <peter1138[d]> Dive in πŸ™‚
22:46:02 <peter1138[d]> Hmm, this svg grf compresses from 63KB down to 12KB. Shame we don't support runtime compressed access.
22:46:12 <goddess_ishtar> is there any recommended toolchain or is it just "gcc and text editor of choice"?
22:52:59 <xarick> ``` assert((trackdirs & ~TRACKDIR_BIT_MASK) == TRACKDIR_BIT_NONE);
22:52:59 <xarick> assert(trackdirs != TRACKDIR_BIT_NONE);```
22:52:59 <xarick> Is there already a way to do what this does?
22:53:27 <xarick> a nice function
22:54:23 <talltyler> goddess_ishtar: If you’re on Windows, Visual Studio is about as plug-and-play as it gets, in my experience anyway
22:54:38 <goddess_ishtar> on Linux
22:54:48 <talltyler> No idea then πŸ™‚
22:54:53 <_jgr_> goddess_ishtar: Sticking with the editor you're most comfortable with is probably sensible
22:55:03 <peter1138[d]> cmake, clang and vs code for me.
22:55:08 <goddess_ishtar> or rather, laptop is Windows desktop is Linux
22:55:25 <peter1138[d]> A little bit of heresy, but I do not miss the days when I used to search through the code with vim.
22:55:30 <goddess_ishtar> and I'm mostly a Python dev so I'm familiar with VS Code, not any actual IDE
22:55:45 <peter1138[d]> It is basically an IDE.
22:55:59 <peter1138[d]> Just with plugins to bolt it all together.
22:56:13 <goddess_ishtar> most IDEs I've used were horrifically bloated and slow
22:57:09 <_jgr_> You can work on OpenTTD with or without an IDE
22:57:25 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200212862073847879/image.png?ex=65c55c55&is=65b2e755&hm=b801e1ebc78a554382705524858422237b3bd1247499e7428d785710ce9934d0&
22:57:25 <peter1138[d]> Oh what have I done...
22:57:26 <_jgr_> I wouldn't worry too much up front about the tooling
22:57:35 <truebrain> peter1138[d]: very large πŸ˜›
22:57:37 <_glx_> and we test many compilers
22:58:05 <_jgr_> I use a fairly simple editor
22:58:22 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
22:58:25 <goddess_ishtar> _jgr_: I've vaguely heard that C++ in general is painful without an IDE, although now that I think of it nobody's ever said *why*
22:58:39 <goddess_ishtar> so it may just be false
22:58:54 <truebrain> not having a decent file-overview can be painful; but otherwise ... it is just text πŸ˜›
22:58:56 <peter1138[d]> If you're fmailiar with VS Code, just use that.
22:59:01 <truebrain> an IDE doesn't help -that- much πŸ˜›
22:59:10 <truebrain> but yeah, I use VSCode, all day, every day, for C++; it is fine
22:59:32 <_jgr_> So long as your editor has some form of grep or find in files that is enough really
23:00:45 <peter1138[d]> I think we need to add scrollbars everywhere, my 1440p monitor is not enough for 8x interface scale!
23:00:58 <truebrain> and you can always ask for any help with C++; lately this channel already feels like we are training an LLM how to code, so .. you can't do worse πŸ˜„
23:01:01 <xarick> `assert(IsValidTrackdir(FindFirstTrackdir(trackdirs)));`this should do it
23:02:25 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1200214118553108490/image.png?ex=65c55d80&is=65b2e880&hm=2031cb1ddbdebb521d00e949bf0753d384bea4283037bae2b71065414d4f7603&
23:02:25 <peter1138[d]> OH GOD
23:02:46 <xarick> wow, great definition
23:02:47 <truebrain> that face could be generated πŸ˜›
23:03:48 <goddess_ishtar> peter1138[d]: oh no
23:05:52 <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:06:00 <xarick> fixed the assert
23:06:40 <peter1138[d]> locosage: in python, how can I convert 1.5 to the nearest integer multiplier/divisor pair?
23:06:52 <peter1138[d]> e.g. * 3 / 2
23:06:52 <xarick> it should catch TRACKDIR_BIT_NONE from now on
23:07:10 <peter1138[d]> There's probably a simple algorithm but I'm lazy πŸ˜„
23:07:21 <truebrain> haha
23:07:26 <locosage> nearest rational isn't very defined...
23:08:00 <peter1138[d]> https://docs.python.org/3/library/decimal.html#decimal.Decimal.as_integer_ratio
23:08:09 <locosage> but if all your fractions are of say 100 you can start with x / 100 and divide both by gcd
23:08:10 <peter1138[d]> Oh, 5 seconds search...
23:08:24 <truebrain> you so lazy πŸ˜„
23:08:54 <locosage> lol, yeah, or import antigravity xD
23:10:16 <peter1138[d]> Hmm, I guess I could just go with "fractions" of 100, e.g. percentages.
23:11:13 <locosage> yeah, probably better for humans anyway
23:11:33 <locosage> it's not like 12/25 or smth is very readable
23:11:56 <peter1138[d]> That's why I want to convert a decimal to a fraction.
23:13:02 <peter1138[d]> Currently I use 1 byte as multiplier, 1 byte as divisor. That way I don't store floats, and can still have precise fractions.
23:14:01 <locosage> I'd just go with fractions of 100 in one int
23:16:58 <locosage> or even of 8 to limit craziness
23:17:23 <locosage> 40 to appease both base 10 fans and base 2 xD
23:19:49 *** Tirili has joined #openttd
23:19:53 *** Tirili has quit IRC (Remote host closed the connection)
23:19:57 <locosage> ui only snaps to 1/4 fractions of zoom
23:20:15 <locosage> almost feel like other values shouldn't even be allowed
23:20:17 <peter1138[d]> ...
23:20:19 <peter1138[d]> Press ctrl.
23:20:28 <locosage> keyword snaps
23:20:39 <peter1138[d]> keyword only
23:31:56 *** Wormnest has joined #openttd
23:42:01 *** Ttech has quit IRC (Quit: Este Γ© o fim.)
23:56:18 *** Ttech has joined #openttd