IRC logs for #openttd on OFTC at 2025-11-20
⏴ go to previous day
00:00:24 *** greeter has joined #openttd
00:39:22 *** jinks has quit IRC (Remote host closed the connection)
01:39:25 *** reldred has joined #openttd
01:39:25 <reldred> _jgr_: been having a gander at 2talltyler's swamps, though it looks like landscape.cpp has diverged quite a bit from where it is in jgrpp, they've totally gotten rid of aystar by the looks of it. I think for the purpose of swamps though the main difference is the elipsoid shaped lakes code you added, most of my changes look relatively straight forward to retrofit. If I can hold attention span long
01:39:25 <reldred> enough when I get back to my desk I'll do more deeper comparisons.
01:40:50 <reldred> trying to work out if the better approach is to graft swamps onto the jgrpp code or replace the jgrpp code with the current openttd code and then port the elipsoid lakes and my other changes over to it.
02:38:53 *** Wormnest has quit IRC (Quit: Leaving)
02:55:04 <talltyler> Feel free PR ellipsoid lakes to vanilla if you’re going that route 🙂
02:58:06 <reldred> Yeah I’ll see what way shakes out easier
03:13:48 *** WormnestAndroid has quit IRC (Remote host closed the connection)
03:14:17 *** WormnestAndroid has joined #openttd
03:51:59 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
04:16:46 *** Zathras_1 has joined #openttd
04:16:48 *** Zathras has joined #openttd
04:20:20 *** Zathras_4 has quit IRC (Ping timeout: 480 seconds)
04:20:20 *** Zathras_11 has quit IRC (Ping timeout: 480 seconds)
06:41:01 *** tokai|noir has joined #openttd
06:41:01 *** ChanServ sets mode: +v tokai|noir
06:48:20 *** tokai has quit IRC (Ping timeout: 480 seconds)
07:26:56 *** Flygon has quit IRC (Remote host closed the connection)
07:57:37 <reldred> Nope I think I'm throwing in the towel on this one. Unless I try adding the YAPF rivers code *without* throwing out Aystar like Kuhnovic did in 14606. Aystar is still used in a few areas so I can't just cherry pick that whole PR
08:25:12 <peter1138> Hmm, being restricted to C++11 is awkward :s
08:25:55 <reldred> Yeap, I'm toast, this is WAAAAAY beyond my abilities lmao
08:27:01 <_jgr_> reldred: I will get to that change in the coming months, but it's likely to involve leaving out the deleting AyStar bit
08:27:45 <reldred> Yeah that's what I tried, just converting it to YAPF so I can add the rest without actually deleting the AyStar stuff but then I ran into differences between YAPF
08:28:21 <reldred> first step was at least getting the river code yapf'ified so I could then add the swamps code over the top but the hole I'm digging keeps getting bigger.
09:08:33 <xarick> SamuXarick's avatar image
09:08:33 <xarick> Approved these changes with read-only permissions
09:09:04 <xarick> I thought I was write only
09:11:36 *** kuhnovic has joined #openttd
09:11:36 <kuhnovic> reldred: Yup, sorry, I killed AyStar
09:12:28 <kuhnovic> Shit, now I hear Video Killed The Radio Star in my head...
09:15:58 <peter1138> > how can we get good at C++ if we keep changing what is considered "best practices" on a regular basis?
09:16:19 <peter1138> Sorry other developers, that's a weird argument for sticking with C++11.
09:16:49 <LordAro> i can kinda see where they're coming from
09:17:04 <LordAro> but only from the perspective of e.g. switching js frameworks every few months
09:17:42 *** Zathras_1 has quit IRC (Quit: Connection reset by beer!)
09:29:07 <kuhnovic> C++ has progressed a lot with the introduction of C++ 11 and beyond, but man it has become a minefield
09:30:02 <funderscore> rewrite it in assembly
09:34:20 <reldred> kuhnovic: hahahah, yeah, I thought initially merging swamps was gonna be easy but I hadn't realised how much landscape.cpp has diverged. That bitch got HANDS.
09:34:36 <reldred> so now I get back in my box
09:34:56 <kuhnovic> But YAPF is sooooo easy to work with 😛
09:35:20 <reldred> Yeah, beyond my ken to try and overhaul the whole thing though
09:35:50 <reldred> I tried, but then I started getting all sorts of other compile errors
09:36:25 <reldred> and now I'm going for a walk to the corner shop to get ~~cheap illegal tax free tobacco~~an icecream
09:40:21 <kuhnovic> A little mistake usually ends up in pages worth of compile errors when working with YAPF. It's a pain.
09:40:32 <kuhnovic> So you deserve that "icecream"
09:46:41 <reldred> yeah no I got a mango weiss bar, but it is the sort of dodgy 24hr corner shop selling illegal cigs and vapes that I'm sure is going to get firebombed one day
09:48:52 <kuhnovic> Where I live (NL) we have legal weed shops, but they still get firebombed. I guess it just draws a certain crowd.
09:49:44 <kuhnovic> It probably has something to do with the fact that it's legal to run such a weed shop, but growing weed is not.
09:53:28 <reldred> Tobacco is taxed insanely highly in AU, so theres a lot of illegal tax free tobacco floating around now, so this shop will either get raided by the cops at some point or firebombed by competing organised crime elements. The usual.
10:19:16 <peter1138> LordAro, actually that was another of their points.
10:19:54 <peter1138> They would rather go learn Rust than keep learning new parts of the C++ standard.
10:42:18 <peter1138> Hmm, 300W power amplifier... with a 240W power supply. Ok.
11:00:19 <peter1138> Anyway, "How can you get good at C++ if you keep writing it as if it's C" is what I'm thinking but not going to stoke a fire :)
11:00:32 <peter1138> (And that's also an issue we've had in the past.)
11:53:14 <kuhnovic> peter1138: Big fat power supply capacitors and "10% extra is probably still within spec"
11:53:58 <kuhnovic> And of course the time you fry it is when you're playing a live gig
11:54:48 <peter1138> Nah, it's a hi-fi kit, not performance stuff.
11:55:20 <kuhnovic> Ah good. Then you'll just blow it up at a house party 😛
11:56:35 <Borg> hello my C++ fanatics! [;
11:57:00 <Borg> anyway.. what would be the best method to store multiple values in std::vector? my first tough as C dude.. is to use struct
11:57:06 <Borg> is it fine? or I should use sth more fancy?
11:57:24 <kuhnovic> I once had a tube amp blow up on stage between songs. I was fiddling with the volume knob on my guitar, checking my effect pedals, then I turned around and saw a column of thick black smoke coming out of the amp. Woops.
11:57:54 <_glx_> Depending on the values, a tuple could work
11:57:55 <LordAro> Borg: std::pair/std::tuple are options, but if it's anything vaguely structured...
11:58:01 <kuhnovic> "It depends", but struct is probably a good start if you want named stuff
11:58:50 <Borg> thx.. yeah I see there is std::tuple.. but as C dude.. struct is more preffered..
11:59:06 <Borg> so I will go struct.. only 2 values.. but well.. why not :>
11:59:33 <peter1138> std::pair is convenient if it's just 2 values and is similar to a key/value type thing.
11:59:57 <Borg> nope.. its just 2 values tied to index..
12:00:06 <Borg> I could do 2 vectors, but its lame
12:00:22 <kuhnovic> I personally prefer structs because you can name things, which is especially helpful when the types it contains are the same. And generally it makes for easier-to-understand code. But it depends on the situation.
12:01:06 <peter1138> Yes, struct is fine.
12:01:28 <kuhnovic> Borg: And you run the risk of them going out of sync. If you always have the same number of elements in each vector, save yourself the hassle and use a struct / pair / tuple. Might also have performance implications but that's often not relevant.
12:02:11 <Borg> kuhnovic: hmm.. good point.. thx
12:02:21 <peter1138> If you have millions of items, the size difference due to alignment might matter.
12:02:37 <peter1138> But otherwise that's premature optimisation.
12:14:47 <Borg> done ;) went quick.. lets compile and test
13:22:28 <Borg> took longer.. because I had to adjust GUI as well
13:29:15 <xarick> plz merge these in order: 14753, 14805 and maybe 14772
13:30:01 <xarick> or just skip 14772, it's kind of doing too many tests
14:05:15 <_jgr_> More regeession tests for scriptlist seems like a good thing to me
14:23:12 *** rito12_51026 has joined #openttd
14:23:12 <rito12_51026> Now it will be HEAD~4
14:31:53 <Borg> HAHA :D YAPF made me laught.. but in good way
14:32:09 <Borg> train was blocked from all directions except one w/ long detour.. and it took it
14:32:48 <xarick> IsHouseTile doesn't exist?
14:33:22 <xarick> there's local authority or something
14:35:54 <xarick> IsWithinTownInfluence, not quite checking if it's a house though
14:40:56 <xarick> i wished there was a get TownTileArea
14:41:24 <xarick> town coverage or something
14:42:49 <xarick> this thing but for AIs
16:28:49 *** Flygon has quit IRC (Remote host closed the connection)
17:13:18 <xarick> I think 13374 is no longer useful
17:15:45 <rito12_51026> Hi, I have question regarding coding style.
17:15:45 <rito12_51026> /** Rate limit how fast scrolling happens. */
17:15:45 <rito12_51026> const IntervalTimer<TimerWindow> scroll_interval = {std::chrono::milliseconds(30), [this](auto) {
17:15:45 <rito12_51026> if (this->scrolling == 0) return;
17:15:46 <rito12_51026> if (this->vscroll->UpdatePosition(this->scrolling)) this->SetDirty();
17:15:46 <rito12_51026> this->scrolling = 0;
17:15:48 <rito12_51026> Do I put this in the header file inside the class definition or somehow like the other functions in the cpp file?
17:17:54 <LordAro> cpp file unless you have good reason
17:20:19 <LordAro> "copy what's already been done" unless you genuinely have no other precendent :p
17:21:29 *** Wormnest has joined #openttd
17:24:12 <peter1138> `ScriptTile::IsHouseTile` ... I wonder if there's some reason this sort of thing hasn't existed since... forever.
17:35:44 <_glx_> most likely nobody asked for it
17:36:48 <_glx_> happens when too many downloads at the same time
17:37:31 <_glx_> not a good idea to update all PRs at the same time
17:37:44 <xarick> it's a me problem then
17:37:57 <xarick> rebasing otu of date prs
17:38:46 <_glx_> try to wait for one PR to finish CI run before pushing another one
17:47:18 *** Zathras_4 has joined #openttd
17:49:04 <xarick> CodeQL builds too slow, even with 4 cores
17:51:25 <Rubidium> xarick: what about working on improving its performance?
17:51:54 <peter1138> Is it slower with a 4096x4096 map?
17:56:03 <xarick> how do I improve CodeQL? give it more cores?
18:04:05 <xarick> actual analysis is 13 minutes
18:22:26 <peter1138> CodeQL is not something I have ever tried to run locally.
18:30:25 <mmtunligit> groups now persist across save/load cycles! (though booting now causes a crash)
18:30:34 *** belajalilija has joined #openttd
18:30:34 <belajalilija> what's the max length for sound files, like for ambient sounds or vehicle sfx?
18:32:33 <belajalilija> so i could have a train start and it play the same sound file for 5 minutes?
18:32:42 <peter1138> That would be shit.
18:32:50 <belajalilija> im not asking how it would be
18:32:54 <belajalilija> im asking if it is possible
18:33:14 <peter1138> No idea, none of the existing sounds go on for that long.
18:33:45 <mmtunligit> yeah this also seems pretty trivial to test experimentally
18:34:13 <mmtunligit> developing all new forms of MP trolling?
18:34:24 <belajalilija> probably could test it with something but i've forgotten the code for something but im in the mood for picking sounds out of stuff
18:34:32 <peter1138> The sample position is stored as a 32 bit integer, so given 44100 kHz audio that limits it to about 27 hours or something?
18:34:45 <belajalilija> nah, i just want custom train sounds and was wondering if there was some limit like 5 seconds per file or whatever
18:35:16 <peter1138> Short and sweet is better tbh, there's a limit to the number of concurrent sounds.
18:35:43 <belajalilija> but yeah, i wanna keep them pretty short
18:35:59 <belajalilija> some trains just have very cool starting sounds
18:36:12 <peter1138> Main issue is seamless looping is not really possible.
18:36:47 <belajalilija> i'm not too fussed about general running sounds, more just starting sounds and horns
18:37:21 <belajalilija> if i do running sounds i'd make them on the quieter side, most sets that have running sounds have them be pretty loud and harsh by default compared to the rest of the game
18:39:51 <peter1138> Ogg Opus also allows you to stuff in longer sounds without increasing file size too much.
18:41:10 <belajalilija> ahh, the grf can take formats other than .wav? i didnt know, neat
18:41:36 <peter1138> And it must be mono.
18:41:56 <peter1138> It's worth using opus as it's about 10x smaller.
18:46:28 <xarick> where is nproc decided?
18:49:07 <xarick> the "runner" has no more than 4 cores?
18:57:52 *** locosage has joined #openttd
18:57:52 <locosage> is opus support in 14.1 or only 15.0?
18:58:11 <_glx_> 15.0 for sure, need to check 14
18:59:42 <peter1138> That'll be released one day.
19:00:56 <locosage> yeah, but supporting beta in grf-py is a bit tricky
20:12:36 <xarick> what kind of quad core takes 24 minutes to build openttd 🙁
20:16:10 <xarick> Core i3 of old with 2 cores, 4 threads?
20:32:25 <peter1138> I see Qualcomm are busy fucking Arduino.
20:36:33 <xarick> windows can compress with Zstandard
20:38:10 *** kuka_lie has joined #openttd
20:42:14 <xarick> when I'm bored, I do stuff like this
20:49:18 *** Borg has quit IRC (Quit: leaving)
20:54:19 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
20:58:07 *** kuka_lie has quit IRC (Quit: Lost terminal)
21:00:28 <xarick> `ClosestDepot Aircraft::FindClosestDepot([[maybe_unused]] bool may_reverse)` or
21:00:28 <xarick> `ClosestDepot Aircraft::FindClosestDepot(bool)`
21:00:41 <xarick> what does the code style says
21:02:50 <xarick> this looks cursed coding
21:05:21 <peter1138> For the base virtual method, `[[maybe_unused]]`. That describes the 'interface' for the implementations.
21:06:19 <peter1138> You need the parameter name to properly document the virtual function too.
21:08:05 <belajalilija> there's a major issues with signals being placed too close together on diagonal tracks
21:08:45 <peter1138> Game is literally unplayable.
21:09:32 <belajalilija> it's set to 10 for the spacing, works fine on normal track
21:09:54 <belajalilija> vanilla version 14,1
21:13:58 <talltyler> There’s a setting to make those line up, and an issue arguing about it
21:19:26 *** davidxn has joined #openttd
21:19:26 <davidxn> Just something I've been thinking about - any demand for waiting cargo visible on the station signs like this? With non-cargo-aware station tiles it's hard to tell what's deserted and what's insanely busy
21:21:34 *** kaji_kaede has joined #openttd
21:21:34 <kaji_kaede> Feel a bit iffy about it being on one side, but that's just a visual complaint. Makes a lot of sense as a UI option.
21:23:02 <Borg> so... anyone here is using LinkGraph Overlay when not using CargoDist?
21:23:07 <davidxn> Actually maybe this is already possible with game scripts? I've been meaning to look at those, I've only meddled with the source code directly
21:23:08 <Borg> im wonder if its worth to post Patches...
21:26:05 <kaji_kaede> davidxn: Don't think so. As far as I know GameScripts have very little capability to create UI elements.
21:28:52 <peter1138> davidxn, not possible with GS
21:32:23 <locosage> stereo wav sound effects in newgrfs don't seem to work in master, is that a bug or a feature?
21:33:03 <locosage> well, idk about stereo part but at least they load and play
21:36:26 <xarick> unsure what to do with 13067
21:38:43 <belajalilija> talltyler: i mean, it seems a new problem, i'm not sure i understood why a changed needed to occur
21:39:35 <belajalilija> it came up in the help channel with someone wondering why their signal placement wasnt working right which to any normal person would seem like a user error
21:39:53 <belajalilija> but i tested myself in vanilla and yeah, it's wierd
21:46:29 <mmtunligit> it seems like youd want it to be a setting, if i have a cargo transfer staition with liek 10 different cargoes thatd be extremely unweildy
21:47:46 <locosage> belajalilija: tldr; signal placer was changed to use distance for train movement, not train length
21:56:43 <xarick> erm.. 2061 to 2084 basically just means BuildSignal(current[1], current[0], AIRail.SIGNALTYPE_PBS_ONEWAY)
21:57:34 <xarick> and resets signal_interval = 0
21:59:21 <locosage> I elaborated a bit in the help channel
21:59:32 <reldred> kinda defeats the purpose of it
21:59:54 <reldred> Oh well, I don’t use it anyway, I just slap all my signals down one by one in a rather crude fashion
22:00:26 <locosage> it depends on whether you purpose is managing moving trains on stopped ones 😜
22:03:06 <xarick> what will happen when i bring my windows openttd.cfg to wsl openttd build
22:03:08 <reldred> OK I’ve reviewed the evidence, shit is cooked either way.
22:03:30 <reldred> xarick: Your PC will melt into a pile of slag
22:05:15 <xarick> where is openttd.cfg in linux?
22:05:34 <xarick> i dont know this os folder structure
22:06:39 <Borg> xarick: it depends if you build it w/ --personal-folder or not :P
22:07:53 <xarick> wow, there's a special place for .cfg files?
22:09:01 <Borg> it depends.. it might be ~/.openttd/ for example..
22:15:20 *** Borg has quit IRC (Quit: leaving)
22:51:11 <reldred> Hmm, OCI container support in proxmox looks interesting, dunno why I wouldn't just deploy a swarm cluster as vm's though 🤔
23:11:08 <peter1138> Can we just ban him from flooding the CI?
23:11:43 <xarick> some weren't rebased for a year
23:30:58 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
23:31:32 *** WormnestAndroid has joined #openttd
23:50:17 *** jfkuayue has joined #openttd
continue to next day ⏵