IRC logs for #openttd on OFTC at 2023-12-09
00:00:08 <xarick> but somehow it did
00:12:28 <xarick> how many tiles are in a 6 * 6 perimeter?
00:12:47 <xarick> 6 + 5 + 5 + 5 = 21
00:12:55 <xarick> somehow it only iterated 16
00:13:35 <xarick> oh, 6 + 5 + 5 + 4 my bad
00:19:50 <talltyler> Regardless of what you find though, you need to be able to compare before and after your change to know if it fixes the problem.
00:21:32 <talltyler> You should start by trying to reproduce the problem, testing your hypotheses by building airports and founding towns or rotating airports or whatever you want, instead of hypothesizing and then changing code — without any ability to test if your hypothesis even fixes the bug.
00:22:48 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
00:24:16 <talltyler> Come up with consistent, reproducible steps, like a savegame with “place airport here” or “place town here” signs or whatever causes the bug. You want to avoid any ambiguity in reproducing the bug. Then we can actually have a productive conversation about why those steps cause the bug, and how to fix it.
00:24:29 <talltyler> Anything else is just wasting your own time. 🙂
00:27:57 <peter1138> Yes, the iterator is wrong.
00:28:46 <peter1138> Or rather the perimeter is wrong.
00:28:55 <peter1138> It assumes the first tile is the top corner.
00:29:20 <peter1138> But with an airport spec iterator, it could may not be.
00:29:29 <peter1138> Words.
00:30:11 <LordAro> it may could well have had hasn't not been
00:33:03 <peter1138> Okay, fixed it.
00:33:58 <talltyler> LordAro: I had to read that three times to make sure it was nonsense and I wasn’t just missing something 😛
00:34:48 <talltyler> I lived for a few years in the southern US where they used some creative grammar, like “y’all might could do X” to suggest a course of action 🤔
00:45:27 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11565: Fix: AirportGetNearestTown incorrectly assumed first TileIterator result was origin.
00:45:54 <peter1138> Hmm, maybe I should keep the asserts.
00:52:57 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11565: Fix: AirportGetNearestTown incorrectly assumed first TileIterator result was origin.
00:52:58 <peter1138> Yeah, let's do it :D
00:57:55 <peter1138> Anyway, airport noise with permissive local authority still needs to be fixed, but that probably isn't the cause.
01:32:50 *** HerzogDeXtEr1 has joined #openttd
01:37:36 *** HerzogDeXtEr has quit IRC (Ping timeout: 480 seconds)
01:55:00 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11565: Fix: AirportGetNearestTown incorrectly assumed first TileIterator result was origin.
02:20:57 <Rubidium> has anybody considered that changing the NewGRF that provides the airports can also cause underflows in the reached noise values?
02:24:03 <peter1138> Changing how?
02:24:42 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11565: Fix: AirportGetNearestTown incorrectly assumed first TileIterator result was origin.
02:25:08 <peter1138> In general that fall under "don't change NewGRFs" right?
02:26:57 <Rubidium> a NewGRF can define the noise level. If you have a savegame with such an airport, and then change the NewGRF to tweak the noise level... problems. So someone might be chasing someone messing with NewGRFs as if it's a bug in OpenTTD. Ah well... get the savegame and you'll probably know
02:29:20 <peter1138> Noise levels are recalculated on load.
02:29:34 <peter1138> So the only issue is that you might end up with noise level greater than permitted.
02:34:03 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #11555: Codechange: Simplify/self-contain DropdownWindow initialization.
02:36:50 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #11560: Codechange: Add compile-time saveload entry variable size check.
03:00:08 *** herms has quit IRC (Quit: bye)
03:03:56 *** herms has joined #openttd
03:05:41 *** FLHerne has quit IRC (Ping timeout: 480 seconds)
03:32:30 *** Compu has quit IRC (Quit:
03:38:53 *** Wormnest has quit IRC (Quit: Leaving)
03:42:23 *** FLHerne has joined #openttd
03:59:17 *** godbed has joined #openttd
03:59:25 *** Zathras has joined #openttd
04:02:46 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:02:46 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:09:57 *** gretel[m] has quit IRC (Quit: Client limit exceeded: 20000)
05:02:42 *** keikoz has joined #openttd
06:28:58 *** keikoz has quit IRC ()
06:40:03 *** keikoz has joined #openttd
06:43:39 <andythenorth> Rubidium: OP on reddit mentions FIRS crashing aa the cause of their issue…
07:30:23 *** tokai|noir has joined #openttd
07:30:23 *** ChanServ sets mode: +v tokai|noir
07:37:01 *** tokai has quit IRC (Ping timeout: 480 seconds)
08:09:48 <peter1138> Definitely.
08:12:38 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11555: Codechange: Simplify/self-contain DropdownWindow initialization.
08:13:07 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11560: Codechange: Add compile-time saveload entry variable size check.
08:14:10 *** gelignite has joined #openttd
08:15:25 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11552: Change: Replace station cargo filter buttons with a dropdown list.
08:18:08 <andythenorth> was it though?
08:18:40 <peter1138> Definitely.
08:38:36 <peter1138> Interest, non-DC_EXEC flags is called twice.
08:38:39 <peter1138> +ing
08:52:17 *** merni has joined #openttd
08:52:17 <merni> Could someone maybe merge OpenMSX PR #33 :)
08:55:14 <peter1138> I am not able to.
09:12:30 *** Flygon has joined #openttd
09:16:23 *** Zathras is now known as debdog
09:23:20 *** Wolf01 has joined #openttd
09:27:59 <peter1138> Wow, this old cold uses std::ptr_fun
09:34:15 <LordAro> pointers are fun
09:36:05 <peter1138> And also libgdk, which seems to have disappeared.
09:36:18 <peter1138> Maybe I should start from scratch :)
09:39:18 <LordAro> talltyler: my initial sentence accidentally made sense, so i had to add a few more words
09:44:35 *** nielsm has joined #openttd
09:46:32 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain approved pull request #11565: Fix: AirportGetNearestTown incorrectly assumed first TileIterator result was origin.
09:46:39 <peter1138> Yay, I got it to compile :D
09:46:44 <peter1138> But only by removing all the GUI code.
09:47:45 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11565: Fix: AirportGetNearestTown incorrectly assumed first TileIterator result was origin.
10:03:59 <truebrain> tnx for the comment fix peter1138 🙂 A tile that is an origin tile that is the top-left, was not really a helpful collection of words 😄
10:05:38 <truebrain> and you can't merge OpenMSX PRs? That is fixable ...
10:07:16 <truebrain> there, now you can
10:09:25 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11545: Fix: Use newgame ending year on highscore table when not in a game.
10:09:54 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11545: Fix: Use newgame ending year on highscore table when not in a game.
10:11:53 <DorpsGek> [OpenTTD/OpenMSX] PeterN merged pull request #33: Better formatting, update and remove obsolete link in readme
10:11:54 <peter1138> \o/
10:12:44 <truebrain> isn't it amazing?! 😛
10:16:17 <xarick> oh, thx for fixing my bug 😐
10:36:15 <peter1138> Heh, that desync savegame uses point-to-point lines :o
10:43:38 <peter1138> Last commands were CmdLevelLand, though. Hmm.
10:43:53 <truebrain> I hope that was not the one causing the desync 😄
10:43:53 <peter1138> How do you parse a desync debug command file?
10:44:16 <peter1138> cmd: 000ad467; 2a; 00; 00000065; 00000e66; 035d3f; 3F5D03003F5D03000001 (CmdLevelLand)
10:44:40 <truebrain> owh, with the new command parsing, that is an interesting question 😄
10:46:00 <peter1138> tile 00035d3f, start_tile 00035d3f. diagonal 00, level mode 01
10:46:00 <truebrain> if I would to guess, `3F5D0300` is tile, `3F5D0300` is start_tile, `00` is diagonal and `01` is LevelMode .. but I am guessssiiinnnnggggg 😄
10:46:08 <peter1138> Heh
10:46:12 <xarick> why isn't VCPKG_TARGET_TRIPLET automatically set to x64-windows-static when opening a project?
10:46:30 <truebrain> guess if we both say so, it is less guessing 😄
10:47:04 <peter1138> So that's a single-tile lower.
10:47:27 <peter1138> Such inefficient packets :D
10:47:34 <truebrain> the order of the tile-ids is a bit odd btw .. the debug statement suggests `035d3f` is the tile_index 😛
10:48:04 <truebrain> so I guess there is some LE/BE going on with the parameters 🙂
10:48:41 <peter1138> Sure, the byte packaing is LE, the tile in the debug output is already converted.
10:48:46 <peter1138> -a
10:48:49 <truebrain> anyway, please remember that we don't desync check every command; we only do it once in a while. So it can happen earlier.
10:53:33 <xarick> how do I cherry pick a commit from a branch of another repository to mine?
10:54:00 <truebrain>
10:54:22 <truebrain> so weird, you typed that in the wrong window
10:55:44 <xarick> google search doesn't work correctly here 😦
10:56:10 <truebrain> really weird, like Discord is not a place to search for things .. such odd ...
10:56:38 <xarick>!&&p=dd34f14efdb3dffaJmltdHM9MTcwMjA4MDAwMCZpZ3VpZD0zY2YyMTU1YS1iZjY5LTZkMmEtM2U1OS0wNmI4YmUwNDZjNDcmaW5zaWQ9NTQ3MA&ptn=3&ver=2&hsh=3&fclid=3cf2155a-bf69-6d2a-3e59-
10:56:38 <xarick> 06b8be046c47&psq=how+do+I+cherry+pick+a+commit+from+a+branch+of+another+repository+to+mine%3f&u=a1aHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9xdWVzdGlvbnMvNDE0MTMzNTcvY2hlcnJ5LXBpY2stY29tbWl0LWZyb20tYS1kaWZmZXJlbnQtcmVwbw&ntb=1
10:56:44 <xarick> it's blank
10:56:46 <truebrain> dude
10:56:48 <truebrain> use your brain
10:56:59 <truebrain> this is not your help channel for your average question you can search for yourself
11:00:41 <xarick> there's a reason I don't like google, they're so high up their horse
11:01:01 <xarick> but ok, my bad
11:01:05 <truebrain> so pick any other search engine; but using us as search engine is just rude
11:20:22 <peter1138> Right, MP3.
11:35:50 <truebrain> No vorbis? 😄
11:36:09 *** godbed has quit IRC (Quit: - Chat comfortably. Anywhere.)
11:36:23 <peter1138> Hahaha why? :p
11:36:46 <peter1138> flac?
11:36:49 <truebrain> Or flac, for "those people"
11:36:57 <truebrain> Stop doing this 😛 😄
11:37:28 <peter1138> My music collection is flac.
11:37:32 <peter1138> But that's music.
11:37:58 <peter1138> (I once ripped everything as ogg vorbis, but it turned out the encoder at the time did a terrible job.
11:38:02 <peter1138> )
11:38:24 <truebrain> I once had all my music in flac too
11:38:34 <truebrain> Now I don't own my own music anymore 😦
11:39:47 <peter1138> Hmm, forgot to add the padding at the end for the "resampler".
11:40:05 <peter1138> Maybe I shouldn't remove soxr, but... memory usage eh?
11:47:37 <peter1138> Let's robustize this.
11:51:45 <locosage> I may have command data parser for new format but can only check in the evening
11:52:43 <locosage> I definitely have some code that unpacks it into c structs
11:52:55 <locosage> Don't remember if I even finished python parts
11:53:41 <xarick> I don't understand remotes...
11:54:15 <peter1138> git remote -v
11:58:31 <xarick>
12:27:19 <xarick> I can't get the list of branches
12:27:33 <xarick> why is this so hard!
12:28:00 <peter1138> git fetch github-desktop-PeterN
12:29:08 <peter1138> git branch -r -l
12:32:44 <peter1138> Hmm, maybe I should steal OpenTTD's GUI system ;D
12:44:37 <peter1138> Okay, how do I test with an mp3... haha
12:44:46 <peter1138> CatCodec.
12:59:32 <andythenorth> truebrain: Does Ludde rent you your music?
13:00:40 <peter1138> -rw-r--r-- 1 petern petern 1245728 Dec 9 13:00
13:00:40 <peter1138> -rw-r--r-- 1 petern petern 13196496 Oct 31 2021
13:00:43 <peter1138> Thats... smaller?
13:04:18 <peter1138> I removed all the validation, so now it will let me shove any old file into the ;D
13:05:49 *** gelignite has quit IRC (Quit: Stay safe!)
13:12:58 <xarick> peter1138: Nice, that worked, but visual studio should have an option to do that
13:13:35 <peter1138> It probably does, but I don't use it so I can't tell you how.
13:13:58 <_glx_> Git is a command line tool, it's impossible to get all possible features in gui
13:22:41 <peter1138> Hmm. My FindLibMad.cmake is not working :o
13:22:49 <peter1138> Well, it "is"
13:25:49 <peter1138> But it doesn't actually link with it.
13:28:30 <peter1138> Odd. It's basically the same as my JACK one which works.
13:28:41 <peter1138> Such magical things.
13:36:24 <peter1138> Case sensitive of course.
13:45:21 <xarick> peter1138: I used cherry-pick on your commit, fixed the conflicts, but it didn't inherit the author 😦
13:45:51 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #11564: Fix: Prevent under/over flow when calculating town noise
13:50:47 *** virtualrandomnumber has joined #openttd
13:51:27 *** virtualrandomnumber has quit IRC ()
13:52:46 <peter1138> The change is spurious, it's always called without DC_EXEC first.
13:57:16 <andythenorth> one day someone will add an n-track building tool 😛
13:57:22 <andythenorth> to autorail
13:58:17 <andythenorth> hmm
13:58:28 <andythenorth>
13:58:28 <andythenorth> also mixing railtypes on a diagonal tile 😛
13:58:45 <andythenorth> someone is about to suggest I switch to JGRPP? 🙂
14:01:14 <andythenorth> ah I forgot something in my Horse set design 😛
14:01:29 <andythenorth>
14:01:29 <andythenorth> only the engine is evaluated for railtype compatibility
14:01:41 <andythenorth> "this is awkward"
14:02:17 <andythenorth> those pax coaches are not compatible with this railtype 😛
14:09:38 <emperorjake> That's fine, they just won't be able to use the max speed of the engine
14:11:21 <andythenorth> means you get 120 mph trains on a 200 mph railroad 😛
14:11:27 <andythenorth> where you don't want them
14:11:41 <andythenorth> railtype min speed property? 😛
14:11:54 <andythenorth> not actually joking
14:12:32 <peter1138> Pathfinder penalty?
14:13:57 <andythenorth> above my pay grade 🙂
14:13:59 <andythenorth> bu maybe?
14:14:27 <andythenorth> the railtype wagons thing can lead to odd results when depots have mixed track types
14:14:40 <andythenorth> it's totally possible to have narrow gauge wagons on standard RAIL for example
14:15:07 <_glx_> xarick: it's not a cherry-pick if you modify the commit to include your local changes 🙂
14:15:37 <peter1138> If the wagon is incompatible then you can't buy it in the depot to be able to attach it.
14:16:51 <_glx_> you should not be able to get standard and narrow in the same depot
14:16:56 <emperorjake> but someone can always make a railtype where they are compatible
14:17:14 <emperorjake> with a dual gauge depot you can attach narrow gauge wagons to a standard gauge engine
14:17:32 <peter1138> Yes but if they are then compatible... they are compatible.
14:18:13 <emperorjake> but then the engine can still travel on standard gauge tracks while pulling the narrow gauge wagons
14:18:18 <emperorjake> It's a feature, not a bug
14:19:39 <_glx_> and narrow gauge wagons runs on standard sleepers ?
14:20:35 <emperorjake> It's a way to simulate re-gauging
14:23:47 <andythenorth> it's lol 🙂
14:24:34 <andythenorth> I am correct that we don't evaluate railtypes for wagons? I haven't checked src, but behaviour suggests this
14:25:11 <_glx_> compatibility is checked when buying I think
14:25:47 <andythenorth> it's definitely checked for buy list
14:26:24 <peter1138> You can manually do a callback I think.
14:26:54 <_glx_> when running I think the engine is checked (at least for power and also compatibility), but the consist compatibility is assumed
14:26:56 <andythenorth> ok so for entering a tile, it's only the lead engine that's evaluated
14:27:06 <peter1138> With CBID_TRAIN_ALLOW_WAGON_ATTACH return 0x402 and it'll say "incomaptible rail type"
14:27:16 <peter1138> Yes, once on the map that is necessary.
14:27:28 <andythenorth> performance issues?
14:27:43 <peter1138> case 0x400: // allow if railtypes match (always the case for OpenTTD)
14:28:13 <peter1138> So 12 years ago it was known and left as a feature that railtypes are not checked when attaching parts.
14:28:24 <peter1138> But you can override it with the callback.
14:28:48 <peter1138> andythenorth, no, disconnecting train issues, or at least, train stuck unable to move.
14:28:51 <andythenorth> new feature, incompatible railtypes?
14:29:43 <_glx_> train stuck can still happen IIRC
14:30:22 <peter1138> Why am I so slow? :(
14:30:43 <peter1138> If this was Unity I would have just connected a couple of boxes together and made it all work by now.
14:30:46 <andythenorth> why am I so hungry?
14:30:58 <peter1138> Because you saw my lunch.
14:31:30 <peter1138> Anyway, the MP3 is loaded, but I'm failing at the buffers :D
14:31:33 <andythenorth> I have not had lunch
14:32:54 <andythenorth> if I have lunch, will I be less complaining about railtypes? 😛
14:33:15 <peter1138> Are you complaining?
14:33:30 <andythenorth> I think so
14:33:35 <andythenorth> in my head at least
14:34:33 <andythenorth> maybe a sandwich
14:38:38 <andythenorth> maybe 2 small sandwiches
14:38:41 <andythenorth> optimised
14:49:24 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #11561: Fix: Disable airport noise if local authority control is disabled.
14:49:43 <andythenorth> sandwich eaten
14:49:45 <andythenorth> twice
14:52:41 <xarick> noise_reached may overflow yet
14:53:17 <xarick> if someone manages to place a tremendous amount of airports in a town
14:54:01 <xarick> like 65k airports
14:56:44 <peter1138> Finally. MP3 ;D
14:57:01 <andythenorth> ```Note that the compatibility is only evaluated for the lead engine of a consist. This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.```
14:57:07 <peter1138> 1.2MB instead of 13MB
14:57:13 <andythenorth> I've added this to grf spec, does the wording make sense?
14:57:22 <andythenorth> train prop 0E
14:57:30 <andythenorth>
14:57:31 <peter1138> 64kbps because it's mono
14:58:12 <xarick> is it lossless?
14:58:26 <_glx_> it's MP3 so no
14:59:10 <xarick> but but... 🙂
14:59:52 <xarick> the original sounds are already low quality, doing another lossless compression on them would make it worse, right?
14:59:58 <xarick> lossy*
15:00:36 <peter1138> It's not "another" lossy compression.
15:00:49 <_glx_> original are not compressed at all
15:00:54 <_glx_> it's plain PCM
15:02:56 <peter1138> And this doesn't affect the original sounds.
15:04:06 <xarick> is there a lossless PCM thingy? 😐
15:04:18 <xarick> oh well, nvm
15:05:07 <peter1138> That's... the default.
15:08:13 <xarick> compressed, i guess the aim is to have it compressed but still lossless?
15:08:30 <peter1138> What are you talking about?
15:08:48 <xarick> okay, I don't know what's the goal then
15:08:50 <peter1138> OpenTTD supports raw samples, and PCM wave files.
15:08:59 <peter1138> I've just been playing with adding support for MP3 as well.
15:09:11 <peter1138> That does not remove the current support.
15:11:39 <xarick> was searching on the web for something like APNG but for audio
15:16:00 <xarick> using zlib to compress the audio, make it streamable
15:16:11 <xarick> something of that nature
15:16:17 <xarick> wishful thinking
15:16:43 <peter1138> Are you trying to think of a way of doing lossless audio without using an existing lossless audio codec?
15:16:47 <peter1138> Pretty sure that's a dumb idea.
15:16:53 <xarick> YES!
15:17:24 <peter1138> flac generally gets files down to about half their uncompressed size.
15:18:08 <peter1138[d]>
15:18:12 <peter1138> Interesting ordering...
15:18:34 <andythenorth> I'll update nml wiki also for railtypes
15:18:56 <alfagamma7> What format does the base sounds set use
15:19:09 <peter1138> "Yes"
15:19:21 <peter1138> Mostly wave files, there's one raw pcm.
15:19:38 <andythenorth> ach railtype vs rail type again 😦
15:19:42 <andythenorth> rail type in the spec
15:19:45 <andythenorth> but railtype in nml
15:19:51 <andythenorth> except when it's track_type
15:20:09 <peter1138> The original base sounds wave files are all mono 8-bit 11kHz.
15:20:24 <peter1138> OpenGFX uses mono 16-bit 44.1kHz
15:20:26 <peter1138> 11025 I guess :D
15:20:44 <andythenorth> ach the compatibility note I added is confusing 🙂
15:20:49 <andythenorth> it's only about routing, not building
15:21:13 <andythenorth> Is this better?
15:21:13 <andythenorth> ```Note that when routing trains, the compatibility is only evaluated for the lead engine of a consist. This means that trains will run on incompatible rail types if they are in a consist where the lead engine is compatible with the rail type. This applies to both engines and wagons.
15:21:39 <peter1138> Don't document it.
15:21:43 <andythenorth> I wonder why we don't just show all wagons in all depots, irrespective of rail type?
15:21:53 <peter1138> If you do that, how are we supposed to change it later and claim is was undefined behaviour?
15:22:02 <andythenorth> Dunno 🙂
15:22:06 <andythenorth> but the spec was wrong
15:22:38 <andythenorth> we're unlikely to change it, because it's going to cause stuck trains?
15:22:43 <andythenorth> and users will bring pitchforks
15:23:00 <peter1138> Because depots have railtypes and you can't buy a wagon with an incompatible railtype.
15:23:10 <andythenorth> but that seems odd
15:23:24 <andythenorth> compatibility doesn't mean anything for wagons
15:23:29 <peter1138> Yes it does.
15:23:39 <peter1138> You can't buy a wagon in an incompatible depot.
15:23:40 <andythenorth> I rephrase
15:23:43 <andythenorth> yes that
15:23:48 <andythenorth> but why?
15:23:56 <peter1138> You can't buy an engine in an incompatible depot.
15:24:10 <andythenorth> that makes sense
15:24:12 <peter1138> Why? Becuase that's basically the point of compatible railtypes.
15:24:18 <andythenorth> hmm
15:24:34 <andythenorth> more tea?
15:24:38 <peter1138> The side effect of dual-compatible depots was probably not even considered.
15:25:05 <peter1138> The fact that railtype is "not checked" when a train is on the map, is because at that point the code assumes it was all checked in the depot.
15:25:50 <xarick> noise_reached overflowing is difficult to mess with
15:25:55 <peter1138> Therefore, you can "fix" this by making it not possible to attach a wagon to an engine with an incompatible railtype.
15:26:13 <peter1138> However, given there's specifically a callback result for handling this precise case... I don't see the point :)
15:27:46 <xarick> if I clamp it to the max of uint16, then on RemoveAirport, i just can't subtract from that
15:27:53 <andythenorth> nah I miss something 🙂
15:28:09 <andythenorth> I think I'm probably trying a BAD FEATURE?
15:28:19 <talltyler> I think the specialized railtype is the footgun here
15:28:39 <andythenorth> well it's the idea of speed separation I think
15:28:44 <andythenorth> no matter how people try to do it
15:28:46 <andythenorth> it fails
15:28:49 <andythenorth> JGRPP maybe?
15:28:55 <talltyler> Yes, you were trying to do pathfinder stuff with railtype
15:29:01 <andythenorth> pretty much
15:29:07 <andythenorth> this is what programmable signals are for?
15:29:08 <talltyler> Programmable signals is how I’d solve it in JGRPP
15:29:47 <talltyler> Just have a signal at the start of the fast line with a “if max speed < 186 then deny”
15:30:11 <andythenorth> did we find a way yet to make grfs JGRPP only?
15:30:19 <andythenorth> there might be a feature detection system?
15:31:08 *** virtualrandomnumber has joined #openttd
15:31:19 <merni> MP3 music for openttd 😍
15:31:38 <talltyler> Programmable signals are something I would seriously consider trying to get into vanilla someday, obviously just the basics and with some gates to avoid players finding them too easily. They can be their own footgun quite easily.
15:31:41 <andythenorth> I still miss why compatibility is evaluated for wagons
15:31:43 <locosage> andythenorth: Yeah, multi track tool is on my endless todo list xd
15:31:44 <peter1138> merni, nope.
15:31:51 <merni> why?
15:31:55 <alfagamma7> Sad
15:32:10 *** Wormnest has joined #openttd
15:32:14 <alfagamma7> Because OTTD plays mono?
15:32:15 <peter1138> Because sound effects and music are totally different systems.
15:32:17 <alfagamma7> idk
15:32:48 <merni> Oh for sounds and not music
15:33:42 <merni> but would it be very hard to add support for music as well if all the work in building in MP3 playing for sound (in all OS etc) is already done :p
15:35:16 <andythenorth>
15:35:16 <andythenorth> this wagon list is misleading
15:35:33 <andythenorth> ALL the Horse wagons are compatible with this railtype
15:36:11 <andythenorth> it's inconvenient to only show the ones that have compatibility set
15:36:50 <andythenorth> (BAD FEATURE problems)
15:37:08 <andythenorth> "just don't add BAD FEATURES" might apply here
15:39:39 <peter1138> merni, it's completely different.
15:40:05 <peter1138> And there is literally no point because the original music is MIDI.
15:41:10 <merni> I mean the original graphics are 8bpp 1x zoom and yet we have other options?
15:41:30 <peter1138> That isn't really comparable.
15:43:39 <_glx_> original music is basically raw partitions 🙂
15:44:28 <peter1138> It's sheet music :D
15:44:55 <_glx_> the orchestra is inside the player
15:45:43 <peter1138[d]> It's inside the little box next to my PC 🙂
15:46:10 <_glx_> and it can be very different from system to system
16:05:00 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11566: Add: Support sound effects in MP3 format in basesets and NewGRF.
16:05:34 *** virtualrandomnumber has quit IRC (Quit: virtualrandomnumber)
16:08:21 <andythenorth> hmm
16:08:23 <andythenorth>
16:08:39 <andythenorth> coaches aren't available on this railtype
16:09:31 <talltyler> Why don’t we just fix routing? Wagons cannot use railtypes they are incompatible with?
16:09:42 <andythenorth> pitchforks
16:09:54 <talltyler> Pitchforks hasn’t stopped us before 😛
16:09:56 <andythenorth> we need an acronym for BFDDI
16:10:06 <andythenorth> BFWR?
16:10:13 <andythenorth> NMBF?
16:10:27 <peter1138> I don't know why that's considered "routing"
16:10:31 <talltyler> Saveload could be handled by teleporting problematic trains to depots, we did it with multi-tile level crossings and nobody complained
16:10:35 <peter1138> That's attaching wagons in the depot.
16:10:47 <andythenorth> it is? 🙂
16:10:56 <andythenorth> I 've routed the train into the depot
16:10:59 <andythenorth> and tried to clone it
16:12:07 <talltyler> Routing because dual-gauge track can handle both narrow and standard gauge trains, but a train with both types shouldn’t be able to travel onto either narrow or standard gauge-only track
16:12:28 <andythenorth> slightly different case here
16:12:33 <andythenorth> same stem
16:12:36 <peter1138> Okay, to me routing means finding a route... pathfinding.
16:12:48 <talltyler> And freight cars can be coupled to a fast loco, but not travel on fast track
16:12:54 <peter1138> But the issue here is clearly "can you attach a wagon of the wrong type in a depot"
16:12:57 <andythenorth> is 'traverse tile' a better issue?
16:13:15 <talltyler> “Wrong” seems to be made-up with railtypes
16:13:20 <andythenorth> the issue here is NewGRF author BAD FEATURES
16:13:41 <talltyler> What is the railtype of the Badger?
16:13:52 <andythenorth> probably the LGV type
16:14:02 <andythenorth> I never remember how compatibility works
16:14:05 <talltyler> (I have no idea how railtypes or railtype tables work, it sounds frustrating and stupid)
16:14:14 <andythenorth> it's fine
16:14:23 <andythenorth> the idea is that railtype authors can redefine the trains
16:14:25 <andythenorth> makes sense 🙂
16:14:27 <peter1138>
16:14:35 <peter1138> There's stuff in the callback specifically to handle this.
16:14:52 <andythenorth> I think we're at cross purposes 🙂
16:15:00 <andythenorth> how will the callback handle that?
16:15:09 <andythenorth> the passenger coaches are not available on this railtype
16:15:27 <andythenorth> I built them on another railtype which isn't compatible
16:15:30 <andythenorth> then sent them to this depot
16:16:44 <andythenorth> the engine uses some label we'll call FAST
16:16:50 <andythenorth> which is compatible with ELRL and RAIL
16:17:00 <andythenorth> and that is the BAD FEATURE
16:17:49 <andythenorth> railtypes shouldn't really be mixed in this way
16:18:47 <andythenorth> ooooo
16:18:49 <peter1138> Oh I guess .base() is not standard, or is newer than C++17
16:18:55 <andythenorth> what if I convert the FAST trains to maglev? 😛
16:19:05 <andythenorth> then they're obviously not going to run on ELRL or RAIL
16:23:29 <xarick> Is this gonna do what I think it's gonna do?
16:23:29 <xarick> `assert(IsInsideBS(nearest->noise_reached + nearest->noise_reached, std::numeric_limits<decltype(nearest->noise_reached)>::min(), std::numeric_limits<decltype(nearest->noise_reached)>::max()));`
16:23:54 <peter1138> What do you think it's going to do?
16:24:21 <xarick> can the added noise fit inside the type of variable of noise_reached ?
16:24:43 <xarick> oh it's wrong 😦
16:25:02 <xarick> assert(IsInsideBS(nearest->noise_reached + newnoise_level, std::numeric_limits<decltype(nearest->noise_reached)>::min(), std::numeric_limits<decltype(nearest->noise_reached)>::max()));
16:25:07 <xarick> newnoise_level
16:25:32 <peter1138> IsInsideBS is wrong for min/max.
16:26:27 <peter1138> IsInsideMM exists for that -- but that also exclues max.
16:27:10 <peter1138> Why do you think noise_reached can get near UINT16_MAX?
16:27:59 <xarick> probably if someone tries enough to make such a giant town with tons of airports 😮
16:37:45 <_glx_> highly improbable
16:38:19 <peter1138[d]>
16:38:22 <peter1138> Nowhere near.
16:38:34 <peter1138> Also the game hung for a long time doing that generaion.
16:39:53 <peter1138> It's trying to add 30,000 buildings in one go.
16:40:58 <peter1138[d]> Yeah, it's kinda exponential or at least non-linear.
16:41:16 <peter1138[d]>
16:41:22 <_glx_> thinking about overflows is nice, but also consider the probability to encounter them before trying to prevent/fix
16:41:30 <peter1138> That was 1 press of expand town :D
16:42:09 <peter1138> Anyway, it's uint16_t because uint8_t wouldn't be enough, but uint16_t is plenty.
16:42:21 <_glx_> and worse case if there's an overflow here is allowing more noisy stuff
16:42:24 <_glx_> or less
16:42:27 <_glx_> whatever
16:43:22 <peter1138> Population is going up by itself :D
16:45:25 <peter1138> Noise limit is now 3772. Given the density and radius of the town, placing 1 intercontinental airport raises the noise by 17 (max is 25 for that airport)
16:45:32 <xarick> it needs to be higher than 6 553 200
16:45:34 <andythenorth> _glx_: or a FIRS error? 😛
16:45:43 <peter1138> So shall I place 220 airports?
16:45:51 <andythenorth> write a GS to do it
16:45:59 <peter1138> Well, I can't.
16:46:06 <_glx_> if you place an airport you'll remove some houses
16:46:07 <andythenorth> you ran out of town radius?
16:46:34 <peter1138> Probably need about 4000 airports
16:46:42 <andythenorth> definitely a GS
16:47:43 <xarick> needs a NewGRF to set airport noise to some big value, 255 is max i guess
16:48:10 <_glx_> very improbable 🙂
16:48:40 <_glx_> airport specs are quite limited so nobody use them
16:48:46 <andythenorth> OGFX+
16:49:05 <_glx_> just using the rotation stuff
16:49:24 <_glx_> but layouts can't really change
16:49:54 <xarick> make that 1 * 1 helipad have a 255 noise
16:50:18 <xarick> andythenorth
16:52:11 <xarick> ok gonna make a GS massing helipads
16:53:24 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11566: Add: Support sound effects in MP3 format in basesets and NewGRF.
16:53:42 <andythenorth> Goes It Throw Out BAD FEATURE?
16:53:46 <andythenorth> hmm we can't mix the memes?
16:54:16 <xarick> oh, must be an AI
16:54:19 <xarick> not a GS
16:54:42 <xarick> the GS will need to provide the money
16:55:29 <merni> ...why are you doing this anyway?
16:55:44 <merni> to prove that it's theoretically possible to cause an overflow?
16:56:02 <xarick> yes
16:56:43 <_glx_> but airport noise don't add to max_noise directly
16:57:09 <_glx_> and the comparison usually is done on ints (auto conversion)
16:58:21 <peter1138> Spam a town with 1x1 255-noise heliports, profit?
16:59:38 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11566: Add: Support sound effects in MP3 format in basesets and NewGRF.
17:01:25 <peter1138> Oh I need to rebase to make the CI happy.
17:02:08 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11566: Add: Support sound effects in MP3 format in basesets and NewGRF.
17:02:16 <peter1138> Probably should've done a local PR, sorry :)
17:03:00 <_glx_> like in ` if ((nearest->noise_reached + newnoise_level) > nearest->MaxTownNoise()) {` the first addition promotes everything to int so everything is safe
17:05:07 <_glx_> well uint as newnoise_level is uint, but still it's promoted to 32bit
17:08:18 <_glx_> anyway the ClampTo in MaxTownNoise won't prevent anything as the overflow is more likely to happen when updating noise_reach than when calculating MaxTownNoise
17:09:47 <_glx_> but the result is tested to not be higher than MaxTownNoise before the real update can happen
17:11:52 <_glx_> so really the only possible way to get an underflow/overflow of noise_reached is changing newgrf in a running game
17:12:49 <talltyler> Which we don’t support
17:13:54 <_glx_> (UpdateAirportsNoise() and RemoveAirport() are the only things not checking for over/under, but that's where the check should happen if really needed
17:14:18 <_glx_> all other locations seem safe in the current code
17:20:29 <_glx_> RemoveAirport() assumes no overflow occured when adding the airport (and that's a valid assumption as CmdBuildAirport() doesn't allow increase of noise_reached if the new value would be higher than MaxTownNoise())
17:21:16 <xarick> you can create new towns
17:21:18 <_glx_> and UpdateAirportsNoise() assumes the same
17:23:24 <_glx_> noise is transfered from original town to new town if it's closer to airport ?
17:23:38 <xarick> yes
17:23:58 <xarick> it reruns UpdateAirportsNoise
17:24:17 <xarick> the new town can get a result higher than it's max
17:24:17 <_glx_> then the only "issue" could be noise_reached being above MaxTownNoise()
17:24:28 <_glx_> but that's fine
17:24:43 <_glx_> you are just not allowed to build more airports
17:28:00 <_glx_> you can't prevent noise_reached going above MaxTownNoise() in that case, unless you remove the airport
17:36:05 <andythenorth> hmm
17:36:17 <andythenorth> list of incompatible vehicles for a railtype?
17:40:22 <xarick> is there a way to reset the value of a setting to its default in the console?
17:48:36 <xarick> I wonder if this will work
17:48:36 <xarick> `GSGameSettings.GetValue("town_noise_population[" + GSGameSettings.GetValue("town_council_tolerance") + "]"))`
17:50:18 <andythenorth> eh I think cb36 can change vehicle speed when railtype changes
17:50:22 <andythenorth> Horse seems to do that
17:52:19 <andythenorth>
17:52:19 <andythenorth> oh 0 mph evaluates funny 😄
17:54:07 <andythenorth>
17:54:07 <andythenorth> this is too silly as a solution 🙂
17:54:21 <andythenorth> coaches set speed to 1 mph when on high speed rail
17:54:35 <andythenorth> the engine shows permanent sparks, which is nice
17:56:05 <peter1138> Okay, that's ... surprisingly working :D
17:57:43 <peter1138> I implemented mmap support in OpenTTD (for Linux of course)
17:57:58 <peter1138> This has almost no benefit ;)
18:02:09 <peter1138> Not sure if I can easily abstract ReadBlock() to avoid copies though.
18:03:19 <peter1138> Well, that was frivolous. I could've done good things today but instead I wasted it all on two stupid things.
18:23:21 *** gelignite has joined #openttd
18:25:27 <xarick> GSTown.ExpandTown(town, 0xFFFFFFFF)
18:25:43 <xarick> and... openttd locked up
18:26:07 <andythenorth> peter1138: well
18:26:35 <andythenorth> no you are ahead, I only did one stupid thing
18:26:36 <andythenorth> 😛
18:31:49 <peter1138> Hmm, cancelling downloads doesn't cancel them. I thought we fixed that ;D
18:49:57 <xarick> growing town is slow
18:50:31 <xarick> CmdExpandTown that is
18:50:44 <xarick> stalls the cpu 😦
18:51:30 <xarick>
18:52:04 <xarick> the houses need to finish construction?
18:52:15 <xarick> in real in-game time?
18:54:33 <peter1138> "Doctor, it hurts when I do this"
19:02:25 <xarick> GetTownRoadGridElement is heavy
19:02:59 <xarick> or is it GrowTownWithExtraHouse?
19:03:11 <xarick> this cpu profiler isn't too smart
19:08:36 <locosage> Towns grow fast enough, just don't make it grow shitton of houses at once
19:08:48 <peter1138> 4 billion houses is quite a lot.
19:08:58 <peter1138> It was slow enough with 10000
19:21:53 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11567: Fix #11352: Network server info could be cropped.
20:03:58 <xarick> is it possible for a GS or AI to know it's using too much cpu time?
20:05:48 <andythenorth> nope
20:06:05 <andythenorth> I could count how often it gets suspended
20:06:10 <andythenorth> by storing timestamps
20:06:18 <andythenorth> but it will not be very precise measure
20:07:01 <andythenorth> and there is a fundamental problem, that you can't make your timestamp code run until all the other opcodes are finished 😛
20:07:49 <andythenorth> if you slice up jobs into batches, and write your own dispatcher for them in the main loop, you could approximately maintain some control over it
20:08:16 <andythenorth> but if you get an unanticipated runaway condition, there's no interrupt that I'm aware of that will let your main loop resume control, it's all single-threaded stuff
20:10:27 <xarick> I can use timestamps?
20:10:34 <xarick> wow
20:11:29 <xarick> I see GSDate.GetSystemTime()
20:12:11 <andythenorth> yeah, as I remember, it's not super useful, it's not very fine grained
20:12:43 <andythenorth> oh it's seconds, probably fine for your case
20:12:50 <andythenorth> not fine for performance timing purposes
20:15:52 <xarick> how many ticks in a day? still 74?
20:19:26 <debdog> for me, one per year is enough
20:21:02 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #11567: Fix #11352: Network server info could be cropped.
20:29:38 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #11546: Change: Don't show scoring year in single-player high score table
20:32:51 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #11561: Fix: Disable airport noise if local authority control is disabled.
20:43:39 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11567: Fix #11352: Network server info could be cropped.
20:43:42 <DorpsGek> [OpenTTD/OpenTTD] PeterN closed issue #11352: [Bug]: Server address clipped in multiplayer GUI
20:53:36 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #11435: Feature: Mode to display timetable in seconds
21:19:42 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11568: Codechange: Add 'changed' return value to SetDisplayedPlane, and simplify callers.
21:38:39 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
21:42:12 <xarick> why is
21:42:12 <xarick> guarded by IsValidTile
21:42:52 <xarick> so arbitrarily
21:45:55 <xarick> GetTileIndex is smarter
21:47:52 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #11568: Codechange: Add 'changed' return value to SetDisplayedPlane, and simplify callers.
21:55:05 <peter1138[d]> U wot m8
21:55:36 <andythenorth> kilroy was here?
21:56:57 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11568: Codechange: Add 'changed' return value to SetDisplayedPlane, and simplify callers.
21:57:19 <peter1138> oOOo |O.O| oOOo
22:00:37 <xarick>
22:00:37 <xarick> almost there
22:01:18 <locosage> the heck is that gamma
22:01:53 <xarick> it's the windows screenshot tool, it captures it like that 😦
22:03:11 <peter1138> I'm going to have to Decino this level, I've run out of ammo :o
22:04:32 <xarick> locosage: - depending on the tool, the captures become with weird colours because of HDR
22:04:40 <andythenorth> peter1138: no chainsaw?
22:05:03 <peter1138> Yes, but beserk is better.
22:06:03 <xarick>
22:06:03 <xarick> this one is captured using the in-game screenshot
22:06:35 <peter1138> Yes, because it's not an OpenTTD bug.
22:07:26 <_glx_> see openttd knows the colours, hence in-game screenshot being fine
22:07:36 <DorpsGek> [OpenTTD/OpenTTD] PeterN closed issue #11559: [Bug]: Colour accuracy in OpenTTD with HDR
22:07:36 <andythenorth>
22:07:36 <andythenorth> oof
22:07:40 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on issue #11559: [Bug]: Colour accuracy in OpenTTD with HDR
22:07:42 <andythenorth> can't be bothered to find the charger
22:07:57 <andythenorth> oh it's right here
22:08:01 <peter1138> andythenorth, how are you doing to stay upa all night drawing pixels?
22:08:22 <andythenorth> A) I'm not B) see above
22:08:25 <_glx_> andythenorth: thanks for the reminder, last time I checked my phone was at 15%
22:08:34 <locosage> andythenorth: how many horse compiles is that? xD
22:08:45 <andythenorth> each compile is about 1% of battery
22:09:29 <xarick> so, to whom I complain about these colours?
22:09:33 <xarick> Microsoft?
22:09:41 <xarick> AMD?
22:10:10 <_glx_> if you can try with an nvidia card that would give a hint
22:10:28 <xarick> I don't have a Nvidia GPU 😦
22:11:01 <xarick> or maybe BENQ?
22:11:06 <xarick> montiro is a BENQ
22:11:06 <_glx_> but HDR is a pain, even on playstation, usually it must be disabled when streaming else the colours are wrong
22:11:57 <_glx_> it's most likely an OS issue
22:12:26 <_glx_> or the tools not supporting HDR properly, or a mix
22:15:27 <_glx_> but it's never the program used to draw on screen
22:16:21 <_glx_> because as you could see, in-game screenshot is fine, and it's exactly the same as what openttd draws on screen
22:17:37 <andythenorth> was it bedtime?
22:17:53 <peter1138> No, Sigil II is released soon.
22:17:55 <_glx_> so either bug inside windows API, or GPU driver, or ..., the list can be long, but it's never the program
22:18:32 <xarick>
22:18:32 <xarick> I wanted to benefit from this monitor 😦
22:18:45 <andythenorth> IsCompatibleRail perhaps?
22:19:27 <_glx_> the monitor itself is fine, I guess you get nice pictures on it
22:20:52 <_glx_> the screenshot tools on the other hand might use the wrong API, or the OS return the image at the wrong time in the chain
22:21:38 *** Wormnest has joined #openttd
22:21:40 <peter1138> Did someone say cache the minimum of compatible railtypes?
22:22:06 <_glx_> the issue is between program plotting pixels on the screen and the monitor, but program and monitor are fine
22:22:35 <_glx_> I mentionned the idea of compatibility per consist yes
22:23:17 <_glx_> intersection of individual compatibilies of vehicles in consist
22:23:44 *** Smedles has quit IRC (Read error: Connection reset by peer)
22:26:06 <_glx_> would change ` return HasBit(GetRailTypeInfo(enginetype)->compatible_railtypes, tiletype);` into ` return HasBit(v->cached.compatible_railtypes, tiletype);` or something like that
22:26:34 <_glx_> (that's `IsCompatibleRail()`)
22:27:18 *** Smedles has joined #openttd
22:27:51 <_glx_> maybe not the right function to touch, but it's an idea
22:28:09 <xarick> dang it, river generation stall is so annoying
22:28:41 <xarick> it's rare, but when it happens... bam... 5 minutes lost
22:32:33 <_glx_> oh but there's already a v->compatible_railtype, but it's filled with powered_railtypes
22:33:33 <peter1138> F2 can make quick work of disambiguating that.
22:34:32 <_glx_> then yapf caches it and may add compatible_railtypes to it
22:38:40 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11569: Change: Use sparse padding for start network server window.
22:57:04 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:58:40 *** nielsm has quit IRC (Ping timeout: 480 seconds)
23:05:10 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:10:50 *** gelignite has quit IRC (Quit: Stay safe!)
23:17:55 <andythenorth>
23:17:55 <andythenorth> diagonal roads eh 😛
23:18:08 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11569: Change: Use sparse padding for start network server window.
23:18:35 *** NGC3982 has quit IRC (Quit: brb)
23:35:51 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11569: Change: Use sparse padding for start network server window.
23:41:44 <Flygon> Diagonal roads would massively sate the aesthetic part fo me hahaha
23:46:51 <peter1138> I have no idea how the map array would have to look for that to work.
23:47:17 <emperorjake>
23:47:17 <emperorjake> Like this?
23:48:19 <peter1138> Job done, we can go home.
23:49:12 <emperorjake> There is an experimental patch that changes the road vehicle movement code so that diagonal roads actually work, no changes to the map array needed
23:49:33 <LordAro> is there?
23:49:38 <emperorjake> the wall they ran into was with articulated vehicles disconnecting or something
23:50:46 <Flygon> The difficulty is having those diagonals work nicely with the cliffs :P
23:50:48 <Flygon> Hmm
23:50:53 <Flygon> I can see how articulated is a pain.
23:51:33 <emperorjake>
23:58:25 *** Flygon has quit IRC (Read error: Connection reset by peer)