IRC logs for #openttd on OFTC at 2023-12-22
            
00:43:58 <talltyler> Eddi: Indeed
00:46:58 <talltyler> Re: breakdowns, the PR factors in actual travel time including waiting at signals and breakdowns, so it would space out vehicles based on the rolling average of the travel time. So yes, I would call that breakdown-friendly
00:47:59 <talltyler> The current PR does not include an AI spec extension to enable or disable autoseparation but it could be added in a separate PR
01:07:42 <talltyler> Fragile rail networks break themselves ๐Ÿ˜‰
01:09:58 <DorpsGek> [OpenTTD/OpenTTD] EmperorJake updated pull request #11605: Change: Make "middle" the default stopping location for trains in platforms https://github.com/OpenTTD/OpenTTD/pull/11605
01:10:56 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11605: Change: Make "middle" the default stopping location for trains in platforms https://github.com/OpenTTD/OpenTTD/pull/11605#pullrequestreview-1793833803
01:11:05 <talltyler> Good morning! You fixed it! ๐Ÿ™‚
01:11:09 <emperorjake> there I think I fixed it
01:11:20 <emperorjake> woohoo!๐Ÿ˜…
01:49:21 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11610: Change: Simplify drawing widget labels and allow space for text shadow on WWT_LABEL. https://github.com/OpenTTD/OpenTTD/pull/11610#issuecomment-1867130539
01:58:50 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11548: Fix #10511: Delay 'go to nearest depot' orders https://github.com/OpenTTD/OpenTTD/pull/11548#pullrequestreview-1793858827
02:04:55 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11561: Fix: Disable airport noise if local authority control is disabled. https://github.com/OpenTTD/OpenTTD/pull/11561#pullrequestreview-1793864262
02:34:10 *** thelounge345 has joined #openttd
02:44:54 *** Wormnest has quit IRC (Quit: Leaving)
02:45:07 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11263: Feature: Procedural tree growth https://github.com/OpenTTD/OpenTTD/pull/11263#pullrequestreview-1793869222
02:45:42 <talltyler> (Iโ€™m bored at my in-laws for the holidays :P)
03:47:12 *** debdog has joined #openttd
03:49:46 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:36:54 *** keikoz has joined #openttd
06:03:35 *** TinoDidriksen has quit IRC (Read error: Connection reset by peer)
06:03:53 *** TinoDidriksen has joined #openttd
06:04:33 *** TinoDidriksen is now known as Guest11399
06:23:55 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:02:57 *** keikoz has joined #openttd
07:30:38 *** tokai has joined #openttd
07:30:38 *** ChanServ sets mode: +v tokai
07:33:19 *** nielsm has joined #openttd
07:37:21 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
08:37:45 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1187675333537841182/image.png?ex=6597bfd9&is=65854ad9&hm=e51fb963bc9c42bb978f590e56a4a1b65c92e88a614f43e0d15fc36bd7a47b8b&
08:37:45 <andythenorth> do we have any way to place houses, or do I need to roundtrip to the scenario editor?
08:38:05 <andythenorth> town only had 2 buildings, and I placed a statue and an industry that replaces houses ๐Ÿ˜›
08:38:35 <merni> try "fund town growth"?
08:38:37 <peter1138> Set up a bus service in the village, that'll make it grow.
08:40:51 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11612: Change: remove sorting weights when generating a company colour https://github.com/OpenTTD/OpenTTD/pull/11612#issuecomment-1867397266
08:41:09 <truebrain> ^^ happens when I don't understand the motivation of a PR. You get a big wall of text ๐Ÿ˜›
08:43:56 <andythenorth> merni: nah, does nothing, growth rate is probably 0 if popn. is 0
08:44:06 <andythenorth> peter1138: such bus
08:44:18 <peter1138> I mean, I do have a patch for 32 colours, but they were still palette colours, so nothing really distinct.
08:44:32 <peter1138> And of course the legendary RGB colours, which is probaby old enough to vote now.
08:44:41 <truebrain> drop 8bpp? ๐Ÿ˜› ๐Ÿ˜›
08:44:54 <truebrain> the lack of constrast of most of these "extra" colours is just painful
08:45:05 <peter1138> I think even without the restrictions of a palette there's still only so many constrasting colours.
08:45:14 <truebrain> there are
08:45:21 <truebrain> (limited amounts)
08:45:32 <andythenorth> a 256 colour palette would have covered most things IMHO ๐Ÿ˜›
08:45:38 <truebrain> but our UI colouring scheme currently makes it even worse ๐Ÿ˜„
08:45:55 <truebrain> anyway, I think giving priority to a few high-constrast colours is an excellent idea
08:47:10 <andythenorth> our DOS palette is only 244 colours, plus there are some entries for animated cycles that are almost identical to non-animated colours ๐Ÿ˜›
08:47:18 <andythenorth> NewDOSPalette?
08:47:38 <truebrain> no, the argument peter1138 makes, rightfully, is that no matter your palette, there are only so many company colours you can use that have a high constrast with each other
08:47:49 <truebrain> so even in that world, prioritizing those that stand out to each other is a good move
08:47:49 <andythenorth> yes
08:48:11 <truebrain> but as I wrote in my reply, the motivation of that PR is rather unclear to me
08:48:41 <truebrain> to me, it removes something that helps players, so I am puzzled ๐Ÿ™‚
08:49:26 <peter1138> git rebase master redo-rgbcc
08:49:29 <peter1138> Do I?
08:49:39 <reldred> yes
08:49:47 <reldred> rgbcc plz und thnx
08:49:50 <truebrain> and another rabbit hole he goes!
08:49:58 <peter1138> Last commit in that branch, 3rd Jan 2023, first commit, 27th Jan 2013.
08:50:26 <peter1138> True.
08:50:32 <peter1138> I have so many unfinished tings.
08:50:35 <peter1138> And things.
08:50:38 <peter1138> But why bother eh?
08:50:47 <truebrain> because it is fun!
08:51:02 <truebrain> you get those unexpected gems like "32bpp -> 8bpp" ๐Ÿ™‚
08:51:16 <reldred> force 32bpp
08:51:21 <reldred> deprecate 8bpp
08:51:26 <truebrain> we keep voting against that idea ๐Ÿ˜›
08:51:37 <reldred> make people unreasonably mad
08:51:42 <emperorjake> What we need is the RGB CC patch
08:51:56 <emperorjake> And a randomise colour button
08:51:57 <reldred> rgbcc would be nice yes
08:52:29 <truebrain> we should allow donations on patches of peter1138, so we can see what is popular ๐Ÿ˜›
08:52:41 <reldred> take my money
08:52:49 <peter1138> Did you see my last update to that patch? Unexpected turn: supporting 8bpp transparency remaps in 32bpp mode.
08:52:54 <peter1138> (32bpp -> 8bpp)
08:53:23 <emperorjake> I think adding a random CC button would be a fairly easy and useful addition, unfortunately I have no idea how to begin coding something like that
08:53:25 <peter1138> But it means I need to rewrite it to the palette conversion/lookup is in a sensible place.
08:53:27 <reldred> I would absolutely throw money down on a patch bounty board
08:54:11 <peter1138> I should probably remove the 15 year old TODO comment actually :)
08:54:24 <truebrain> peter1138: do people want that ? (8bpp transparency remaps in 32bpp)
08:54:43 <peter1138> Why bother eh?
08:54:53 <truebrain> maybe more to the point: should that be part of that PR? ๐Ÿ˜›
08:55:08 <emperorjake> The PR I made was more of an exercise in fiddling with the code and sparking a discussion, which I think was satisfied. I should have known that removing behaviours coded by Sawyer himself wouldn't go down too well ๐Ÿ˜…
08:55:35 <peter1138> No, it should be a separate PR, I put it there because it uses the same rgb to palette index code.
08:55:38 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11602: Feature: Convert 32bpp-only sprites to 8bpp for 8bpp blitters. https://github.com/OpenTTD/OpenTTD/pull/11602#pullrequestreview-1794170370
08:55:51 <peter1138> FFS!
08:55:52 <truebrain> peter1138: ah; that makes more sense ๐Ÿ™‚
08:56:07 <truebrain> emperorjake: Mainly it seems to be fixing things in the wrong order ๐Ÿ˜›
08:56:22 <truebrain> but removing lines of code is easy: now try adding a few! ๐Ÿ˜„ ๐Ÿ™‚
09:03:08 <emperorjake> https://cdn.discordapp.com/attachments/1008473233844097104/1187681719546036275/image.png?ex=6597c5cb&is=658550cb&hm=e0c1bdf4ddd1647056eeed911e70119a1a82ebef197c4962ff960bcb2656cf7f&
09:03:08 <emperorjake> My idea looks something like this: the Random button is added to the company colours GUI and when pressed, it selects a random combination of 2 company colours where available.
09:10:45 <peter1138> 08:54 < truebrain> peter1138: do people want that ? (8bpp transparency remaps in 32bpp)
09:11:03 <peter1138> ^ that was used by MB's newstats.grf. Probably no others :D
09:11:20 <truebrain> my reasoning: it was a TODO for .. 10+ years?
09:11:21 <peter1138> But potentially others if it worked in 32bpp mode.
09:11:24 <peter1138> 15.
09:11:38 <peter1138> I didn't scratch anyone's itch.
09:11:41 <peter1138> *It
09:11:42 <peter1138> lol
09:11:46 <DorpsGek> [OpenTTD/OpenTTD] EmperorJake closed pull request #11612: Change: remove sorting weights when generating a company colour https://github.com/OpenTTD/OpenTTD/pull/11612
09:11:49 <DorpsGek> [OpenTTD/OpenTTD] EmperorJake commented on pull request #11612: Change: remove sorting weights when generating a company colour https://github.com/OpenTTD/OpenTTD/pull/11612#issuecomment-1867433573
09:12:06 <truebrain> no, okay; I am still fine with a PR to add it btw
09:12:13 <truebrain> was just wondering if there was an active demand/request for it
09:13:04 <peter1138> 21:15 < locosage> though iirc there was some recoloring thing in newgrf format that only 8bpp-simple supported
09:13:24 <peter1138> locosage mentioned it, and I realised it would be simple with the stuff I already had :)
09:13:42 <truebrain> why do we have `yr` in text ... was adding the `ea` so much effort? Odd .. (reviewing a PR about real-time units)
09:14:00 <truebrain> peter1138: that is how we build most things, not? Because we can! ๐Ÿ˜„
09:15:45 <peter1138> emperorjake, does every addon set use "2cc" mode these days?
09:16:58 <peter1138> emperorjake, maybe you could look at setting the initial second cc of a new company to a different random colour.
09:17:42 <peter1138> Hmm. Splitting code = adding more includes :O
09:17:44 <truebrain> maybe we should redo the whole CC, and unlink the colour used in the interface from the colours used on the vehicles?
09:18:01 <peter1138> What do you mean?
09:18:03 <emperorjake> I can't think of any recent NewGRF that uses purely 1CC mode. In JP+ Engines, I use a mixture as some of the real liveries required the CC green, but I'm fixing that with 32bpp and/or variants ๐Ÿ™‚
09:18:22 <peter1138> Interface colours aren't the same as company colours already.
09:18:30 <peter1138> (But grey is grey)
09:18:37 <emperorjake> NewCC set affects the colours of some windows
09:19:43 <peter1138> Hmm. oh yes, they are initialized via the palette remaps, so I guess they are the same.
09:20:00 <truebrain> I never actually understood NewGRFs and CC; I also can never remember where to find the interface to change colours ๐Ÿ˜›
09:20:04 <peter1138> We have so many colour systems it's confusing :)
09:20:07 <truebrain> yes
09:20:31 <truebrain> But we have a company colour we use in the interface, on minimap, graphs, etc
09:20:39 <truebrain> and we use that colour primary for vehicles too
09:22:06 <peter1138> By default yes. That's... pretty much the point of company colours, no?
09:22:21 <truebrain> kinda; I am now actually trying to have my vehicles another colour than my company colour
09:22:23 <truebrain> and I fail ๐Ÿ˜›
09:22:25 <truebrain> I guess that is not possible
09:22:31 <truebrain> that interface is so incredibly unclear to me ๐Ÿ˜ฆ
09:22:46 <peter1138> It is entirely possible.
09:22:55 <truebrain> owh, holy crap
09:22:58 <truebrain> you first have to select an entry
09:23:03 <truebrain> than you can change it by the dropdown in the top?!
09:23:05 <truebrain> what the hell
09:23:10 <peter1138> Yup.
09:23:11 <truebrain> does anyone actually figure out how to use that?
09:23:27 <truebrain> only because you said it was possible, that I was clicking around more ... agressively
09:23:31 <truebrain> to figure out how that actually works
09:23:35 <peter1138> It's a weird UI, but it lets you change multiple rows at once. With the hidden ctrl-click.
09:23:38 <truebrain> sorry, but this is horrible UX. Sorry to who-ever wrote it ๐Ÿ˜ฆ
09:23:48 <peter1138> Thanks.
09:23:51 <truebrain> sorry ๐Ÿ˜ฆ
09:24:04 <truebrain> it really is entirely unclear that is how it is suppose to work
09:24:19 <andythenorth> It makes complete sense
09:24:19 <truebrain> hihi, multiselect always picks the first colour
09:24:23 <andythenorth> you just have to check boxes
09:24:27 <andythenorth> like no UI ever I've seen
09:24:39 <truebrain> what would help, I think, is if the dropdown is at the bottom
09:24:40 <truebrain> not at the top
09:24:59 <truebrain> as it now feels like a filter
09:25:01 <truebrain> like most other windows
09:25:09 <peter1138> andythenorth, do you even look at it?
09:25:19 <andythenorth> I have learnt not to see it
09:25:28 <peter1138> andythenorth, those boxes haven't existed for years.
09:25:33 <andythenorth> I just set 'red and white' at the start of the game and run away
09:25:37 <truebrain> why are there two "Show train color schemes" in that window?
09:26:06 <andythenorth> oh yes, the checkboxes are gone visually ๐Ÿ™‚
09:26:08 <andythenorth> I see
09:26:31 <truebrain> hmm .. guess they are NewGRF related?
09:26:48 <peter1138> You mean two columns of colours?
09:26:49 <truebrain> or did someone reuse the tooltip while it has a different function? ๐Ÿ˜„
09:26:56 <andythenorth> screenshots ๐Ÿ˜›
09:27:01 <peter1138> Oh. Yes :)
09:27:13 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1187687780415967252/image.png?ex=6597cb71&is=65855671&hm=505da3dc53017d72949f1b5f36a5fa5bc80a0658e3d7679b4f86374c8b74a165&
09:27:13 <andythenorth> we mean this?
09:27:14 <peter1138> The second set are for vehicle groups.
09:27:16 <truebrain> https://cdn.discordapp.com/attachments/1008473233844097104/1187687792214540329/image.png?ex=6597cb73&is=65855673&hm=8892e1a23c232badd3e28d496f0c15cc9dc984c75a0cf42586bb16729e226a3b&
09:27:20 <truebrain> these two buttons have the same tooltip
09:27:24 <truebrain> but the second one gives an empty list
09:27:34 <peter1138> Yeah, fucking idiot coder. Why bother.
09:27:46 <truebrain> well, at least we know who wrote it ๐Ÿ˜„
09:27:53 <truebrain> vehicle groups, ah, that makes sense ๐Ÿ™‚
09:27:54 <andythenorth> who reviewed it? ๐Ÿ˜›
09:28:01 <andythenorth> who tested the PR?
09:28:05 <andythenorth> oops
09:28:12 <emperorjake> peter1138: omg, you can do that? ๐Ÿ˜ฎ Still learning things...
09:28:26 <andythenorth> oof ctrl-click is multi-select ๐Ÿ˜ฎ
09:28:31 <truebrain> ah, yeah, okay, when I make a group, things show up. That is nice, so I can colour groups ๐Ÿ˜„
09:28:37 <andythenorth> EDIASD
09:29:01 <truebrain> okay peter1138, I take by my suggestion .. you basically did exactly what I was suggesting ๐Ÿ˜„
09:29:41 <emperorjake> Group colours are one of the best things ever. I used to have to make whole separate companies to acheive the same effect
09:29:56 <truebrain> yeah, we just need to fix the tooltip ๐Ÿ™‚
09:30:06 <truebrain> easy fix!
09:30:07 <peter1138> Okay, so improvements to that window: 1) move the dropdowns to the bottom so they look like actions not filters. 2) fix the tooltips for groups 3) maybe should some explanation text when you go to groups and have none.
09:30:22 <truebrain> owh, 3 would be excellent, yes
09:30:47 <truebrain> okay, I now really like this window; that gives colour to your game ๐Ÿ˜„
09:33:04 <truebrain> should we add, next to the "Standard Livery", a "Company Colour" of sorts? To control the colour used in minimap and graphs etc?
09:33:14 <truebrain> as I might want all my vehicles to look purple
09:33:17 <truebrain> but be red on the minimap?
09:33:55 <truebrain> hmm, one other thing that is a bit confusing that might be easily solved: "Standard Livery" sets the "Default" colour
09:34:02 <truebrain> should we call it "Default Livery" instead?
09:34:10 <emperorjake> Wouldn't that get too confusing, as the purpose of CC is to tell players apart? Nothing stopping someone from already doing that manually though
09:34:26 <truebrain> exactly; you can already do it, but takes a lot of clicking ๐Ÿ™‚
09:35:22 <emperorjake> Infrastructure like rail fences and stations etc. would still follow the main company colour
09:35:52 <emperorjake> but there was discussion on Discord channel #jgr-patch-pack not long ago about adding CC options for stations and objects separately
09:36:09 <truebrain> lol, I can even imagine people want to colour each station differently ๐Ÿ™‚
09:36:32 <peter1138> truebrain, people want to colour industries differently... and they don't even own them.
09:36:38 <truebrain> I also think there should be a charge to changing colour ๐Ÿ˜›
09:36:42 <truebrain> repainting takes effort!
09:37:16 <truebrain> anyway, I was reviewing a patch ๐Ÿ˜›
09:37:18 <emperorjake> I've suggested it before, how about a paintbrush tool like in RollerCoaster Tycoon ๐Ÿ˜›
09:37:46 <peter1138> I've never got into RCT. What does that do?
09:38:14 <truebrain> honestly, it is a bit odd, that we do allow groups to have different colours, but that you can't set the colour of your individual station ๐Ÿ˜„ But I guess it is mostly because nobody did it, more than any principle issue ๐Ÿ˜›
09:39:16 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11341: Feature: Use real-time units https://github.com/OpenTTD/OpenTTD/pull/11341#pullrequestreview-1794174208
09:39:16 *** Guest11399 is now known as TinoDidriksen
09:39:39 <peter1138> There's also the problem that adding arbitrary 'livery' sections requires a savegame bump, and UI work to make sure it goes in the right place.
09:39:53 <peter1138> (That window was designed in pre-C++-awakening.)
09:40:08 <emperorjake> https://cdn.discordapp.com/attachments/1008473233844097104/1187691033522352148/image.png?ex=6597ce78&is=65855978&hm=b0f54f2a26b0b7019bcdef1a8ca48ba51a5aac840f9bb6d83b6c6e56b9a45693&
09:40:08 <emperorjake> It's a bit clunky but you can repaint individual vehicles and sections of track. From the scenery menu you can also recolour and repaint individual scenery objects
09:40:16 <truebrain> I read emperorjake is looking for more C++ work, so ... ๐Ÿ˜›
09:40:24 <locosage> there is also a bit of a problem in mp when people start using colors of other companies
09:41:09 <peter1138> Okay so now we need to reserve map bits for company colours too :D
09:41:16 <truebrain> yes!
09:41:20 <truebrain> newmap when?
09:42:37 <peter1138> 4 bits for 1cc, 8 bits for 2cc -- but not quite.
09:42:49 <peter1138> There are 16 colours so that leaves no room for 'default'.
09:42:51 <truebrain> 16 colours isn't enough!
09:42:55 <peter1138> Quite.
09:43:02 <truebrain> so 24bit for 1cc, 48bit for 2cc!
09:43:08 <truebrain> ๐Ÿ˜„
09:43:23 <truebrain> just imagine the bug-report .. "OpenTTD uses twice as much memory as before!!!!!!!"
09:43:28 <peter1138> static uint48_t map_colour[MAP_SIZE]
09:43:31 <peter1138> Hell yeah.
09:43:37 <peter1138> truebrain, you know what... nobody would notice.
09:43:50 <peter1138> We use so little memory compared to modern games...
09:44:01 <truebrain> that one person will notice ๐Ÿ˜›
09:44:13 <peter1138> Someone running it on a 256MB Raspberry Pi...
09:44:15 <truebrain> but yeah, we are VERY picky with memory, for no real good reason ๐Ÿ™‚
09:44:20 <locosage> 32bpp for shady companies ;)
09:44:31 <truebrain> no need for `map_colour` to be allocated on a dedicated server!
09:45:04 <peter1138> truebrain, ah, so colours are not synchronized between clients.
09:45:17 <truebrain> oops
09:52:11 <reldred> openttd doesn't use anywhere near enough memory, I'm generating a 2k x 8k map atm in jgrpp and not even tipping 400MB of ram.
09:52:21 <reldred> use more plz
09:52:32 <truebrain> increase your sprite-cache
09:52:39 <truebrain> ๐Ÿ˜›
09:53:09 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11428: Feature: Setting to control calendar progress speed https://github.com/OpenTTD/OpenTTD/pull/11428#pullrequestreview-1794233769
09:55:21 <reldred> openttd also doesn't use enough cpu, just, I dunno, run a small crypto miner or something to bump it up a little and pad out the beverage fund
09:55:33 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11428: Feature: Setting to control calendar progress speed https://github.com/OpenTTD/OpenTTD/pull/11428#issuecomment-1867479626
09:57:00 <reldred> ooh, no, I got it to 416MB of ram.
10:03:51 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #10543: Feature: Region-based pathfinder for ships (no more buoys!) https://github.com/OpenTTD/OpenTTD/pull/10543#pullrequestreview-1794247225
10:05:00 <truebrain> well, that PR is not far from being complete, that is nice ๐Ÿ™‚
10:05:47 <truebrain> I think that concludes my list of things I promised to do ๐Ÿ˜›
10:07:56 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1187698025896878123/image.png?ex=6597d4fb&is=65855ffb&hm=ab2a588f915633480011efd822b5b2a5fea141107c9c0857c2e4416be1697d0e&
10:07:56 <peter1138[d]> Oops.
10:08:08 <truebrain> what are we looking at?
10:08:50 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1187698252380909578/image.png?ex=6597d531&is=65856031&hm=f3232b5a01d6b1c3f2e3b0bfe5b48f6642b4369c32fb00b1490abe32e46f3a7f&
10:08:50 <peter1138[d]> Default baseset
10:09:24 <peter1138> Something is being sized wierdly :)
10:09:53 <truebrain> owh boy
10:10:32 <peter1138> Literally unplayable.
10:10:57 <peter1138> I'm guessing the DHCP server is returning the wrong value.
10:13:56 <truebrain> lol
10:57:14 <DorpsGek> [OpenTTD/OpenTTD] George-VB opened issue #11613: [Bug]: Wrong liveries list for trains https://github.com/OpenTTD/OpenTTD/issues/11613
10:58:17 <emperorjake> I think that only works if the liveries are also in the same position on the list
11:13:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on issue #11613: [Bug]: Wrong liveries list for trains https://github.com/OpenTTD/OpenTTD/issues/11613
11:24:59 <georgevb> emperorjake: They both are located on ID 30
11:34:43 *** fairyflossy has joined #openttd
11:34:43 <fairyflossy> Yeah but one has more entries before it than the other, I think that's the issue? Can't talk about the technical side of fixing it, though
11:35:43 <_zephyris> peter1138[d]: Hmm. My fault?
11:37:29 <peter1138> _zephyris, don't think so. I don't know why the row height is smaller, but if things overflow it's generally OpenTTD's fault.
11:37:56 <peter1138> IIRC I think in this case it just doesn't check that the row is tall enough for the sprites because by default it is.
11:38:01 <peter1138> So, it's me being lazy.
11:58:21 <_zephyris> Must be the profit/loss indicator. Pretty sure I made that the same size though.
11:59:01 <LordAro> offsets might be buggy, but OTTD shouldn't display it like that either
12:00:10 <peter1138> The row itself is a different height, which is odd as that is determined by some other bounding boxes.
12:11:03 <_zephyris> On another note, all this chat about 2CC reminds me that 2CC for base set vehicles would be nice...
12:11:34 <peter1138> Needs a way to turn it on...
12:12:16 <peter1138> Someone probably mentions station 2cc too.
12:12:44 <peter1138> Anything-company-built-2cc
12:16:08 <_zephyris> Yup
12:16:33 <peter1138> Imagine if it was encoded into the sprite data itself...
12:16:36 <_zephyris> I poked at adding 2CC to stations. Naively thought it'd be easy.
12:17:52 <peter1138> Resolve Sprite. if sprite has 2cc flag, apply 2cc remap else apply 1cc remap.
12:18:04 <peter1138> That would almost be sensible...
12:18:39 <peter1138> Although it would make detecting enabling 2cc awkward.
12:23:47 <DorpsGek> [OpenTTD/OpenTTD] Darragh-Hazell opened pull request #11614: Fix #11442: "default" colour in group colour window is not updated when changing master colour https://github.com/OpenTTD/OpenTTD/pull/11614
12:25:37 <xarick> That CircularTileSearch from OpenTTD is a nice little treasure. So much complexity compressed into a tiny piece of code
12:26:17 <xarick> I'm extending it with a few improvements
12:26:47 <xarick> and it's been magical, that I didn't have to add that much more to it to make it work more efficiently
12:33:45 <xarick> https://gist.github.com/SamuXarick/9e472be2364b3322b47d6d346d90ef3f
12:34:54 <xarick> What's still missing is: I need to limit distance_outer to the minimum required so that the last radius is inside the map, cut the excess radius that is
13:15:50 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11428: Feature: Setting to control calendar progress speed https://github.com/OpenTTD/OpenTTD/pull/11428#issuecomment-1867676145
13:53:05 <DorpsGek> [OpenTTD/OpenTTD] twpol updated pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342
13:56:13 <DorpsGek> [OpenTTD/OpenTTD] twpol commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#issuecomment-1867716944
13:58:09 <peter1138> andythenorth, per-company fog-of-'war'?
13:59:30 <_glx_> good luck to find 16 free bits in all tiles
13:59:45 <peter1138> That's easy. Just add 16 more bits.
14:00:30 <peter1138> (Pretty sure it is a bad idea :))
14:01:01 <_glx_> I'm thinking about replacing the "tabs" in script debug with a dropdown
14:05:23 <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#issuecomment-1867726096
14:11:31 <DorpsGek> [OpenTTD/OpenTTD] twpol updated pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342
14:15:42 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#issuecomment-1867737205
14:23:14 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #11548: Fix #10511: Delay 'go to nearest depot' orders https://github.com/OpenTTD/OpenTTD/pull/11548#pullrequestreview-1794558115
14:26:24 <DorpsGek> [OpenTTD/OpenTTD] twpol commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#pullrequestreview-1794561890
14:27:37 <DorpsGek> [OpenTTD/OpenTTD] twpol commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#pullrequestreview-1794563370
14:30:42 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
14:34:01 <DorpsGek> [OpenTTD/OpenTTD] twpol updated pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342
14:34:20 <DorpsGek> [OpenTTD/OpenTTD] twpol commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#issuecomment-1867755792
14:34:30 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11548: Fix #10511: Delay 'go to nearest depot' orders https://github.com/OpenTTD/OpenTTD/pull/11548#pullrequestreview-1794571404
14:37:06 <andythenorth> peter1138: yup
14:38:22 <peter1138> Then up the company limit to 255 and have an extra 256 bits in the array. That's only 32 bytes!
14:38:44 <peter1138> 512MiB for the largest map :)
14:41:05 *** rau117 has quit IRC (Quit: User went offline on Discord a while ago)
14:46:55 <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#pullrequestreview-1794586115
14:50:01 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #11614: Fix #11442: "default" colour in group colour window is not updated when changing master colour https://github.com/OpenTTD/OpenTTD/pull/11614#pullrequestreview-1794592502
14:50:51 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#pullrequestreview-1794593417
14:55:19 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11615: Fix #11515: Zoom level could wrap around when changing interface scale. https://github.com/OpenTTD/OpenTTD/pull/11615
14:57:32 <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#pullrequestreview-1794601175
14:58:12 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11615: Fix #11515: Zoom level could wrap around when changing interface scale. https://github.com/OpenTTD/OpenTTD/pull/11615#pullrequestreview-1794601953
15:01:42 <xarick> uhm, I have a question
15:02:02 <xarick> TimerGameCalendar::date_fract vs TimerGameTick::counter
15:02:02 <peter1138> Uh oh.
15:02:16 <xarick> what's the difference, how do I know which one to use
15:02:31 <peter1138> date_fract is tick within the date.
15:02:42 <peter1138> So it is already limited to DAY_TICKS.
15:03:26 <peter1138> Okay, I can bolt non-SSE code into the SSE blitters...
15:05:00 <peter1138> (The palette lookup is probably slow enough to not care anyway.)
15:05:25 *** virtualrandomnumber has joined #openttd
15:06:26 <talltyler> date_fract counts up to DAY_TICKS and then gets reset to 0 when the date changes. Counter counts up forever and is never reset.
15:08:02 <xarick> hmm, seems TimerGameTick::counter is the one to use
15:08:26 *** virtualrandomnumber has quit IRC ()
15:08:29 <xarick> unless...
15:08:36 <xarick> I'm missing the point
15:09:15 <xarick> if it resets the same manner as day_ticks, I don't see the difference
15:09:34 <xarick> ah, nevermind, the % 74 is ommited
15:10:57 <xarick> okay, it's starting to make sense in my head
15:11:56 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#pullrequestreview-1794617566
15:12:20 <DorpsGek> [OpenTTD/OpenTTD] twpol commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#pullrequestreview-1794618022
15:17:13 <Rubidium> peter1138: regarding 2CC in base sets, is it naive of me to think that a field in the obg file would be enough to enable it for *all* applicable sprites? Then it's up to the author(s) of the base set to either us all 2CC or all 1CC, but there is at least a choice
15:17:29 <locosage> hm, I just thought that alternative to autoseparation might be some kind of "load until full or other vehicle arrives" order
15:18:24 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #11548: Fix #10511: Delay 'go to nearest depot' orders https://github.com/OpenTTD/OpenTTD/pull/11548
15:22:29 <merni> locosage: how would that be an alternative? in passenger transport you don't really need a vehicle at the station at all times, but it is still useful to have them arriving at regular intervals
15:23:46 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11615: Fix #11515: Zoom level could wrap around when changing interface scale. https://github.com/OpenTTD/OpenTTD/pull/11615
15:23:49 <DorpsGek> [OpenTTD/OpenTTD] PeterN closed issue #11515: [Bug]: Changing interface size can have weird effects on current zoom https://github.com/OpenTTD/OpenTTD/issues/11515
15:31:05 <locosage> merni: because that won't make them group up like load if available does and it's always good to gave vehicle loading to keep station ratings
15:31:28 <merni> > it's always good to gave vehicle loading to keep station ratings
15:31:28 <merni> That's not the only goal which autoseparate achieves though
15:32:23 <DorpsGek> [OpenTTD/OpenTTD] twpol commented on pull request #8342: Feature #8095: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#issuecomment-1867818309
15:32:49 <merni> Having trains always loading also blocks up tracks and requires more trains on a longish passenger line than would otherwise be necessary
15:34:20 <merni> also when was the last time you saw a passenger station other than a city centre hub that *always* had a train there
15:34:43 <locosage> anyway it's an alternative to autoseparation because it separates vehicles
15:34:52 <locosage> keeping vehicles at stations I see as an advantage
15:35:17 <merni> locosage: so do manual timetables then
15:35:41 <merni> but we aren't arguing autoseparate is unnecessary because you can always do manual timetables instead
15:35:43 <locosage> timetables are a waste of time
15:36:10 <merni> and keeping a train always loading (or more than one if traffic flows in many directions) is a waste of space and trains
15:36:51 <_jgr_> It really depends on what quantity you're trying to optimise for
15:36:59 <merni> ^
15:37:00 <locosage> keeping a train loading is like openttd 101
15:37:28 <merni> locosage: for freight or non-cargodist pax where realism is not important, *perhaps*
15:37:35 <_jgr_> Not everyone cares about appeasing the station ratings algorithm
15:39:19 <locosage> well, I'll take gameplay-based separation over eyecandy one :p
15:42:52 <merni> That's up to you but autoseparation as implemented in jgrpp and in this pr are not "eyecandy", they ensure a fixed interval between vehicles which is both "gameplay based" and "efficient" (in that it requires fewer trains and tracks than keeping a train waiting at all stations at all times)
15:43:20 <_jgr_> The auto-separation in my branch is not like this PR, they're not directly comparable
15:44:12 <merni> Their effect seems to be rather similar though since they are both based on time intervals between vehicles, no?
15:46:33 <_jgr_> Mostly yes, though the separation is applied at all stations, not just one per order list
16:02:31 *** Wormnest has joined #openttd
16:09:41 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11616: Change: Support custom transparent palette remaps. https://github.com/OpenTTD/OpenTTD/pull/11616
16:11:32 <peter1138> But why bother righg?
16:12:43 <LordAro> nice.
16:13:31 <LordAro> don't suppose you've done any benchmarking?
16:13:44 <DorpsGek> [OpenTTD/OpenTTD] twpol updated pull request #8342: Feature: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342
16:13:50 <LordAro> could be interesting to know if adding a load of ifs to the blitters makes any notable impact
16:14:43 <peter1138> No I have not. It is at least added out as far as possible.
16:16:43 <peter1138> It could templated out I suppose.
16:16:50 <peter1138> (Like BlitterMode is)
16:25:21 <locosage> your use of color distance seems wrong
16:25:46 <locosage> since you're using non-smooth distance you're basically calculating some colors with one distance formula and some with another
16:26:40 <locosage> and then compare them to find "best"
16:29:12 <locosage> also variable declaration inside of if condition for some reason...
16:34:05 <locosage> _palette_lookup can probably be pre-calculated...
16:38:31 <DorpsGek> [OpenTTD/OpenTTD] twpol commented on pull request #8342: Feature: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#issuecomment-1867879459
16:39:51 <DorpsGek> [OpenTTD/OpenTTD] twpol updated pull request #8342: Feature: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342
16:56:13 <DorpsGek> [OpenTTD/OpenTTD] glx22 merged pull request #11614: Fix #11442: "default" colour in group colour window is not updated when changing master colour https://github.com/OpenTTD/OpenTTD/pull/11614
16:56:16 <DorpsGek> [OpenTTD/OpenTTD] glx22 closed issue #11442: [Bug]: "default" colour in group colour window is not updated when changing master colour https://github.com/OpenTTD/OpenTTD/issues/11442
17:06:09 <peter1138> It's not wrong but perhaps needs a note that col1 should be a palette colour. col2 is bitcrushed precisely so that order of colour lookup does not affect the result.
17:08:25 <peter1138> Anwyay, I think I'll do the template specialization.
17:18:53 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #8342: Feature: Allow automatically separating vehicles in shared orders https://github.com/OpenTTD/OpenTTD/pull/8342#issuecomment-1867914278
17:20:34 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11616: Change: Support custom transparent palette remaps. https://github.com/OpenTTD/OpenTTD/pull/11616
17:20:49 <peter1138> LordAro, no longer adding a bunch of ifs :)
17:21:52 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11548: Fix #10511: Delay 'go to nearest depot' orders https://github.com/OpenTTD/OpenTTD/pull/11548#issuecomment-1867916697
17:21:56 <locosage> wrong is comparing distances from two different formulas
17:22:08 <peter1138> There's only one formula.
17:22:12 <locosage> very similar colors can have very different distances like that
17:22:16 <locosage> (128, 0, 0) - (128, 0, 255) : 130050
17:22:16 <locosage> (127, 0, 0) - (127, 0, 255) : 195075
17:22:42 <locosage> there is ternary in CalculateColourDistance that chooses the formula
17:24:26 <locosage> that wiki page you linked even has a smoothened formula to avoid this issue
17:27:58 <locosage> example with the same color:
17:27:58 <locosage> (128, 0, 0) - (129, 0, 155) : 48053
17:27:58 <locosage> (128, 0, 0) - (127, 0, 127) : 48389
17:28:19 <locosage> here it would pick (129, 0, 155) over (127, 0, 127)
17:28:32 <locosage> trading 1 in red for 30 in blue
17:29:45 <locosage> well, not even trading, they both differ by 1 in red
17:30:53 <LordAro> peter1138: :)
17:31:11 *** giords[m] has quit IRC (Quit: Client limit exceeded: 20000)
17:32:13 <locosage> even more exaggerated example would be picking (129, 0, 255) over (127, 0, 209) as closest to (128, 0, 0)
17:35:10 <peter1138> There is a bigger problem.
17:35:59 <peter1138> The reshade stuff (which isn't actually used here), is incorrect cached.
17:37:40 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1187811206648578158/Screenshot_from_2023-12-22_23-06-31.png?ex=65983e64&is=6585c964&hm=19ac18d3d194c78d04c8689de06d8a54da2f97d1e1a075cdc7a6732472d92d9e&
17:37:40 <locosage> locosage: though looking at the image it's hard to tell which is closer xD
17:37:41 <peter1138> +ly
17:40:44 <peter1138> I think reshade can be separate lookup, it does not need to handle colour, only brightness.
17:40:49 *** Hanicef has joined #openttd
17:43:14 <peter1138> Hmm, not sure now.
17:44:15 <locosage> also, if I understood it right I'd expert reshading involve AdjustBrightness at some point
17:44:35 <peter1138> It does, but that isn't used here so I didn't pull it in.
17:45:53 <peter1138> The rest of "support 32bpp in 8bpp mode" is not included here.
17:50:24 <peter1138> Just going to remove the shade stuff for now, if the patch needs it it can add it.
17:52:34 <peter1138> ~600 ms to precalculate.
17:53:43 <peter1138> Although that is in debug mode.
17:54:11 <peter1138> 77 ms if I reduce the bits to 5.
17:54:35 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #11548: Fix #10511: Delay 'go to nearest depot' orders https://github.com/OpenTTD/OpenTTD/pull/11548#issuecomment-1867940580
17:54:44 <peter1138> int avgr = (col1.r + col2.r) / 2;
17:54:45 <peter1138> int r2 = ((2 + (avgr / 256)) * r * r) + (4 * g * g) + ((2 + ((255 - avgr) / 256)) * b * b);
17:55:38 <peter1138> The other equation is considerably faster.
17:56:20 <peter1138> 400ms for the other formula.
17:56:28 <locosage> can just add the whole array as constant
17:56:40 <locosage> 256kb to executable size though I guess
17:56:56 <peter1138> Well, perhaps.
17:57:10 <locosage> double that with reshading I guess
17:57:18 <peter1138> Does NewGRF support 256KiB data chunks? :D
17:58:38 <peter1138> Hmm, probably reshade can be done with just 1 channel.
17:58:51 <locosage> peter1138: avgr / 256 seems wrong
17:58:54 <peter1138> As the remap is always blue
17:58:55 <locosage> it will round in integers
17:59:26 <locosage> to 0 xD
18:00:49 <peter1138> 256.0
18:00:57 <peter1138> That is quicker o_O
18:02:16 <peter1138> Probably the formula has some special meaning that I've taken literally.
18:03:38 <locosage> it just blends those two formulas in the if
18:03:58 *** wallabra has quit IRC (Quit: Bowserinator is wrong don't blame iczero)
18:04:02 <locosage> on avgr = 0 one is used on 255 another, and weighted avg in between
18:04:21 *** wallabra has joined #openttd
18:04:58 <locosage> though idk why it divides by 256, should be 255
18:05:39 <locosage> close enough I guess xD
18:06:08 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1187818370909880350/image.png?ex=65984510&is=6585d010&hm=17d9afde0c56af103a3667948e2ecda7615ce4a23cb695b842b527c7a485e4cc&
18:06:08 <xarick> Hmm... needs more improvements
18:06:54 <xarick> CircularTileSearch is still not at the level of AreTilesQueued
18:09:40 <peter1138> https://metacpan.org/pod/Color::RGB::Util#rgb_diff
18:11:30 <peter1138> Unweighted isn't that terrible to be honest.
18:11:37 <peter1138> (r*r + g*g + b*b)
18:12:08 <locosage> that's just naive euclidean distance
18:12:15 <peter1138> Of course I'm only testing with the green tint so there's not a lot of options :)
18:12:41 <peter1138> Hmm, let's see if I disable the non-custom transparent mode.
18:12:49 <locosage> when I tested recolors for town zones I found redmean to be noticeably better
18:13:00 <locosage> not much but noticeably
18:15:10 <peter1138> 286ms for the naive calculation.
18:17:16 <locosage> I think dropping bits would have less impact than worse distance formula
18:18:01 <locosage> bits just mess close colors where formula shifts the whole color space
18:21:23 <locosage> try writing it like this btw: <https://github.com/citymania-org/cmclient/blob/master/src/blitter/32bpp_base.hpp#L195>
18:21:53 <locosage> and rmean without /2
18:24:17 <xarick> AreTilesQueued jumps to the exact coordinate of the first tile that is sure to be inside the map for each of the 4 sides, and starts iterating these tiles one by one until it reaches the other end of the segment inside the map. If the remaining tiles for that side are outside the map, it skips to the next side. If an entire side is outside the map, it skips the entire side. If entire rings of
18:24:17 <xarick> sides are outside the map, they are just skipped. CircularTileQueue on the other hand is still doing minimal tile by tile steps for those outside the map for each side. It has only just got a limit to the number of rings, so that the last ring it starts to will have at least some tiles inside the map.
18:25:51 <xarick> AreTilesQueued works from the outside to the inside, CircularTileQueue works from the inside to the outside
18:27:00 <peter1138> I need to pull in the 32bpp-to-8bpp changes to verify the results
18:27:49 <xarick> RectangleQueue is just very basic. It's slapping 2 rectangles inside the map. The tiles that remain from the difference of those two rectangles are just added to a list that will be then iterated via TileIndex order.
18:28:10 <xarick> Unelegant
18:31:03 <locosage> hm, I wonder how it choses colors for cc
18:31:17 <locosage> because I just remembered that _colour_gradient array is wrong
18:31:24 <locosage> it only uses 7 colors out of 8
18:35:01 <peter1138> _colour_gradient is for UI colours.
18:35:17 <locosage> yeah, but it's filled from recolor sprites
18:36:04 <peter1138> So?
18:36:35 <locosage> so I'm trying to figure out why cc recolors work))
18:36:56 <peter1138> 1) All of _colour_gradient is fill, not just 7 colours.
18:37:02 <locosage> when gradient taken from them is not
18:37:05 <peter1138> 2) _colour_gradient has nothing to do with cc recolours.
18:37:43 <locosage> all is filled not all is right: <https://pastebin.com/fc2yQcNd>
18:39:56 <peter1138> Oh, fair. Answer to that is that index 0 is never used.
18:40:37 <xarick> why use pastebin and not gist.gisthub.com
18:41:00 <xarick> it has so many ads
18:41:08 <peter1138> _colour_remap_ptr = GetNonSprite(pal, SpriteType::Recolour) + 1;
18:41:14 <peter1138> const byte *b = GetNonSprite(PALETTE_RECOLOUR_START + i, SpriteType::Recolour);
18:41:22 <peter1138> That + 1 is missing, so...
18:41:44 <peter1138> C6 there is actually C5.
18:42:36 <locosage> yeah
18:42:54 <locosage> I even tried adding it back at some point but didn't particularly like the result
18:43:03 <locosage> so may even be intentionaly
18:43:04 <peter1138> No it's washed out.
18:43:51 <peter1138> TTD bugs eh?
18:44:09 <peter1138> The lack of +1 and then shifting the offsets by one.
18:44:20 <peter1138> I'm sure the final colours are correct and intentional.
18:44:47 <peter1138> But that still has nothing to do with CC recolours :)
18:46:39 <locosage> well, it has, but error isn't in recolors
18:47:47 <locosage> and I'm doing is just trying to get the list of company colors xD
18:48:18 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1187828982947778671/image.png?ex=65984ef2&is=6585d9f2&hm=40339b711671a4eeb4e49a42f0217eb2d7b339b6b5b5f92512453551a5fc439d&
18:48:18 <xarick> look at that excess!
18:49:17 <xarick> it's a 64x4096 map
19:03:25 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11548: Fix #10511: Delay 'go to nearest depot' orders https://github.com/OpenTTD/OpenTTD/pull/11548#pullrequestreview-1794867550
20:02:42 *** TinoDid|znc has joined #openttd
20:02:47 <xarick> is it possible to create a table of functions in squirrel
20:02:51 *** TinoDidriksen has quit IRC (Ping timeout: 480 seconds)
20:03:04 <xarick> access it like an array
20:03:07 *** TinoDid|znc is now known as TinoDidriksen
20:13:02 <andythenorth> Almost everything in squirrel is actually a table slot
20:13:37 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1187850453908738048/image.png?ex=659862f1&is=6585edf1&hm=3d9557adf04b8c684d6a0be0bc74ce620f7f6a604db5123b6816be24a4f25f63&
20:13:42 <peter1138> Not quite the right shade.
20:13:47 <andythenorth> You wouldnโ€™t array access functions though that might be weird; you want slots
20:15:55 <andythenorth> I use singleton classes to namespace squirrel functions https://github.com/andythenorth/firs/blob/gs-is-real/src/gs/vulcan/industry_control.pynut
20:16:21 <andythenorth> language is a bit weird, so you can do all kinds of stuff, also with bonus weird syntax
20:21:58 <xarick> > ` local is_inside = [
20:21:58 <xarick> > function(x, y) { return x >= _min_x; }, // DIAGDIR_NE
20:21:58 <xarick> > function(x, y) { return y <= _max_y; }, // DIAGDIR_SE
20:21:58 <xarick> > function(x, y) { return x <= _max_x; }, // DIAGDIR_SW
20:21:58 <xarick> > function(x, y) { return y >= _min_y; } // DIAGDIR_NW
20:22:00 <xarick> > ];`
20:22:00 <xarick> >
20:22:02 <xarick> > ` if (!is_inside[dir](x, y)) {
20:22:02 <xarick> > /* skip side */
20:22:04 <xarick> > }`
20:22:04 <xarick> will it work :p
20:24:53 <xarick> ah snap... the index _min_x does not exist
20:25:03 <xarick> it can't access my global variables?
20:27:14 <andythenorth> Put it in the root table? ::_min_x
20:28:11 <andythenorth> Canโ€™t remember how to actually do it ๐Ÿ˜›
20:40:26 *** Wolf01 has joined #openttd
20:41:17 <xarick> hacks! it works function(x, y, min_x = _min_x)
20:44:20 <Eddi|zuHause> accessing global variables is an antipattern
21:04:48 <Rubidium> peter1138: have you considered a constexpr/eval table? Won't that be compiled as a table in the executable, while it's being programmed. It will still be 256 kiB of table, but probably easier to maintain/check than a NewGRF blob
21:05:43 <peter1138> That sounds like a bit of magic.
21:10:47 <xarick> https://gist.github.com/SamuXarick/9e472be2364b3322b47d6d346d90ef3f#file-circulartilesearch-nut-L39-L44
21:11:00 <xarick> it works
21:11:12 <xarick> but... it introduced a bit of code repetition
21:11:53 <xarick> How do I avoid repeating
21:11:53 <xarick> > `x += tileoffs_by_diagdir[dir].x;
21:11:53 <xarick> > y += tileoffs_by_diagdir[dir].y; `
21:20:16 <peter1138> palette.cpp(59, 2): Constexpr evaluation hit maximum step limit; possible infinite loop?
21:20:19 <peter1138> Heh
21:33:03 <peter1138> I guess that's a no then :(
21:33:10 <peter1138> Or somehow optimize it more.
21:33:29 <peter1138> Split into multiple smaller tables...
21:37:04 <Rubidium> recommended constexpr limit is about 1 million full-expressions
21:37:40 <Rubidium> http://eel.is/c++draft/implimits#2.39
21:39:15 <peter1138> This is a complex lookup :)
21:40:21 <peter1138> Autogenerate a file containing every value... :D
21:49:26 <locosage> that's what I usually do xD
21:53:12 <peter1138> With the default execution limit it's not even completing the first colour component :)
21:54:36 <peter1138> It's filled in 2348 values. Somewhat less than 262144.
21:56:51 <peter1138> 3 bits works. But that's pretty bad.
21:58:11 <peter1138> Noticably wrong :)
22:02:24 <peter1138> That's interesting.
22:04:46 <peter1138> I put a TICC();TOCC(); in the constructor and... the output is displayed. While linking.
22:04:58 <peter1138> (That's no longer constexpr)
22:13:52 <peter1138> -fconstexpr-steps=100000000 Let's see :p
22:15:37 <peter1138> Still going :)
22:20:34 <peter1138> Hehe, still ran out :)
22:20:50 <xarick> OpenTTD doesn't like big tilelists...
22:20:55 <xarick> 11 GB ram in use
22:21:36 <peter1138> 52KB done.
22:21:45 <peter1138> So... 1/5th :(
22:21:53 <peter1138> 21:04 <@Rubidium> peter1138: have you considered a constexpr/eval table?
22:21:56 <peter1138> Yes but no :)
22:22:08 <andythenorth> xarick: you cached the entire map in Squirrel? ๐Ÿ˜„
22:22:15 <andythenorth> that's unwise, I tried it already
22:22:38 <xarick> can't squirrel quit faster? I am trying 'newgame 1' and I'm waiting for the whole memory to unload
22:23:16 <xarick> I assume it's squirrel and tile lists...
22:23:22 <xarick> didn't exactly confirm
22:23:51 <xarick> 4.6 GB in use, still unloading
22:24:33 <xarick> it was a 4096x4096 map
22:25:08 <xarick> I had at least 3 similar sized lists accross the 3 different tile searchers
22:25:29 <xarick> for verification of results, but yeah... unloading these takes a ton of time
22:27:27 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1187884132886401044/image.png?ex=6598824f&is=65860d4f&hm=cfd3e396960a22cbe965b66b0b51ebf04b50bdbb6c616843aaea14add709c5f7&
22:27:27 <andythenorth> hmm cargo payment rates eh
22:27:38 <andythenorth> chart is highly useful ๐Ÿ™‚
22:27:47 <andythenorth> not that I ever look at the payment rates
22:29:33 <peter1138> Hmm, now I need to ctrl-z all these changes.
22:31:41 <wensimehrp> xarick: Better than 7-zip at least. Last time I used it it took up ~57gb of my ram
22:41:45 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:52:03 <peter1138> Hmm, wonder how slow it is with release bit.
22:52:05 <peter1138> ... build
23:02:28 <peter1138> 183ms.
23:10:11 <peter1138> Hmm.
23:17:00 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:23:44 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11386: Add: Dedicated server heightmap support https://github.com/OpenTTD/OpenTTD/pull/11386#pullrequestreview-1795343288
23:24:30 *** Hanicef has quit IRC (Quit: leaving)
23:26:13 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11600: Change: Scale sprites to requested highest resolution level. https://github.com/OpenTTD/OpenTTD/pull/11600#issuecomment-1868127646
23:30:31 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11600: Change: Scale sprites to requested highest resolution level. https://github.com/OpenTTD/OpenTTD/pull/11600#issuecomment-1868128923
23:41:26 <talltyler> Zoom level setting is confusing. Bigger number == more zoom?
23:43:11 <peter1138> :)
23:43:34 <peter1138> In OpenTTD code, "Normal zoom" ZOOM_LVL_NORMAL is the largest.
23:43:48 <peter1138> And the rest at ZOOM_LVL_OUT_2X 4X 8X etc.
23:43:51 <peter1138> *are
23:44:44 <peter1138> But! In settings text it's generally referred to as 4x zoom in, 2x zoom in, 1x, 2x zoom out, 4x zoom out...
23:47:42 *** Flygon has joined #openttd
23:51:39 <talltyler> I meant the setting value (possibly an enum?). Itโ€™s hard to review the code for correctness, but I trust you to either get it right first try or fix it later if not. ๐Ÿ˜‰
23:51:52 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11600: Change: Scale sprites to requested highest resolution level. https://github.com/OpenTTD/OpenTTD/pull/11600#pullrequestreview-1795353138
23:56:49 <peter1138> Setting value is a ZoomLevel.
23:57:04 <peter1138> That saves getting it wrong :)
23:58:56 <peter1138> 23:58: So much for early night.