IRC logs for #openttd on OFTC at 2024-12-07
            
01:22:52 *** Flygon has joined #openttd
02:33:09 *** tokai|noir has joined #openttd
02:33:09 *** ChanServ sets mode: +v tokai|noir
02:40:01 *** tokai has quit IRC (Ping timeout: 480 seconds)
02:47:27 *** gelignite is now known as Guest2301
02:47:30 *** gelignite has joined #openttd
02:54:49 *** Guest2301 has quit IRC (Ping timeout: 480 seconds)
03:15:54 *** gnu_jj_ has joined #openttd
03:19:01 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
03:23:38 *** gelignite has quit IRC (Quit: Stay safe!)
03:26:49 <DorpsGek> [OpenTTD/OpenTTD] CI - Nightly workflow was not successful https://github.com/OpenTTD/OpenTTD/actions/runs/12209456747
03:50:55 *** godbed has joined #openttd
03:51:10 *** godbed_ has joined #openttd
03:54:29 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:54:34 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:45:19 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/04621d1be3875f0bff887d2a727aa620193169a2
04:45:20 <DorpsGek> - Update: Translations from eints (by translators)
05:02:11 <DorpsGek> [OpenTTD/eints] krysclarke opened issue #200: Unable to translate newly added string https://github.com/OpenTTD/eints/issues/200
05:05:34 *** nielsm has joined #openttd
05:19:05 *** keikoz has joined #openttd
06:28:24 *** keikoz has quit IRC ()
06:33:14 *** keikoz has joined #openttd
08:35:26 <andythenorth> Moin
08:35:38 <andythenorth> Was it cat?
09:10:41 <peter1138> Was it
09:12:29 <wensimehrp> https://cdn.discordapp.com/attachments/1008473233844097104/1314882215146033152/image.png?ex=675562fd&is=6754117d&hm=e80255fc3301a860c3030da194f9b1a8df7a425bee8f7fe998765d1fbb9c9bcd&
09:12:33 <wensimehrp> hmm
09:16:08 *** tokai|noir has quit IRC (Quit: c('~' )o)
09:19:31 *** Wolf01 has joined #openttd
09:23:35 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1314885009492148314/image.png?ex=67556597&is=67541417&hm=444e6061341ab900b17ede2e469916f587176974d78d0861389e894891eca5ed&
09:23:35 <peter1138> Nice
09:36:24 <peter1138> There is nothing special here, but it's using _glx_ idea of using encoded strings.
09:36:53 *** gelignite has joined #openttd
09:37:46 <peter1138> There are some places that store parameters where I don't think this will work, but also many where it will.
09:41:57 *** kuka_lie has joined #openttd
09:44:07 *** mindlesstux has quit IRC (Quit: The Lounge - https://thelounge.chat)
09:45:08 *** mindlesstux has joined #openttd
10:11:06 <peter1138> Also, yay, I broke the mingw build.
10:15:09 <andythenorth> WP
10:17:58 <peter1138> Ah, it's libogg.
10:18:29 <wensimehrp> https://cdn.discordapp.com/attachments/1008473233844097104/1314898822660362240/Screenshot_2024-12-07-02-18-18-594_org.mozilla.firefox.jpg?ex=67557274&is=675420f4&hm=164677595cffdc46938662df52e1f634f87a28e2c29b6f2437ed4d60a19fa35d&
10:18:52 <wensimehrp> somebody would need to update eints 😉
10:19:32 <peter1138> Oh, because I added {SPACE}
10:19:36 <peter1138> Hmm.
10:21:08 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13152: Fix 560ee2442d: MinGW package is -libogg, not -ogg. https://github.com/OpenTTD/OpenTTD/pull/13152
10:22:50 <peter1138> Okay, I'm sorry but I have absolutely no idea what needs to be updated with Eints.
10:23:45 <peter1138> Although #169 gives me a clue.
10:25:58 <DorpsGek> [OpenTTD/OpenTTD] michicc approved pull request #13152: Fix 560ee2442d: MinGW package is -libogg, not -ogg. https://github.com/OpenTTD/OpenTTD/pull/13152#pullrequestreview-2486474612
10:35:30 <DorpsGek> [OpenTTD/eints] PeterN opened pull request #201: Add: Support for SPACE from OpenTTD#13149 https://github.com/OpenTTD/eints/pull/201
11:03:32 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13152: Fix 560ee2442d: MinGW package is -libogg, not -ogg. https://github.com/OpenTTD/OpenTTD/pull/13152
11:07:58 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13153: Fix: Potential out-of-bounds reads due to uninitialised string parameters. https://github.com/OpenTTD/OpenTTD/pull/13153
11:24:49 <xarick> i dont understand the error pointed out by codeql
11:24:58 <xarick> didn't I fix it?
11:26:57 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #12879: Change: [NewGRF] Install translation tables into overridden NewGRF. https://github.com/OpenTTD/OpenTTD/pull/12879
11:57:55 <_glx_> Nice eints needs some cleanup before #201
11:58:26 <xarick> `std::ranges::find(rainforest_tiles, tile) == rainforest_tiles.end();`
11:58:26 <xarick> why can't I do this?
11:58:48 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1314924068436181014/image.png?ex=675589f8&is=67543878&hm=d56a2948fcc964a75b749fc691dd85d02a23789c348a80e501bcd706465e5b6f&
12:00:08 <xarick> oh but this works: `std::find(rainforest_tiles.begin(), rainforest_tiles.end(), tile) == rainforest_tiles.end();` I'm confused
12:01:13 <_jgr_> The error message says what the problem is, Tile and TileIndex are different types
12:02:40 <dwfreed> you're attempting to scan a vector of TileIndex for a Tile; std::find can do conversions where there are operators that allow it, std::ranges::find does no such conversions
12:03:43 <peter1138> _glx_: I could've just changed my editor settings to not strip trailing whitespace...
12:04:14 <peter1138> And everyone else who ever touches the language files...
12:05:14 <xarick> oh, because I am using const auto tile : Map::Iterate(), I see
12:06:19 <xarick> thx
12:07:25 <xarick> TileIndex and Tile errors are not easy at all to decipher
12:19:01 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1314929158685462579/image.png?ex=67558eb5&is=67543d35&hm=cfc571c675f957752b56d9f71367a439f87e91c8fbd5f5e711af61e4d2931bac&
12:19:01 <peter1138> Good goals. Oops.
12:21:15 *** virtualrandomnumber has joined #openttd
12:21:57 *** virtualrandomnumber has quit IRC ()
12:21:57 <LordAro> oh hey, GenWorldStatus has an unused next_update member
12:22:08 <LordAro> might just reuse that for some added debugging...
12:22:16 <peter1138> Uh oh.
12:24:26 <peter1138> Just spew printf()s everywhere.
12:24:45 <LordAro> well obviously
12:25:05 <LordAro> but the timing of each stage has to come from somewhere
12:27:42 <peter1138> Just TicToc every instruction.
12:27:57 <LordAro> i've got callgrind for that
12:28:01 <peter1138> Then you can sum up all the 0µs
12:29:36 <LordAro> https://i.imgur.com/OzJwS53.png in the meantime...
12:29:57 <LordAro> (4k tropic map, industries&rivers off, towns minimal)
12:31:09 <xarick> ^_^
12:31:23 <xarick> i found a little bug
12:31:35 <peter1138> Well, I need a faster computer then.
12:32:06 <peter1138> But yes. The amount of effort here is somewhat disproportionate...
12:32:21 <xarick> `if (height == desert_tropic_line && type != MP_WATER) rainforest_tiles.push_back(tile);`
12:32:32 <xarick> otherwise it can add the same tile twice
12:32:45 <xarick> I'll fix after lunch
12:33:01 <peter1138> Instant map generation right?
12:33:21 <LordAro> tbf, if i just comment out the rainforest generation it's only 0.5s
12:33:45 <LordAro> whether or not saving up to 3.5s is worth it on the other hand...
12:36:20 <reldred> peter1138: Then you’ll have no excuse not to do a map preview window on new game 😛
12:36:48 <reldred> *ducks*
12:37:56 <peter1138> I mean, the main reason that isn't possible is because it isn't instant, so... yes?
12:38:03 <peter1138> (But it's not going to be instant)
12:38:22 *** bohaska_ has joined #openttd
12:38:57 *** bohaska_ has quit IRC ()
12:47:52 <reldred> Not with that attitude it isn’t
12:49:37 <peter1138> LordAro: You should've benchmarked it with a full debug build.
12:50:10 <LordAro> you raise an excellent point
12:57:53 <peter1138> Is it breakfast?
12:58:02 <LordAro> yes
12:59:43 <mnhebi> What sort of tomfoolery is this? breakfast at afternoon?
13:01:53 <LordAro> https://i.imgur.com/m2gdNPe.png this is fun
13:02:52 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1314940194503528509/image.png?ex=675598fc&is=6754477c&hm=2e3033257381dd6f3964dbddf5231224439d97515a476a16eaa453e06b162dac&
13:02:52 <peter1138> This is not going to plan...
13:11:55 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #13144: Codechange: Algorithmic generation of desert and rainforest https://github.com/OpenTTD/OpenTTD/pull/13144
13:20:39 <peter1138> Oh, I think these strings are already broken.
13:24:04 <peter1138> I guess we previously changed things around and that broke saved strings?
13:24:13 <peter1138> SCC codes perhaps.
13:35:21 <xarick> CodeQL is slow today
13:36:45 <xarick> is it supposed to build openttd?
13:37:05 <xarick> i thought it would start from one of the compiled builds
13:40:56 <xarick> 26 minutes spent building openttd
13:41:39 <xarick> it only started analyzing now
13:43:46 *** merni has quit IRC (Quit: User went offline on Discord a while ago)
13:47:04 *** gelignite has quit IRC (Quit: Stay safe!)
13:50:29 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154
13:54:38 <xarick> pass! alright, ready for review
14:33:55 <andythenorth> hmm, what do I need to do to make grfs again? 😛
14:43:35 *** merni has joined #openttd
14:43:35 <merni> write nml code then put it through nmlc
14:43:58 <merni> So simple!
15:19:43 <peter1138> Hmm, could I and should I StrongType a std::string?
15:23:05 <peter1138> Oh, I guess a simple struct would work.
15:24:39 <xarick> I'm moving on to GenerateTrees
15:25:25 <xarick> arctic trees are slow and I wanna find out why
15:30:16 <xarick> first step: find out the worst possible case scenario
15:30:35 <xarick> 144375310 us
15:33:14 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13153: Fix: Potential out-of-bounds reads due to uninitialised string parameters. https://github.com/OpenTTD/OpenTTD/pull/13153#pullrequestreview-2486616216
15:34:57 <xarick> 196441336 us geesus
15:46:36 <xarick> okay i hit the jackpot for worst times
15:46:42 <andythenorth> merni: I’ve self-owned with unshippable nml 😛
15:46:57 <andythenorth> Maybe I should branch more
15:47:30 <xarick> the higher the map height, the slower it generates trees
15:47:41 <xarick> also 100% snow coverage for greater effect
15:47:48 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154#pullrequestreview-2486618566
15:48:52 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13153: Fix: Potential out-of-bounds reads due to uninitialised string parameters. https://github.com/OpenTTD/OpenTTD/pull/13153
15:48:57 <xarick> zzzz, be back in 30 minutes lol
15:53:32 <DorpsGek> [OpenTTD/OpenTTD] PeterN dismissed a review for pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154#pullrequestreview-2486618566
15:53:35 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154
15:54:03 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #13154: Codechange: Deduplicate text effect strings. https://github.com/OpenTTD/OpenTTD/pull/13154#issuecomment-2525221366
15:54:04 <andythenorth> Is that for Badger Strings? 😛
15:54:15 <andythenorth> Or are you side questing?
15:54:57 <peter1138> This is side-quest of 'make strings safe again'
15:55:21 <andythenorth> I would *never* side quest
15:55:39 <peter1138> Nearly up to 500 stashes.
15:55:55 <andythenorth> This is why Road Hog NRT edition is so complete
15:56:11 <andythenorth> Do you name your stashes?
15:57:08 <peter1138> No 😦
15:57:56 <peter1138> Too many extra characters needed.
15:58:29 <peter1138> I suspect many of these are already merged.
16:02:02 <xarick> [2024-12-07 16:01:38] dbg: [misc:0] [GenerateTrees] 941755249 us [avg: 941755249.0 us]
16:02:21 <xarick> feels like industries all over again
16:08:13 *** SigHunter has quit IRC ()
16:10:58 *** SigHunter has joined #openttd
16:17:57 <xarick> /* The higher we get, the more trees we plant */
16:17:57 <xarick> bad omen
16:18:29 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1314989423007502336/image.png?ex=6755c6d5&is=67547555&hm=122f7f3964e4b66132dcf1c630780ef13bcc1d2a2ca801f074b9aebb6ece6046&
16:22:15 <andythenorth> Naptime?
16:25:18 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1314991135265132674/PXL_20241207_162446713.jpg?ex=6755c86e&is=675476ee&hm=8f593b73650c11b317abc2c8cae7d6160beadceb1d704f633afd34c37adccf25&
16:25:18 <peter1138> I thought this said something else for a moment...
16:27:53 <andythenorth> No umlaut on FIRS
16:29:08 <xarick> the value of J
16:29:16 <xarick> if the height is 255
16:29:39 <xarick> 255 * 2 * 3
16:31:57 <xarick> this is really a big number, considering it's inside 3 loops
16:44:04 *** gelignite has joined #openttd
16:58:52 <xarick> oh i see, this is spamming GetTileZ
16:59:25 <xarick> does it really need this much height precision?
17:00:29 <squirejames> andythenorth: FÏRS is the Scandy version 😛
17:01:14 <belajalilija> FÍRS
17:01:23 <belajalilija> I think Icelandic uses í
17:01:31 <belajalilija> Not Scandinavian, but still
17:02:00 <squirejames> Or that little o (an overring? I think?)
17:02:00 <squirejames> Anyways, language jokes for all
17:06:15 <andythenorth> I wanted to do more FIRS 😛
17:06:23 <andythenorth> But…events
17:06:29 <peter1138> Event-based FIRS?
17:07:30 <belajalilija> squirejames: Ø?
17:07:49 <belajalilija> andythenorth: Aye is a bit windy outside
17:10:30 <andythenorth> peter1138: Sounds like FIRS GS 😛
17:13:01 <squirejames> belajalilija: Å
17:13:16 <belajalilija> Ooo
17:13:21 <belajalilija> Å
17:13:21 <johnfranklin> Iceland is not Icelandic 😛
17:13:42 <belajalilija> Wdym
17:13:44 <squirejames> SHÅRK, Norwegian Boat set
17:13:59 <belajalilija> squirejames: No
17:14:07 <belajalilija> BØAT
17:14:18 <squirejames> 😄 we're ridiculous
17:14:23 <belajalilija> Xd
17:14:38 <andythenorth> Såm
17:15:09 <belajalilija> Roåd høg
17:15:30 <johnfranklin> Irøn Håse
17:17:44 <andythenorth> WP
17:18:52 <johnfranklin> Is Iceland (supermarket) cheap enough?
17:20:35 *** godbed_ has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
17:26:02 <wensimehrp> https://cdn.discordapp.com/attachments/1008473233844097104/1315006418700730378/image.png?ex=6755d6a9&is=67548529&hm=066d56845b21430263609fc6fa5f8a25961cbe4f48f64270d8c8847efd37d74a&
17:26:02 <wensimehrp> 😛
17:45:46 <DorpsGek> [OpenTTD/eints] glx22 opened pull request #202: Fix: Case inconsistency in Dockerfile https://github.com/OpenTTD/eints/pull/202
17:48:52 <_glx_> ok cleanup done
17:51:11 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315012750820511874/image.png?ex=6755dc8f&is=67548b0f&hm=aa2407f15854108f0821a0537c93a4a0aa2c3fd1238d377e78b4a998ff8bb2d5&
17:51:41 <xarick> very evenly distributed
17:51:47 <xarick> but this is debug build
17:52:29 <DorpsGek> [OpenTTD/eints] PeterN approved pull request #202: Fix: Case inconsistency in Dockerfile https://github.com/OpenTTD/eints/pull/202#pullrequestreview-2486661841
17:52:32 <DorpsGek> [OpenTTD/eints] glx22 merged pull request #202: Fix: Case inconsistency in Dockerfile https://github.com/OpenTTD/eints/pull/202
17:53:13 <truebrain> How pedantic, that capitalisation has to be equal 😛
17:53:44 <DorpsGek> [OpenTTD/eints] PeterN updated pull request #201: Add: Support for SPACE from OpenTTD#13149 https://github.com/OpenTTD/eints/pull/201
18:09:59 <xarick> this logic makes little sense
18:10:10 <xarick> or I don't understand the purpose
18:11:22 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315017830848270396/image.png?ex=6755e14a&is=67548fca&hm=20742640c89dfba9623770afaea769e55a79126576e95b1e888fc93b3574076b&
18:11:22 <xarick> trees are placed in a rectangular fashion but the height difference between the first tree placed and the others can't be higher than 2
18:11:52 <xarick> why's that for? if then in the next iterations the base tree can get higher?
18:12:56 <peter1138> So the trees follow the hills.
18:14:19 <xarick> it's a costly operation though
18:16:00 <LordAro> sure, but int main() { return 0; } would make for a boring game
18:20:35 <xarick> 919509766 us meh... barelly an improvement
18:31:55 <peter1138> Why do you keep measuring such long timespans in microseconds?
18:32:35 <peter1138> And that is 15 minutes. What is taking 15 minutes?
18:34:01 <LordAro> debug 4k worldgen?
18:38:56 <xarick> 859,527934 s
18:39:00 <xarick> slowly improving
18:39:13 <xarick> it's release
18:39:37 <peter1138> So from 920 seconds to 860 seconds.
18:39:52 <peter1138> If you are benchmarking Debug... don't.
18:39:55 <xarick> 941 before
18:40:03 <xarick> it's in release
18:40:38 <xarick> map height manual set to 255, snow coverage 100%, very rough, variety set to none, 1% water
18:41:06 <LordAro> you're not wrong, 4k alpinist alpine map does take a while
18:41:08 <xarick> trees improved
18:41:15 <LordAro> have you considered using a smaller map size for testing purposes?
18:42:04 <xarick> yes 🙂 in debug mode
18:42:10 <LordAro> no, in release
18:42:20 <LordAro> waiting 15 minutes to see if anything's faster is madness
18:42:44 <LordAro> i've played around with desert/rainforest generation a bit, haven't managed to make it meaningfully faster
18:42:52 <LordAro> well, not without breaking it
18:43:40 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315025955420639302/image.png?ex=6755e8db&is=6754975b&hm=0b2742c702118f690ad0d37548d36303197cc783dccf280b6d1402f8aab2ea09&
18:43:40 <xarick> end result after ~14 minutes, you can barelly tell the rectangular shape
18:46:35 <LordAro> hang on, are you always running this within the VS debugger?
18:46:49 <DorpsGek> [OpenTTD/eints] glx22 commented on pull request #201: Add: Support for SPACE from OpenTTD#13149 https://github.com/OpenTTD/eints/pull/201#pullrequestreview-2486669098
18:48:05 <xarick> no, I build with visual studio, then i use a shortcut to run with this:
18:48:05 <xarick> "E:\OpenTTD Visual Studio\SamuXarick\OpenTTD\out\install\x64-Release\openttd.exe" -d -g -G 1
18:48:14 <LordAro> well that's something
18:49:46 <DorpsGek> [OpenTTD/eints] PeterN updated pull request #201: Add: Support for SPACE from OpenTTD#13149 https://github.com/OpenTTD/eints/pull/201
18:49:47 <xarick> the value of j being ht * 2 * 3
18:50:01 <xarick> tile height 255 at the worst
18:50:49 <xarick> hmm, is it possible to cram 1500 trees in a 16x16 area?
18:51:04 <xarick> or am I misunderstanding this
18:52:32 <DorpsGek> [OpenTTD/eints] glx22 approved pull request #201: Add: Support for SPACE from OpenTTD#13149 https://github.com/OpenTTD/eints/pull/201#pullrequestreview-2486669742
18:52:54 <xarick> I'm gonna adjust the value of j to a min
18:53:47 <xarick> it can't plant trees on trees
18:55:19 <DorpsGek> [OpenTTD/eints] PeterN merged pull request #201: Add: Support for SPACE from OpenTTD#13149 https://github.com/OpenTTD/eints/pull/201
18:55:24 <DorpsGek> [OpenTTD/eints] PeterN closed issue #200: Unable to translate newly added string 'STR_LIST_SEPARATOR' https://github.com/OpenTTD/eints/issues/200
18:58:00 *** Wormnest has joined #openttd
19:07:41 <peter1138> Hmm.
19:09:16 <Heiki> Successfully updated string 'STR_LIST_SEPARATOR' Sat Dec 7 19:08:52 2024
19:09:16 <Heiki> it works!
19:16:15 *** Flygon has quit IRC (Read error: Connection reset by peer)
19:46:12 *** debdog has joined #openttd
19:48:19 <peter1138> Great, thanks for confirming 🙂
19:49:48 <andythenorth> maybe I should stop watching Le Bureau
19:50:16 <andythenorth> I'm on season 4, and it relies a lot on subtitles, so I can't watch TV and make grf at the same time
20:01:52 <peter1138> Season 5 of FIRS?
20:17:57 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315049683919310948/image.png?ex=6755fef5&is=6754ad75&hm=93fbbbab5d9a46152cd2566e7a8c29604cd479f2b9ae69030cb48d215095f79c&
20:18:25 <xarick> so i get more trees with j capped than without
20:18:30 <xarick> funny
20:19:45 <squirejames> peter1138: The Fast and the FIRious.
20:19:45 <squirejames> 2 Fast, 2 FIRious
20:19:45 <squirejames> FIRious 3
20:20:42 <xarick> let me try with a more "realistic" 4096x4096 map
20:29:51 <xarick> once again... i get more trees with a lower j
20:30:00 <xarick> someone overestimated the number of tries
20:30:04 <xarick> needed
20:31:29 <andythenorth> I should back out the FIRS and Horse cargo class changes eh 🙂
20:31:36 <andythenorth> those are unforced errors
20:33:03 <xarick> maximum range from first tree location means at maximum 16 * 16 = 256 tiles
20:34:02 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened issue #13155: [Bug]: NewGRF parameter reads incorrect since #13137 https://github.com/OpenTTD/OpenTTD/issues/13155
20:40:33 <xarick> 256 tiles * 1000 tries * 255 max height * 2 * 3 above snow line * 256000 tries scaled by map size * 4 times =
20:40:38 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315055392354603141/image.png?ex=67560446&is=6754b2c6&hm=575ee48e96148a0be9db3e968ae920a7b819064cffa0125787ac1134022c1b86&
20:42:52 <xarick> does it really need 1000 tries to find a place for a tree in a 16*16 area 😦
20:44:47 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13156: Fix #13155: Set number of parameters when assigning from GRFConfig to GRFFile. https://github.com/OpenTTD/OpenTTD/pull/13156
20:45:21 <xarick> and then, reinforce the area j more times with trees, that's height dependant, goes from 6 to 1530
20:45:34 <xarick> let me think
20:56:14 <LordAro> peter1138: why does param_end need to exist? can't whatever uses it just use config->param.size() ?
20:56:39 <LordAro> or this->param or whatever
20:56:49 <peter1138> There are two sets of parameters.
20:57:04 <peter1138> GRFConfig is a vector, and is what is used when setting things up.
20:57:12 <peter1138> GRFConfig's params...
20:57:52 <peter1138> GRFFile's params is still a fixed size array, and so still needs the number of parameters set.
20:58:33 <LordAro> why is it a fixed size array? :p
21:01:38 *** kuka_lie has quit IRC (Quit: leaving)
21:05:26 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13157: Codechange: Use vector for GRFFile parameters instead of array. https://github.com/OpenTTD/OpenTTD/pull/13157
21:05:35 <DorpsGek> [OpenTTD/OpenTTD] PeterN closed pull request #13156: Fix #13155: Set number of parameters when assigning from GRFConfig to GRFFile. https://github.com/OpenTTD/OpenTTD/pull/13156
21:06:02 <peter1138> Oh, commit before compile...
21:08:13 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #13157: Codechange: Use vector for GRFFile parameters instead of array. https://github.com/OpenTTD/OpenTTD/pull/13157
21:17:02 <peter1138> Seems to work though.
21:26:09 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1315066846269149316/image.png?ex=67560ef0&is=6754bd70&hm=d0150bcde1cca839447c70ae97943206eb4f49cf0539cca5726bbc11ce2f2025&
21:26:09 <_glx_> trying to improve output
21:38:34 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #13157: Codechange: Use vector for GRFFile parameters instead of array. https://github.com/OpenTTD/OpenTTD/pull/13157#pullrequestreview-2486688113
21:39:38 <xarick> quick test - I'm surprised out of 1000 attempts, only 531 passed the `abs(x) + abs(y) > 16` condition
21:40:28 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315070450035982398/image.png?ex=6756124c&is=6754c0cc&hm=30d8313139874a645a7f7a464d21affec90ce5a790ef5cabbf38c11cdb5c0bcd&
21:41:06 <xarick> by passed by failing
21:50:19 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1315072927980322876/image.png?ex=6756149a&is=6754c31a&hm=c408dc798a26d151fe57c64edf087ce6bc24deea38224dc41ce318f220260184&
21:50:19 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1315072928379043920/image.png?ex=6756149a&is=6754c31a&hm=2f9b6d6be329e08bdc592a5fa60060fb9e5959e8e94affe473f706c4d3458276&
21:50:19 <_glx_> before and after (using a modified openttd to trigger some warnings)
21:55:12 <andythenorth> more helpful eh 🙂
21:56:09 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:01:40 <peter1138> SmallMapWindow has a switch which is... not really a switch.
22:01:55 <peter1138> Every case uses `[[fallthrough]]`
22:04:47 <DorpsGek> [OpenTTD/actions] glx22 opened pull request #86: Codechange: improve output of annotations check https://github.com/OpenTTD/actions/pull/86
22:05:23 *** tokai has joined #openttd
22:05:23 *** ChanServ sets mode: +v tokai
22:09:03 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13157: Codechange: Use vector for GRFFile parameters instead of array. https://github.com/OpenTTD/OpenTTD/pull/13157
22:09:06 <DorpsGek> [OpenTTD/OpenTTD] PeterN closed issue #13155: [Bug]: NewGRF parameter reads incorrect since #13137 https://github.com/OpenTTD/OpenTTD/issues/13155
22:10:41 *** Etua has joined #openttd
22:10:59 <xarick> [2024-12-07 22:09:35] dbg: [misc:0] num_tree_tiles = 14191355
22:10:59 <xarick> [2024-12-07 22:09:35] dbg: [misc:0] [GenerateTrees] 59762210 us [avg: 59762210.0 us]
22:11:13 <xarick> let me test the worst case
22:12:52 <xarick> [2024-12-07 22:12:38] dbg: [misc:0] num_tree_tiles = 15007417
22:12:52 <xarick> [2024-12-07 22:12:38] dbg: [misc:0] [GenerateTrees] 61573526 us [avg: 61573526.0 us]
22:12:57 <xarick> just wow
22:13:33 <xarick> ... and I still don't think this method is that good
22:14:49 <xarick> first it creates a diagonal tile area, then creates a vector of available tiles which can still accept trees, then it selects a random tile from the resulting vector and places a tree
22:15:32 <xarick> if no tiles are available, it returns false, forcing the j countdown to break immediately
22:21:54 <andythenorth> definitely naptime
22:32:57 <xarick> diagonal tile iterator is a little bit heavy
22:33:04 <xarick> but still fine
22:34:34 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1315084063132090378/image.png?ex=67561ef9&is=6754cd79&hm=7ff31952704185462964890512d901047ba8627415d7bfc94f3ae00cd62c91b5&
22:38:55 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
22:50:33 <xarick> 54 seconds
22:52:24 <xarick> there has to be a better approach
23:03:19 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:03:19 *** tokai|noir has joined #openttd
23:03:19 *** ChanServ sets mode: +v tokai|noir
23:04:15 <_jgr_> The iterator increment is done as an indirect vtable call, so it's not surprising that it's more expensive
23:04:52 <_jgr_> Still, the tree part of map generation is not that significant in the big scheme of things
23:08:46 <_jgr_> You could just use DiagonalTileIterator directly
23:10:09 *** tokai has quit IRC (Ping timeout: 480 seconds)
23:11:32 <_jgr_> If you're going to the trouble of creating this temporary vector it would seem useful to preserve it across all the calls to PlaceTreeAtSameHeight from the loop at its call site
23:15:55 *** debdog has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
23:17:11 <peter1138> Pretty sure you don't need to be faffing with unique_ptr there.
23:32:08 <DorpsGek> [OpenTTD/OpenTTD] joehtosis opened issue #13158: [Crash]: Crash on exiting game https://github.com/OpenTTD/OpenTTD/issues/13158
23:34:38 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:35:11 <DorpsGek> [OpenTTD/OpenTTD] glx22 closed issue #13158: [Crash]: Crash on exiting to menu https://github.com/OpenTTD/OpenTTD/issues/13158
23:35:14 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #13158: [Crash]: Crash on exiting to menu https://github.com/OpenTTD/OpenTTD/issues/13158
23:36:00 <_glx_> this crash report was for you _jgr_
23:36:21 *** Wormnest has joined #openttd
23:38:05 <DorpsGek> [OpenTTD/OpenTTD] joehtosis commented on issue #13158: [Crash]: Crash on exiting to menu https://github.com/OpenTTD/OpenTTD/issues/13158
23:40:33 *** joehtosis has joined #openttd
23:40:33 <joehtosis> _glx_: I posted to the corrected url you sent, thanks for the heads up.
23:51:06 *** Etua has quit IRC (Ping timeout: 480 seconds)