IRC logs for #openttd on OFTC at 2023-09-27
⏴ go to previous day
00:33:16 <_glx_> oh and there was a bug it seems, or the prop changed later
02:37:33 *** debdog has quit IRC (Ping timeout: 480 seconds)
05:30:23 *** D-HUND is now known as debdog
06:06:39 <andythenorth> came before Doom
06:06:53 <andythenorth> was Wolfenstein first?
06:10:32 <_pruple> somewhat after, I think
06:14:31 <andythenorth> lol we can label spritesets now?
06:14:46 <Eddi|zuHause> never seen that before, but looks like it
06:15:24 <andythenorth> I would imagine that's always been there
06:15:40 <andythenorth> but I have never read the nml docs for spriteset
06:16:09 <andythenorth> automated conversion of FIRS to nml by other people -> I copy-paste blocks to all the other grfs
06:16:47 <andythenorth> this means spriteset indexes don't have to be selected as magic numbers
06:17:10 <andythenorth> much more readable
06:24:41 <andythenorth> nah labels don't work in CUSTOM(a, b) call
07:05:47 <Eddi|zuHause> always fun when someone requests an obscure feature that existed for decades
07:09:18 <peter1138> Well it's not exactly what was requested.
07:11:14 <Eddi|zuHause> that's normal in my line of work... they ask for something without really knowing what they're asking for
07:18:03 <andythenorth> GSGameOver(play_again=false)
07:23:14 <Eddi|zuHause> you can probably do something like that with the admin port
07:23:54 <Eddi|zuHause> GS checks the date, pauses, and sends a message.
07:32:52 <andythenorth> ok so spriteset num_entries is an extended bytet
07:33:08 <andythenorth> does that give me word-sized num_entries?
07:33:20 <andythenorth> considering putting all sprites in the grf in one spriteset
07:35:44 <andythenorth> then I write my own resolver for compile-time constants -> spriteset indexes
07:36:00 <andythenorth> guaranteed no duplicate realsprites this way either 😛
07:38:47 <Eddi|zuHause> yes, extended byte has the same value range as word
07:39:48 <Eddi|zuHause> it's sorta the same idea as UTF8, only smaller
07:49:07 <LordAro> misread that as michi[_]cc initially
08:01:11 <Eddi|zuHause> reminds me a bit of T'alc
08:21:56 <peter1138> Ooh, ancient spritegroup resolver code... such memories.
08:25:11 <peter1138> These are 18 year old patches. I'm sure I need them still.
08:55:25 <alfagamma7> Browser compatibility
09:31:37 <peter1138> There's only Firefox.
09:39:43 <andythenorth> alfagamma7: it stopped being a thing mostly about 10 years ago
09:39:59 <andythenorth> and now that Explorer is dead, it's really not a thing
09:40:42 <andythenorth> there are some layout and appearance details about the rendering of UI controls and focus states and typography differently in different browsers
09:41:08 <andythenorth> but everything should work, and the majority of the layout should render almost the same at pixel level in all major browsers
09:41:16 <andythenorth> what's the trouble? 🙂
09:46:54 <peter1138> Step 1: Don't use pixel dimensions. Step 2: Don't use Chrome-based browsers.
09:47:00 <peter1138> That leaves... no problems ;D
10:05:48 <peter1138> OpenTTD's slider works better than <input type="range" />
10:55:17 <_glx_> andythenorth: using a huge spriteset and labels you can directly reference the sprites
10:56:03 <_glx_> All the references will count as one
11:11:21 *** Extrems has quit IRC (Ping timeout: 480 seconds)
11:30:24 <alfagamma7> peter1138: I agree
11:31:23 <peter1138> Today my salad (yes, leafy) is spicy :o
11:35:29 <peter1138> Just a bit of hot chilli relish. Is paprika ever spicy?
11:51:05 *** virtualrandomnumber has joined #openttd
11:52:02 *** virtualrandomnumber has quit IRC ()
13:57:00 *** _aD has quit IRC (Remote host closed the connection)
14:32:19 *** Extrems has joined #openttd
15:01:53 *** HerzogDeXtEr has joined #openttd
15:37:52 <andythenorth> peter1138: any way to make labels work with CUSTOM() ?
15:38:03 <andythenorth> _glx_: any way to make labels work with CUSTOM() ?
15:40:42 <peter1138> What is CUSTOM()? What's a label?
15:42:09 <tokai|noir> peter1138: Paprika also can include chilis (aka "hot Capsicum annum") and depending on the mix can by quite spicy. :)
15:43:33 <andythenorth> CUSTOM is the nml built-in expression that indexes into custom_spritesets - I can't figure out which nfo feature that maps to, need to keep looking
15:43:47 <_glx_> label are converted to index at compile time
15:44:00 <_glx_> it's impossible to do it at runtime
15:45:04 <_glx_> and CUSTOM is not an NFO feature, it's a way to translate into spritelayout var10 mechanism
15:45:36 <andythenorth> ok, so that all makes sense
15:46:14 <andythenorth> calls to CUSTOM are evaluated at runtime?
15:46:49 <andythenorth> [am about to write my own sprite label resolver]
15:47:12 <_glx_> no, at compile time used custom_spritesets are mapped to a var10 value written into the station action0
15:47:38 <_glx_> and a switch is generated to convert var10 to the correct spriteset at runtime
15:48:10 <andythenorth> I keep forgetting peter1138 is on irc connection 😛
15:48:17 <andythenorth> that ping wasn't intended, it's deleted in discord
15:49:01 <peter1138> I suspect a deleted-ping is worse than an erroneous-ping.
15:50:06 *** gelignite has joined #openttd
15:50:07 <_glx_> the station spec implementation in nml is full of tricks to work around the limitations and be as easy as possible to use
15:51:00 <andythenorth> think I'm going to write python to work around more of it
15:51:25 <_glx_> imagine manually doing all the var10 stuff in NFO 😉
15:51:57 <andythenorth> I have done my time with nfo
15:52:18 <_glx_> I guess chips NFO used GRM to handle the limitations
15:52:29 <_glx_> but GRM is another beast
15:52:33 <andythenorth> ok so B* for spriteset num entries => means 65k sprites per set?
15:53:23 <andythenorth> CHIPS has 117 sprites currently 😛
15:53:30 <andythenorth> FIRS has 5.5k though
15:53:38 <andythenorth> if I apply the same approach everywhere
15:55:37 <andythenorth> Horse has 102179
15:55:44 <andythenorth> but how many are duplicates? 😛
15:56:08 <Eddi|zuHause> we're talking about realsprites?
15:56:33 <andythenorth> 'sprites' as reported by nmlc `nmlc info: 102179 sprites, 0 cached, 0 orphaned, 38667 duplicates, 63512 newly encoded (native)`
15:56:38 <andythenorth> so I assume they're realsprites
16:01:55 <andythenorth> hmm, if the Horse duplicates is accurate, I'm very close to the 65k limit 🙂
16:02:02 <andythenorth> that's an appealing thing to try
16:02:41 <andythenorth> (putting them all in huge spriteset)
16:22:29 <andythenorth> I would split wagons and engines or something
16:22:45 <_glx_> anyway industries can use any number of spritesets, but they must have the same size 🙂
16:23:11 <andythenorth> oh yeah it might not work in current FIRS, I might rely on spriteset size for animation
16:23:30 <andythenorth> animation usually has 2 or 3 possible implementations though
16:26:21 <peter1138> Imagine how different you'd make this if you were designing it from the ground up... ;)
16:27:26 <andythenorth> "you'd render all my strange meta games pointless"
16:27:32 <andythenorth> as if they're not already
16:28:40 <pickpacket> Go. Erlang. Matlab!
18:30:42 <andythenorth> Logo: you have to program every pixel 😛
18:39:12 <DorpsGek> - Update: Translations from eints (by translators)
19:15:12 <andythenorth> _glx_: is it worth expanding the spritesets per station to 31?
19:16:26 <_glx_> would be 0-31 range (with 2 reserved values so 30 possible var10)
19:17:31 <andythenorth> next OpenTTD release is April 2024? 😛
19:18:48 <Eddi|zuHause> i thought we went away from april releases?
19:18:50 <andythenorth> I am about to try the single spriteset thing, but it's not a small change to the compile
19:19:44 *** wensimehrp has joined #openttd
19:19:44 <wensimehrp> Maybe in 2034 we would have elevated stations...
19:21:03 <frosch123> andythenorth: 2 spritesets is plenty
19:21:06 <Eddi|zuHause> do you have a patch for it? is it "well tested"?
19:21:27 <frosch123> if you use DEFAULT and CUSTOM you most likely only need 2 spritelayouts in total
19:22:59 <frosch123> the important part about stations is: the "default"/"custom" switches should contain most logic. the "select_sprite_layout" should be minimal
19:23:27 <andythenorth> not sure I have either default or select_sprite_layout in use yet 🙂
19:23:36 <_glx_> select_sprite_layout can be used as part of custom too
19:24:47 <andythenorth> hmm a single spriteset won't work for custom_spritesets
19:24:56 <andythenorth> my spritelayout will always index to the same entry
19:25:27 <_glx_> you can LOAD_TEMP() as index
19:25:42 <andythenorth> let's test that then
19:26:08 <_glx_> but with a single spriteset you don't even need to use CUSTOM
19:28:22 <andythenorth> I can just use `prepare_layout` to fill registers
19:28:28 <andythenorth> that's more akin to what FIRS does
19:29:23 <andythenorth> is there a better name than prepare_layout? 🙂
19:29:44 <andythenorth> or maybe it just needs the docs
19:42:09 <_glx_> it's used to prepare the layout
20:15:12 <talltyler> andythenorth: Next release when I finish NoDL 🙂
20:15:22 <talltyler> Hopefully before April 😄
20:31:56 <_glx_> would also need an example_station_advanced doing the same with multiple sprite_layouts
21:03:59 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:22:25 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:38:37 *** gelignite has quit IRC (Quit: Stay safe!)
22:19:55 *** ChanServ sets mode: +v tokai
22:23:59 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:26:46 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:42:43 *** _aD has quit IRC (Quit: leaving)
22:55:58 <_glx_> hmm the multi layout version doesn't compile (40 spritelayouts require too many registers)
23:05:48 <_glx_> after some changes in nml it compiles, and needs 135 registers
23:09:09 <_glx_> like reusing registers when the value is the same
continue to next day ⏵