Log for #openttd on 3rd September 2022:
Times are UTC Toggle Colours
00:14:41  *** WormnestAndroid has joined #openttd
00:15:17  *** WormnestAndroid has joined #openttd
00:23:21  *** WormnestAndroid has quit IRC
00:23:42  *** WormnestAndroid has joined #openttd
00:30:35  *** Wormnest has quit IRC
01:19:35  *** Wormnest has joined #openttd
02:11:38  *** ely-the-kitsune has joined #openttd
02:12:16  *** Wormnest has quit IRC
02:14:25  *** D-HUND has joined #openttd
02:17:45  *** debdog has quit IRC
02:31:10  *** Wormnest has joined #openttd
02:49:03  <DorpsGek> [OpenTTD/OpenTTD] James103 opened issue #9990: [Bug]: Station cargo history caps each data point at 65,535 units
02:49:12  <DorpsGek> [OpenTTD/OpenTTD] James103 closed issue #9990: [Bug]: Station cargo history caps each data point at 65,535 units
02:49:24  <DorpsGek> [OpenTTD/OpenTTD] James103 commented on issue #9990: [Bug]: Station cargo history caps each data point at 65,535 units
05:54:26  *** WormnestAndroid has quit IRC
06:44:26  *** nielsm has joined #openttd
06:50:43  *** jpw has quit IRC
06:50:54  *** jpw has joined #openttd
06:54:30  *** jpw has quit IRC
06:54:41  *** jpw has joined #openttd
06:55:22  *** Wolf01 has joined #openttd
07:01:43  *** jpw has quit IRC
07:02:07  *** jpw has joined #openttd
07:53:58  <andythenorth>
07:53:58  <andythenorth> eh could include a pylon
07:59:16  <DorpsGek> [OpenTTD/bananas-api] TrueBrain created new tag: 1.4.2
08:06:44  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #9973: Add #7889: Company rating via Server Admin Port
08:06:47  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed pull request #9973: Add #7889: Company rating via Server Admin Port
08:08:06  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed issue #7889: [Request] Company rating via Server Admin Port
08:08:09  <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on issue #7889: [Request] Company rating via Server Admin Port
08:11:00  <DorpsGek> [OpenTTD/bananas-frontend-web] TrueBrain created new tag: 1.1.7
08:21:01  <DorpsGek> [OpenTTD/bananas-server] TrueBrain created new tag: 1.4.8
08:23:51  <DorpsGek> [OpenTTD/eints] TrueBrain created new tag: 1.3.0
08:27:50  *** HerzogDeXtEr has joined #openttd
08:27:54  *** murr4y has quit IRC
08:28:47  *** murr4y has joined #openttd
08:28:48  <DorpsGek> [OpenTTD/game-coordinator] TrueBrain created new tag: 1.5.7
08:29:26  <dwfreed> tag all the things
08:33:42  <TrueBrain> yup ... UPDATE ALL DEPENDENCIES .. again .. 😛
08:35:56  <DorpsGek> [OpenTTD/master-server] TrueBrain created new tag: 1.2.14
08:41:51  <DorpsGek> [OpenTTD/master-server-web] TrueBrain created new tag: 1.3.6
08:44:22  <TinoDidriksen> That's part of why I generally disagree with committing exact-version lock files. Just let me specify a minimum version that it should be compatible with, and have CI tests confirm that it remains compatible with newer versions - and report to me when it breaks.
08:44:58  <LordAro> "when"
08:45:36  <TinoDidriksen> Sure, because it will breaks eventually.
08:46:26  <JGR> There's no intrinsic reason why things need to break all the time
08:46:43  <JGR> It is possible to aim higher
08:47:48  <TrueBrain> TinoDidriksen: you use the exact version in lock files for a final product (mind you, not for libraries :P), as you want to know what is running on your production
08:47:58  <TrueBrain> one of the worst problems to debug is: if I start it now, it works, but it failed yesterday
08:48:05  <TrueBrain> because some library changed, and you didn't know
08:48:16  <TrueBrain> additionally, in this day and age, you really should check the diff of your dependencies
08:48:34  <TrueBrain> as sadly, too many packages are being hijacked 😦
08:49:39  *** Soccerdog has joined #openttd
08:49:39  <Soccerdog> damn bro thats crazy
08:51:18  <TrueBrain> but otherwise, yes, that is exactly what our projects do: we once defined a minimal version, and every new release the CI validates if it is compatible. If so, we accept the update 🙂
08:54:27  <DorpsGek> [OpenTTD/dibridge] TrueBrain commented on issue #48: Puppets without ipv6 trick / webirc support?
09:01:13  *** Flygon has joined #openttd
09:19:03  *** D-HUND is now known as debdog
10:01:17  <andythenorth> we are so so far behind the referential chain of integrity for components that other industries have 😛
10:01:22  <andythenorth> BOM
10:01:40  <andythenorth> even car industry has it 😛
10:02:04  <andythenorth> this is how Ford know to recall my van because it has a fuse in it that doesn't work
10:02:19  <andythenorth> or possibly they just guess, wouldn't be surprised 😛
10:12:57  <DorpsGek> [OpenTTD/OpenTTD] nielsmh commented on issue #9989: [Bug]: "Net Profit" shows "-£0" instead of "£0" if that value is zero
10:54:03  *** WormnestAndroid has joined #openttd
11:26:00  *** OrangeLeaf36 has joined #openttd
11:26:00  <OrangeLeaf36> where would the other end be chatting from
11:28:00  <nielsm> the IRC channel #openttd on OFTC network
11:34:46  *** WormnestAndroid has quit IRC
11:38:14  <peter1138> Hmm, lazy afternoon time, or shall I go out for a wander.
11:43:09  *** WormnestAndroid has joined #openttd
11:51:38  <andythenorth>
11:51:38  <andythenorth> such
11:52:08  <andythenorth> think it does need a tile with some electricity crap
11:52:12  <andythenorth> and animated sparks
11:52:13  <andythenorth> oof
12:03:27  <dP> hm, is there a good way to do `max(map(lambda x: ..., vector))` in C++ without a loop ?
12:10:05  <nielsm> std::accumulate(vector.begin(), vector.end(), 0, std::max<list.value_type>) maybe
12:10:56  <nielsm> actually you need a function wrapping your operation and the max for the one at the end
12:11:52  <nielsm> there's also std::reduce which I'm not entirely sure how differs from std::accumulate
12:11:56  *** ely-the-kitsune has quit IRC
12:12:09  <JGR> std::transform_reduce would probably do it
12:12:30  <JGR> Though arguably at that point a loop is probably better
12:12:58  <dP> yeah, loop it is then
12:13:05  <nielsm> the theoretical advantage is that you can give an execution policy (automatic parallelism) to the std lib algorithms
12:14:16  <dP> considering I need it for like 30 entries max I doubt it's worth it
12:14:43  <nielsm> and yeah the trouble with min/max operations over collections is that you need to bootstrap them, and might need a zero/minimum/"nothing" value for that
12:16:22  <michi_cc[d]> std::max_element can also take a lambda for the comparison, that could do the map, too.
12:18:05  <dP> converting map to comparator is not very practical
12:19:25  <michi_cc[d]> Very much depends on the lambda I guess. No problem if it just accesses some member of a class/struct, but not very nice if it is a complex calculation.
12:19:58  <dP> you also need to map max_element result
13:15:07  <DorpsGek> [OpenTTD/dibridge] poVoq commented on issue #48: Puppets without ipv6 trick / webirc support?
13:25:06  *** WormnestAndroid has quit IRC
13:34:03  *** WormnestAndroid has joined #openttd
14:32:45  <peter1138> Cookl, bug in Linux kernel IRC NAT helper...
14:40:36  <LordAro> oops
14:45:58  <DorpsGek> [OpenTTD/dibridge] TrueBrain commented on issue #48: Puppets without ipv6 trick / webirc support?
14:51:31  *** WormnestAndroid has quit IRC
14:59:55  *** Alkel_U3 has quit IRC
15:00:23  *** WormnestAndroid has joined #openttd
15:03:16  *** Alkel_U3 has joined #openttd
15:28:03  *** Wormnest has joined #openttd
15:35:45  *** jpw has quit IRC
15:36:23  *** jpw has joined #openttd
15:37:49  <frosch> #48 is so weird. so many questions, yet they did not try to run it once
15:41:06  *** WormnestAndroid has quit IRC
15:50:27  *** Flygon_ has joined #openttd
15:56:47  *** Flygon__ has joined #openttd
15:57:55  *** Flygon has quit IRC
15:58:30  *** Flygon_ has quit IRC
16:03:03  <andythenorth>
16:03:09  <andythenorth>
16:14:22  <FLHerne> I like the grey one
16:14:36  <FLHerne> can has option to make all FIRS industries neutral colours? :p
16:14:54  <FLHerne> I do find the pastel ones a bit strange-looking sometimes
16:15:18  <FLHerne> individually they're fine, but when there are half-a-dozen in view in different colours it's weird
16:41:27  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler opened pull request #9991: Fix #9989: £0 Net Profit is neither negative nor positive
16:41:48  <andythenorth> hmm
16:41:58  <andythenorth> there's already a callback that nerfs some colours
16:42:06  <andythenorth> not sure I'm going to add a parameter for more though 😛
16:42:16  <andythenorth> it's probably one switch and a param though
16:43:18  <glx[d]> it seems you broke github TallTyler 🙂
16:43:43  <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on issue #9989: [Bug]: "Net Profit" shows "-£0" instead of "£0" if that value is zero
16:43:55  <glx[d]> ah it's fixed, but I got the unicorn page
16:52:41  <glx[d]> oh I see why it's using this weird construct, it's just to prevent the red colour for negative values
16:55:39  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #9991: Fix #9989: £0 Net Profit is neither negative nor positive
16:57:01  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #9989: [Bug]: "Net Profit" shows "-£0" instead of "£0" if that value is zero
17:00:16  *** ely-the-kitsune has joined #openttd
17:23:04  <andythenorth>
17:23:04  <andythenorth> 5 layouts will be enough 😛
17:23:18  <andythenorth> shame I couldn't figure out the layout choose dP made 😛
17:23:28  <andythenorth> random is random 😦
17:29:58  <andythenorth> heavy industry with minimal smoke seems wrong though 😛
17:32:09  <peter1138> Oh, cheers x-plane, that's not a great place for a tree.
17:33:59  <andythenorth> middle of a runway?
17:35:08  <andythenorth>
17:35:08  <andythenorth> smoke at an electric arc furnace!
17:35:13  <andythenorth> having that
17:35:16  <andythenorth> might be steam 😛
17:39:20  <peter1138> It's also dirty.
17:41:46  <peter1138> But yes. Two trees right on a helipad. And the helipad is sloping.
17:55:49  <andythenorth>
17:55:49  <andythenorth> oof adding the smoke causes clipping on the tile in front
17:55:51  <andythenorth> lame 😛
17:56:03  <andythenorth> the molten metal is clipped on the left
17:56:13  <andythenorth> I never did understand bounding boxes 😛
17:58:00  <andythenorth>
17:59:15  <frosch> don't look at bounding boxes, they do not affect clipping
17:59:29  <andythenorth> normally when I have this problem, I delete one of the animations
17:59:38  <andythenorth> then the problem vanishes 😛
17:59:48  <frosch> the important part is that your sprites do not extend over left/right corner of the tile
18:00:02  <frosch> if they do, you need to split them, and draw them on the other tile
18:00:09  <andythenorth> ah
18:00:27  <andythenorth> so maybe I can push the smoke left on x
18:00:41  <frosch> ideally you would draw the whole building on the spritesheet, and cut it up in python/nml
18:00:58  <andythenorth> hmm
18:01:02  <andythenorth> layout maker 😛
18:01:10  <andythenorth> doesn't TB have one of those?
18:01:20  <frosch> it's on the todo list for truegrf 🙂
18:01:42  <frosch> but now that Truegrf_stations changed nick to WoozyDragon4018 , it's looking grim for trugrf
18:02:11  <WoozyDragon4018> lmao
18:23:17  <TrueBrain> they are just showing their true colours
18:25:36  *** virtualrandomnumber has joined #openttd
18:25:42  *** virtualrandomnumber has quit IRC
18:26:03  <michi_cc[d]> Interesting, it is "nml stations" on Discord, but the bridge made it into  WoozyDragon4018 🙂
18:26:41  <TrueBrain> the bridge doesn't use the friendly name 🙂
18:26:49  <TrueBrain> as I was pretty sure people would abuse the hell out of that 😄
18:27:43  <frosch> <- lol
18:27:56  <frosch> there has been a draft docs since 2012
18:29:46  <andythenorth> how good was it 😛
18:30:50  <TrueBrain> took 10 years to implement; you do the math 😛
18:31:19  <frosch> pretty sure noone involved in the current design/implementaiton looked at that page 🙂
18:31:46  <frosch> we had an issue on old devzone, were we designed another spec some years ago
18:31:56  <frosch> even then i did not know about this even earlier effort
18:32:18  <TrueBrain> how many devs does it take to change a light bulp? 😛
18:33:00  <frosch> 1 doing the work, 1 looking approving, the rest talking in the bike shed
18:33:15  <TrueBrain> sounds about right
18:33:51  <Eddi|zuHause> can i join in on the bike shed?
18:34:11  <TrueBrain> but yeah, talking about station support .. guess the only way that happens is if I quit my job, again 😛 Stupid free time .. or rather, stupid work-weeks 😛
18:34:38  <TrueBrain> I wish 24h work-weeks becmae the norm ... 😄
18:35:59  <frosch> <- can you spot truebrain?
18:36:28  <TrueBrain> lol
18:38:17  <frosch> how much do i have to pay to whom to replace "horst" with "truebrain" or "andy", and add it to the discord stickers?
18:39:01  <TrueBrain> owh please no, aaaaaahhhhh
18:40:43  <frosch> anyway, i'll review that nml-station page now, and delete everything that does not apply
18:41:42  <TrueBrain> so you are going to remove that page?
18:42:53  * andythenorth removes extra smoke due to flickering
18:43:12  <frosch> no, i'll keep the cross-linking between the features
18:43:46  <andythenorth> I am the Marketing Manager
18:47:05  <dP> is there any GS method that takes two strings? need to test something
18:47:06  <frosch> <- "Unlike station classes, there is currently no default yet." <- it already talks like station support has been there forever
18:47:51  <andythenorth> NML was made of optimism 🙂
18:48:00  <andythenorth> how old were most of the authors?  about 20?
18:50:38  <dP> oh, `ScriptText::GetEncodedText` returns a pointer to the static buffer
18:50:42  <dP> "fun"
19:11:26  <glx[d]> frosch: I know this page, it lists all the variables except random_bits I included with the implementation
19:11:43  <frosch> yes, i added 3 missing vars so far
19:11:58  <frosch> the rest is surprisingly complete
19:20:02  *** Wormnest has quit IRC
19:31:01  <frosch> found a bug in ottd's implementation of newgrf stations 🙂
19:32:21  <glx[d]> wow
19:36:53  <frosch> <- still incomplete, but should no longer contain lies
19:38:26  <DorpsGek> [OpenTTD/nml] frosch123 commented on issue #262: Document stations
19:47:48  <glx[d]> <-- maybe I should include some kind of `no_track(spriteid)` for this
19:49:05  <frosch> is there any case where you would want a track-type offset?
19:49:27  <frosch> maybe just add the "+0" in all cases
19:52:30  <glx[d]> you want the offset if it's a track tile
19:55:47  <DorpsGek> [OpenTTD/OpenTTD] frosch123 opened pull request #9992: Fix: [NewGRF] Upper 16 random bits should be the same for all station tiles in callback 140.
19:57:12  <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #9992: Fix: [NewGRF] Upper 16 random bits should be the same for all station tiles in callback 140.
19:57:21  <frosch> hmm, oh, ottd does only do the railtype magic itself, if newgrf railtypes with overlays are used
19:57:28  <frosch> i assume it did that always
20:00:27  *** Wormnest has joined #openttd
20:00:31  <frosch> ok, next attempt: you want the "+0" in all cases, except GROUNDSPRITE_RAIL_Y/X
20:00:38  <frosch> right?
20:03:29  <glx[d]> I guess
20:08:02  <andythenorth> I've got a 5 frame animation, and I want to offset one set of sprites in it
20:08:10  <andythenorth> so I have frames 0, 1, 2, 3, 4
20:08:25  <andythenorth> and I want to show sprites 2, 3, 4, 1, 0
20:08:37  <andythenorth> I thought I could do it with %, but I can't figure it out 😛
20:09:15  <andythenorth> var is animation_frame
20:09:30  <andythenorth> stacking a bit ternary wouldn't be nice 😛
20:09:37  <Eddi|zuHause> so effectively you want to flip 0 and 1 for some loops, but not all of them?
20:10:06  <andythenorth> specifically there are 5 smoke sprites, and I want to show them twice
20:10:14  <andythenorth> but the second one is offset
20:10:38  <Eddi|zuHause> so what is the complete sequence (repeated infinitely)?
20:11:13  <andythenorth> what's an appropriate notation 😛
20:11:40  <frosch> use a procedure which returns 2,3,4,1,0 for input 0,1,2,3,4?
20:11:48  <Eddi|zuHause> what's wrong with digits?
20:11:53  <andythenorth> [A0, B2], [A1, B3], [A2, B4], [A3, B0], [A4, B1]
20:12:54  <Eddi|zuHause> so each [] ist two sprites somehow encoded as one callback result?
20:13:30  <andythenorth> animation_frame < 3: animation_frame + 2 ? animation_frame - 4
20:13:43  <dP> ```>>> [(x + 2) % 5 ^ x // 3 for x in range(5)]
20:13:43  <dP> [2, 3, 4, 1, 0]
20:13:55  <michi_cc[d]> 1, 0 or 0, 1? You wrote both right now.
20:13:56  <frosch> glx[d]: disabled_platforms and disabled_length are stupid to document. i wanted to write "bitmask of disallowed lengths", but bits are 0-based and lengths are 1-based. so to disallow length 3, you have to use bitmask(2) :/
20:14:00  <Eddi|zuHause> assuming the "1,0" you showed earlier is a mistake, what you want is "(frame+2)%5"
20:14:20  <andythenorth> yeah it's a mistake
20:14:24  <andythenorth> should be 0, 1
20:14:39  <dP> boring :p
20:14:54  <andythenorth> dP: can't use python in nml 😛
20:14:59  <andythenorth> I am aware of other compilers
20:15:13  <dP> nml should have all the operators :p
20:16:19  <frosch> so andy gave a riddle, which was only interesting, because he made a typo? :p
20:17:29  <andythenorth> oopsie
20:17:49  <frosch> sounds like the math exercises from my studies, which were designed to give nice numbers, except when the author messed up some + - when typing them
20:18:33  <glx[d]> frosch: could be "bitmask of disallow lengths" with 1-7 and a internal left shift inside nmlc
20:20:52  <glx[d]> hmm does bit 7 disable drag/drop in openttd ?
20:21:10  <frosch> bit 7 is for anything longer than 7
20:23:40  <Eddi|zuHause> andythenorth: the ternary version would work, except the second case should be -3, not -4
20:24:36  <andythenorth> and the ? and : are transposed 😛
20:24:51  <frosch> glx[d]: doesn't look like it
20:24:58  <Eddi|zuHause> that's just syntax, that's uninteresting :p
20:26:27  <dP> except it's much better to use % instead of ternary in grf
20:26:55  <frosch> glx[d]: i tested, when you use drag&drop you have to drag an allowed size
20:27:03  <frosch> you have to count the tiles yourself for that 🙂
20:27:22  <glx[d]> makes sense
20:27:40  <frosch> giving the most generic "can't build railway station here" :p
20:28:12  <glx[d]> typical extra explicit error yes
20:28:33  <andythenorth> meh
20:28:40  <andythenorth> this fancy smoke also breaks the other animation
20:28:42  <andythenorth> 🙂
20:28:43  <andythenorth> nvm
20:29:36  <glx[d]> so I can change nmlc to expect bitmask(1-8) and a hidden shift
20:31:55  <frosch> +1
20:34:03  <glx[d]> but I need to be careful to not apply the shift if it's not a bitmask
20:35:53  <frosch> why would anyone not use a bitmask?
20:36:06  <frosch> "0" is the only meaningful value otherwise
20:36:14  <frosch> and you can shift that as much as you want :p
20:37:09  <DorpsGek> [OpenTTD/OpenTTD] frosch123 merged pull request #9992: Fix: [NewGRF] Upper 16 random bits should be the same for all station tiles in callback 140.
20:46:27  *** Wolf01 has quit IRC
20:53:12  *** Wormnest has quit IRC
20:55:05  <andythenorth>
20:55:05  <andythenorth> unfortunate 😛
20:55:17  <andythenorth> not sure that fancy smoke looks good anyway
20:59:17  *** Flygon_ has joined #openttd
21:03:54  <DorpsGek> [OpenTTD/nml] glx22 opened pull request #264: Change: disabled_platforms/length is now bitmask(1-8)>>1
21:04:19  <glx[d]> not my best commit message
21:06:55  *** Flygon__ has quit IRC
21:06:59  <DorpsGek> [OpenTTD/nml] frosch123 approved pull request #264: Change: disabled_platforms/length is now bitmask(1-8)>>1
21:10:56  <DorpsGek> [OpenTTD/nml] glx22 merged pull request #264: Change: disabled_platforms/length is now bitmask(1-8)>>1
21:30:51  *** Wormnest has joined #openttd
21:41:52  *** ely-the-kitsune has quit IRC
21:43:25  *** ely-the-kitsune has joined #openttd
21:46:53  *** nielsm has quit IRC
21:54:58  <andythenorth> FIRS release? 😛
21:57:47  <frosch> heqs2 next?
21:58:06  <andythenorth> maybe 😛
21:58:24  <frosch> oh wait, no, chips2 ofc
21:59:09  <andythenorth> depends if I want to learn stations 😛
21:59:18  <andythenorth> also the stations could just go into FIRS
21:59:22  <andythenorth> bit weird but eh
21:59:31  <frosch> longer compile times :p
21:59:39  <andythenorth> FIRS is quite quick...
21:59:41  <andythenorth> currently 😛
22:00:02  <andythenorth> also can we allow more than one GS, for the case where they are only allowed to plant objects? 😛
22:00:29  <frosch> there is some text in tb's gist about that
22:01:00  <frosch> maybe even in the wiki
22:01:36  <andythenorth> 'industry fields' in grf is unlikely
22:01:42  <andythenorth> and GS can probably do it
22:27:02  <dP> andythenorth: you can do it with grf-py and let me write half of the code ;)
22:28:05  <andythenorth> I was looking at grf-py again earlier today
22:28:14  <andythenorth> how did the Horse port go?
22:31:01  <dP> well, I kinda achieved what I could with it in terms of developing grf-py
22:31:18  <dP> there is no point on finishing it unless you want to switch, it's just more of the same stuff
22:32:11  <andythenorth> I don't want to switch currently
22:32:19  <andythenorth> but in the long term NML is ....
22:32:38  <andythenorth> ... there are reasons to switch 😛
22:32:52  <andythenorth>
22:32:52  <andythenorth> hmm, does OpenGFX redefine palettes?
22:33:29  <andythenorth> that pink is transparent in normal testing
22:34:51  <andythenorth> nobody reported it after the release 😛
22:34:52  <andythenorth> oof
22:43:17  <dP> well, let me know if you ever want to do anything with grf-py
22:43:32  <dP> it was kind of designed for big projects like yours
22:44:06  <dP> but is currently in a bit of a chicken-egg situation
22:45:15  <andythenorth> 🙂
22:45:46  <dP> it's kinda pointless to develop it without real applications and it's not very attractive with features and docs missing xD
22:46:01  <andythenorth> classic
22:47:05  <dP> but, yeah, if you even want to try it we can do smth like you write code however you want and I try to make it work ;)
22:49:42  *** Flygon_ has quit IRC
22:50:03  <andythenorth> I wonder what all the FIRS forks will do
22:50:21  <andythenorth> they nearly all take the raw firs.nml and edit it
22:50:34  <andythenorth> not even the separate industry files it generates
22:50:49  <dP> they'll finally have to learn the proper way I guess :p
22:51:03  <andythenorth> well FIRS is in TrueGRF...
22:51:10  <andythenorth> so that might be the end of forks
22:51:28  <dP> or, actually... grf-py can decompile...
22:52:12  <andythenorth> I forget, did you have any timings for compiling with grf-py ?
22:53:10  <dP> I did some but there isn't much to compare with as I didn't do the full horse port
22:53:25  <dP> also didn't do any particular optimizations yet so it's pretty comparable to nml
22:53:28  <dP> minus the parsing part
22:53:33  <andythenorth> TBH, some of the vehicle templating, I never want to touch again
22:53:43  <andythenorth> I'm not sure it can be ported without introducing bugs 😛
22:53:56  <andythenorth> the loops are so nested, and so conditional
22:54:05  <andythenorth> and depend on so much python generation also
22:54:36  <dP> nah, horse temlates are terrible, they should be half-rewritten anyway
22:54:45  <dP> at the very least to get rid of most switches
22:55:44  <andythenorth> didn't you try that?
22:56:00  <dP> yeah, I got rid of some in what I ported
22:56:08  <andythenorth> in theory every realsprite could just be reached as a pre-computed result
22:56:13  <dP> but could to better
22:56:15  <andythenorth> and just a small number of switches
22:56:26  <andythenorth> I just can't work it out
22:56:43  <andythenorth> it would need a lot of bit shifting and masking or something
22:57:35  <dP> yeah, some bit stuffing and large bits->sprite mapping
22:57:41  <dP> ideally automated in python
22:58:01  <andythenorth> 33% of it is literally to deal with vehicles that aren't 8/8
22:58:14  <andythenorth> maybe 50% even
22:58:36  <andythenorth> it's mad that OpenTTD can't fix that
22:58:56  <andythenorth> and that other authors don't even seem to notice how broken it is
22:59:58  <JGR> What exactly is broken about it?
23:00:48  <andythenorth> if you don't transpose views 0-3 and 4-7, vehicles less than 8/8 are considerably out of place when flipped
23:01:43  <andythenorth> you / me /s
23:02:34  <JGR> Ctrl-click flipping is rarely used feature so probably others haven't noticed
23:02:45  <JGR> a rarely used*
23:02:56  <dP> you mean vehicles flipped with ctrl-click don't use the right sprites? sounds like a game but, not something you should fix in newgrf
23:03:11  <andythenorth> the amount of drama when it was banned by default, I thought ctrl-click was high usage 😛
23:03:17  <andythenorth> squeaky wheel problems
23:03:40  <andythenorth> dP: fixing in newgrf is currently the conventional solution 😛
23:03:56  <JGR> Nowhere in the UI is it mentioned, so how would users know the feature even exists?
23:03:57  <andythenorth> so all action 2 chains for vehicles < 8/8 are duplicated
23:04:44  <andythenorth> JGR: 'mystery meat' 😛
23:05:54  <andythenorth> ctrl-click is still better than the livery callback 😛
23:06:03  <andythenorth> at least it's not actually broken
23:06:15  <andythenorth> apart from being broken
23:07:19  <dP> too bad debug vehicles can't be reversed
23:09:19  <JGR> Did a quick test with a random GRF and I see what you mean, never knew about that issue
23:09:29  <JGR> Easy solution is "don't do that then"
23:10:02  <dP> hm, apparently it's a feature since it's mentioned in grf spec xD
23:12:24  <andythenorth> it's the major cause of Iron Horse realsprites being nearly 50% duplicates
23:12:46  <andythenorth> they are the same bounding box etc, but transposed 0-3 with 4-7
23:12:55  <JGR> Not setting bit 3 of prop 27 should just make the problem go away?
23:13:13  <andythenorth> it's used in Iron Horse to control liveries etc
23:13:21  <andythenorth> and flip asymmetric vehicles
23:16:03  <dP> andythenorth: that should be possible to deduplicate at compile time
23:16:23  <dP> also iirc that's not the main cause :p
23:16:44  <andythenorth> not sure how we'd de-duplicate the realsprites 🙂
23:17:22  <dP> grf can just write sprite once and refer to it several times in container version 2
23:17:40  <dP> if offsets are the same
23:17:49  <andythenorth> there's no format I'm aware of for re-ordering the views
23:17:55  <andythenorth> they come in blocks of 8
23:18:10  <andythenorth> unless it's hidden docs somewhere
23:18:19  <dP> yeah, I don't think that can be done in nml
23:18:24  <dP> compiler itself has to do that
23:19:01  <andythenorth> are there docs in the nfo spec for this?
23:19:13  <andythenorth> or is implied in OpenTTD codebase only?
23:19:29  <dP> there may be docs on grf format somewhere
23:19:36  <dP> idk, I just read the code xD
23:20:00  <andythenorth> if it's possible, then nmlc should be taught to do it
23:20:18  <dP> but basically in container 2 real sprites are in separate block and pseudo sprites just reference them by id
23:21:52  <dP> haven't actually tried that but I see no reason why same sprite can't be referenced twice
23:23:02  *** Wormnest has quit IRC
23:23:28  <dP> so I plan to teach grf-py to do that eventually
23:23:37  <dP> as a part of a general sprite caching
23:24:40  <andythenorth> 91k Horse realsprites are duplicated twice
23:25:02  <andythenorth> another 10k are duplicated 4 times
23:25:30  <JGR> Deduplication seems like it should be doable in a post-processing step on the output GRF
23:25:40  <andythenorth> 8k are not duplicated
23:26:02  <andythenorth> so of 230k realsprites
23:26:03  <dP> yeah, it's doable as post-processing but I'm also thinking of compile times
23:26:15  <dP> ideally it shouldn't even resolve that sprite
23:26:46  <dP> like, if it's a generator just check the hash and not even run it if it's already cached
23:26:55  <andythenorth> so 43% or so are duplicated
23:26:58  *** Wormnest has joined #openttd
23:27:28  <andythenorth> I don't think it affects compile times much, but I haven't test recently
23:27:39  <andythenorth> I think nml caches the sprites
23:28:25  <andythenorth> Horse is still ridiculously slow to compile though, over 20 seconds
23:28:38  <andythenorth> any improvement is valid 😛
23:29:46  <dP> well, nml doesn't even have sprite generators :p
23:30:26  <dP>
23:30:54  <JGR> I wish all the projects I worked on compiled in 20 seconds or so...
23:34:59  <glx[d]> most of these 20s is parsing IIRC
23:35:10  <glx[d]> because it's a huge generated NML file
23:36:54  <andythenorth> yup
23:37:43  <andythenorth> I think there are ways I could reduce this still with procedures
23:39:03  <andythenorth> but it would be more complicated
23:39:30  <andythenorth> for example there are 80 bulk wagons, each has a full action 2 chain
23:39:35  <andythenorth> but they all use the same rules
23:39:49  <andythenorth> so it could be one chain in a procedure
23:40:14  <andythenorth> returns a numeric result to one switch which chains to the realsprites
23:41:02  <andythenorth> I would guess that about 600 full action 2 chains can be reduced to about 25
23:42:33  <andythenorth> meh, looking, maybe I did a lot of that already
23:42:45  <andythenorth> seems I ran into 255 limit for varact 2 results 😛
23:44:36  <glx[d]> it's possible to split in more varact2 if more than 255 results
23:46:46  <andythenorth> yup
23:47:13  <andythenorth> in this case it's "optimising" away one switch, but then replacing it with another to shard the results to handle > 255
23:47:19  <andythenorth> no real gain 🙂
23:48:03  <dP> that is if you optimize one switch, not 10 :p

Powered by YARRSTE version: svn-trunk