IRC logs for #openttd on OFTC at 2023-10-08
β΄ go to previous day
01:28:53 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
01:50:21 *** gelignite has quit IRC (Ping timeout: 480 seconds)
02:22:33 *** Tirili has quit IRC (Quit: Leaving)
02:25:11 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:52:17 *** D-HUND is now known as debdog
03:15:03 *** pm is now known as Guest2546
03:20:46 *** Guest2445 has quit IRC (Ping timeout: 480 seconds)
03:41:02 *** geli has quit IRC (Quit: Stay safe!)
05:55:13 *** berndj-blackout is now known as berndj
06:11:26 *** NGC3982 has quit IRC (Ping timeout: 480 seconds)
06:19:40 *** NGC3982 has joined #openttd
06:42:03 *** NGC3982 has quit IRC (Ping timeout: 480 seconds)
07:26:32 <andythenorth> _glx_: I could just randomise them π
07:27:19 <andythenorth> but I want to learn how station layouts work, i.e. var 40, 41, 46 etc
07:27:50 <andythenorth> the 'select tile' method seems like a bit of a diversion?
07:28:35 <andythenorth> afaict, it's simpler to just switch spritelayout on some varact 2 vars
07:31:21 <andythenorth> there's no graphics chain, that won't work π
07:40:35 <andythenorth> wonder what `select_sprite_layout` does
08:37:29 <andythenorth> I think I just fail to understand the station spec π
08:37:55 <andythenorth> I have plastered some nml over it to get some basic results working
08:38:02 <andythenorth> there is no graphics chain?
08:38:19 <andythenorth> spritelayout is an action 0 property, not an action 2 result?
08:49:54 <andythenorth> hmm spritelayout is not a static action 0 property?
08:50:07 <andythenorth> spritelayout list is a static action 0 property, and must contain 8 tiles?
08:50:43 <andythenorth> there is no grf entity for a station tile, at least in the specs
08:50:55 <andythenorth> is a tile a spritelayout?
09:12:23 *** nielsm has quit IRC (Ping timeout: 480 seconds)
10:00:33 *** HerzogDeXtEr has joined #openttd
10:25:44 <_glx_> There is graphics chain, same as vehicles
10:28:22 <_glx_> And prepare_layout and layout_registers (auto generated by nml) are inserted at the begin of graphics chain
10:34:01 <_glx_> The 8 tiles thing is related to the type stored in map, but you can have more or less than that as long as it's an odd number
10:36:24 <andythenorth> I'm puzzled where the spritelayout exists
10:36:29 <andythenorth> it's an action 0 prop
10:36:37 <andythenorth> so how can it be selected in the graphics chain?
10:36:51 <andythenorth> it's a static prop, unless there's a callback to over-ride it, and I see no callback
10:37:32 <andythenorth> specifically it's station prop 0x09
10:37:59 <_glx_> select_sprite_layout is CB14
10:39:03 <_glx_> Without CB14 the tile type value is used
10:39:49 <andythenorth> and when is CB 14 called? It can't be in the graphics chain, that has it's own action 3 thing
10:39:57 <andythenorth> is it called once and stored somewhere?
10:40:54 <_glx_> It's called like any other callbacks
10:41:43 <_glx_> Testing var 0C and falling back to graphics chain
10:41:57 <andythenorth> I just can't understand how to return a spritelayout to the graphics chain π
10:42:03 <andythenorth> sorry, this must seem really stupid
10:42:15 <_glx_> You don't return a sprite layout
10:42:19 <andythenorth> but in a normal graphics chain, the spritelayout is returned as the action
10:42:40 <_glx_> That's why the var10 magic exists
10:42:46 <andythenorth> I just can't figure it out π
10:43:05 <andythenorth> I know it's possible, because ISR grf does all the things I want to do
10:47:50 <andythenorth> maybe I should read the decompiled nfo π
10:48:43 <_glx_> For stations you don't return a sprite layout, but you select it with the callback, then prepare_layout is like the chain you would do before return a sprite layout for other features
10:50:05 <andythenorth> what does CB14 return? An index into prop 0x09?
10:50:57 <_glx_> Yes, and bit 0 is ignored (always replaced by orientation)
10:51:36 <_glx_> Well nml uses prop 1A, but it's similar to 09
10:52:46 <andythenorth> so if I want to select spritelayout based on x,y position (for example), I handle CB 14 as `select_sprite_layout`, indexing into the array defined by `sprite_layouts`? And I can select the spritelayout based on anything in varact 2?
10:53:10 <andythenorth> and there are 6 spritelayouts?
10:53:25 <_glx_> There are as many as you want
10:53:46 <andythenorth> oh the 6 limit is spritesets?
10:53:50 <_glx_> But they all share 6 different spritesets
10:54:35 <_glx_> And a spriteset can be an varact2 chain too via custom
10:56:22 <_glx_> In nml it's as similar as possible with other features with some workarounds (because spec)
10:57:23 <andythenorth> normally I work out what nml is doing by reading the nfo spec π
10:57:31 <andythenorth> but for stations, the nfo spec just makes me confused
10:57:44 <andythenorth> ok I'll try select_spritelayout next
10:58:20 <_glx_> You are used to the chain to spritelayout result
10:58:49 <_glx_> For stations it's split into callback and chain to spriteset
10:59:38 <_glx_> With prepare_layout prepended to the chain
11:00:28 <andythenorth> Iβm also writing a compile that pretends itβs just chain to spritelayout, so that adds confusion π
11:03:47 <andythenorth> I have to learn how the βsectionsβ thing works next
11:04:23 <andythenorth> Never understood it as a player, fancy stations just break a lot and have to be overbuilt to fix them
11:44:06 <andythenorth> ok the orientation thing is ... not right yet π
11:44:26 <andythenorth> guess my sprite_layout order needs changed
11:45:15 *** NGC3982 has joined #openttd
11:45:34 <andythenorth> now I just need modulo π
11:50:30 <pickpacket> How do I remove a server I once added from the server listing?
11:54:32 <andythenorth> I wonder if I can make a single modulo that works for all cases
11:54:59 <andythenorth> each station has a 'layout' which has a format `[(x, y, spritelayout_1), (x, y, spritelayout_2), (x, y, spritelayout_n)]`
11:55:15 <andythenorth> `sprite_layouts` array is generated from that
11:55:47 <andythenorth> the 'layout' pattern should then just repeat within the same station section
11:56:33 *** NGC3982 has quit IRC (Ping timeout: 480 seconds)
11:56:35 <andythenorth> my current modulo should be failing, because it will index into sprite_layout 1 sometimes
11:56:43 <andythenorth> but it doesn't fail, which is puzzling
11:57:28 <andythenorth> I wonder if the array accessor just doesn't allow overflow
11:57:34 <andythenorth> and defaults to 0?
11:59:41 <andythenorth> (currently the x, y are not used at all by my rail stations)
11:59:46 *** NGC3982 has joined #openttd
12:06:00 <andythenorth> maybe I should use x and y for var checks of platform position and number
12:06:30 <andythenorth> and modulo those
12:09:04 *** NGC3982 has quit IRC (Remote host closed the connection)
12:09:16 *** NGC3982 has joined #openttd
12:19:31 *** NGC3982 has quit IRC (Ping timeout: 480 seconds)
12:22:45 *** NGC3982 has joined #openttd
12:29:44 <truebrain> pickpacket: click on it and hit delete
12:31:26 <andythenorth> hmm animated cost / income display is missing in my build
12:32:11 *** gelignite has joined #openttd
12:32:58 <andythenorth> how did I break that?
12:48:14 <talltyler> You probably just have it transparent, itβs a new feature
12:51:01 <andythenorth> I never understood what that "make trains transparent" icon did
12:55:09 <andythenorth> I really don't like the loading indicator display, so I guess I live without cost / income display now
12:55:18 <andythenorth> loading indicator is visual junk
12:55:34 <emperorjake> Putting them together wasn't a great idea, JGR has them as separate settings
12:55:53 <andythenorth> progress is better than making a thing of it though
12:56:31 <emperorjake> I'd still like a button for "show path reservations" in the transparency options
12:56:43 <emperorjake> I use it way too often for it to be buried deep in the settings
12:57:25 <andythenorth> one day a rework
12:57:31 <andythenorth> some sort of info layers
12:57:37 <andythenorth> like a stacked UI
12:58:00 <andythenorth> cargodist overlay, PBS reservations, signs, loading indicators, cost/income
12:58:10 <andythenorth> and ideally cargo waiting or cargo throughput indicators
12:58:39 <Eddi|zuHause> we had all of that individually at some stages
12:58:40 <andythenorth> but right now I need to make this station not look horrible π
12:58:51 <andythenorth> company colour station, random colour industry
12:58:58 <andythenorth> I guess I make the station grey
13:01:02 <Eddi|zuHause> create a child company with a different colour :p
13:01:34 <andythenorth> if only we had partially owned subsidiaries
13:02:06 <andythenorth> CHIPS now quite monochrome, I switched it to "CC grey"
13:02:22 <andythenorth> maybe it should be more station classes?
13:02:32 <andythenorth> "Industry stations (asphalt, grey colour)"
13:02:40 <andythenorth> "Industry stations (asphalt, company colour)"
13:02:51 <emperorjake> If only stations could have livery refits
13:03:00 <andythenorth> I could just add more tiles
13:04:12 <emperorjake> I wouldn't mind having both grey and CC options for each tile
13:05:58 <andythenorth> /me working out whether to recolour at the station level, the spritelayout level, or the sprite level π
13:06:12 *** gelignite has quit IRC (Read error: Connection reset by peer)
13:06:33 *** gelignite has joined #openttd
13:07:30 <andythenorth> I can't use the industry / object trick of setting the colour based on town index
13:08:03 <andythenorth> there are multiple sets of colours, and each industry is assigned one of the sets
13:08:09 <andythenorth> station won't know which set to use
13:08:35 <pickpacket> truebrain: thanks!
13:08:51 <andythenorth> I guess all industries in one town could be same colour, but I find that a bit weird
13:09:46 <andythenorth> could divide each town into quadrants relative to the town sign, and figure out which quadrant the industry/object/station is in
13:09:54 <andythenorth> so SE = red, NE = green etc
13:17:57 <andythenorth> maybe stations have a varact 2 var for overbuild
13:19:30 <alfagamma7> andythenorth: That would have been better
13:27:45 <talltyler> Why canβt you use the same seed as FIRS?
13:31:13 <talltyler> Oh, multiple sets of colours, I see π
13:31:25 <talltyler> Reading comprehension:P
13:33:29 <andythenorth> it would work if I grouped station tiles against FIRS industries
13:33:34 <andythenorth> but that's totally impractical π
13:33:49 <andythenorth> there would be frequent version mismatch between the grfs
13:34:14 <andythenorth> I tried 'include stations in FIRS' and it's a step too far
13:40:59 <talltyler> I don't know how the colour seed works (does it use industry index at all, or just towns?) but if it's not that specific, maybe it could be a separate repo, like Polar Fox?
13:45:40 <andythenorth> it's a mapping problem
13:45:40 <andythenorth> FIRS objects map 1:1 to industries
13:45:46 <andythenorth> CHIPS stations can't realistically do that
13:45:54 <andythenorth> so there's no way to know what the player wants
13:50:05 <andythenorth> I think grey will have to be the solution
13:50:20 <andythenorth> or I duplicate all the tiles for all company colours
13:50:54 <peter1138> Stations can just be company coloured. They're owned by the company.
13:50:59 <andythenorth> if it did match, it would look like
13:52:24 <talltyler> That's so nice looking
13:53:01 <andythenorth> the only thing I can think of is to expose a var for colour of nearest industry
13:53:08 <talltyler> Stupider idea, do industries know which companies serve them? Can they repaint themselves to the company colour of the company serving them? π
13:53:18 <andythenorth> interesting idea
13:53:23 <andythenorth> tricky in multiplayer
13:53:38 <andythenorth> andythenorth: ^ and this would be prone to failure
13:54:06 <talltyler> lol no, industries only know founder ID
13:54:45 <andythenorth> red with pink? π
13:56:28 <talltyler> It would be nice for industries to use the founder colour if founded by a player, something like
13:56:28 <talltyler> `colour = (founder == FOUNDER_GAME) ? GetRandomColour() : founder_colour1);`
13:56:37 <talltyler> Oh, but then objects wouldn't match, GG
13:56:53 <talltyler> MAKE ALL INDUSTRIES GREY
13:57:35 <andythenorth> I honestly think I just add more classes
13:57:47 <andythenorth> "Industry stations (gravel, pink)"
13:58:02 <andythenorth> "Industry stations (gravel, company colour)"
13:58:22 <andythenorth> well....FIRS doesn't use all CC
13:58:23 <talltyler> Nested station variants when? π
13:58:35 <talltyler> How many colours are we talking?
14:03:15 <_pruple> in earlier versions of PIRS, I used the index of the town to match colours of certain industries which belonged to the same town
14:03:32 <_pruple> and towns are also the parent of stations π
14:04:04 <talltyler> So every town has its own colour, and all industries, stations, and objects in that town have the same colour?
14:05:49 <_pruple> one could do. or just have, eg, mines and mine stations match, or certain other combinations - if one was making both the industries and the stations. π
14:06:24 <andythenorth> one does not see how the station knows what it's supposed to be though π
14:06:29 <andythenorth> a station is just a station
14:07:06 <talltyler> Yeah, splitting stations by industry type sounds like a good way to get feature requests
14:07:47 <talltyler> Even if they match industry sprites, people will want transfer stations and more variety at big industry stations
14:08:17 <talltyler> I think "everybody in this town has the same favourite colour" is a good approach π
14:08:41 <andythenorth> or just duplicating all the tiles
14:09:10 <andythenorth> meanwhile, in spritesets: `nmlc info: 2398 sprites, 393 cached, 0 orphaned, 2005 duplicates, 0 newly encoded (native)`
14:09:14 <andythenorth> 2005 duplicates π
14:17:29 <andythenorth> wonder if there's a varact 2 var for `count tiles by ID (ID)`
14:17:41 <andythenorth> I could make tiles that set the station colour
14:19:43 <_pruple> 80 B A bit map of station components, bit set = facility present:
14:19:43 <_pruple> bit 0: railway station
14:19:43 <_pruple> bit 1: lorry loading area
14:19:43 <_pruple> bit 3: airport or heliport
14:20:07 <andythenorth> var 68 can detect some nearby tile info, but not quite the thing
14:28:54 <andythenorth> I've fucked my savegame now though π
14:29:02 <andythenorth> bunch of track tiles are non track tiles
15:00:25 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
15:35:05 <peter1138> Hmm, VS Code / CMake has reconfigured itself and lost my bit to disable SDL2 :/
15:46:34 <andythenorth> ok if I send all my trains to depot before reloading the station grf π
15:53:51 <andythenorth> or split them into more classes?
15:54:54 <talltyler> Classes would let you use the filter to choose colour
15:55:18 <talltyler> Although we could always extend the filter to also filter tile name
15:55:35 <talltyler> That's one of my pet peeves with objects, I really wish it filtered object name and not just class
15:55:50 <talltyler> (not a complaint, someday I will PR this... π )
15:56:46 <andythenorth> classes means all the cranes etc could also pick up the colour
15:57:53 <andythenorth> I'm not prepared to repeat every item 8 times in the same class π
15:58:09 <andythenorth> so I have only repeated the sheds currently
15:59:02 <peter1138> Hmm, why do we initialise the spritefont's unicode map 4 times (* 4, for each font size) on startup...
15:59:09 <peter1138> It's not heavy but.
16:00:18 <talltyler> Sounds like you answered your own question; I agree that classes sound best
16:00:20 <peter1138> andythenorth, just get the player to change their company colours depending on what station they're looking at.
16:01:09 <talltyler> Also sounds like nested classes similar to engine variants would be helpful for objects and stations
16:03:11 <talltyler> truebrain: At your convenience, #11341 is ready for your review. I particularly need some help with why my window refresh timer isn't working (and why I shouldn't do it that way π )
16:04:51 <andythenorth> peter1138: no but we could really do that by testing which industries are in the viewport
16:05:43 <andythenorth> talltyler: I think a toggle on the construction window would be better "company colour to set at construction time" π
16:05:54 <andythenorth> then cache that in the tile, do we have a spare nibble?
16:09:17 <peter1138> Hmm, do we support unicode outside of the first plane?
16:11:12 <peter1138> I guess we do for non-sprite fonts
16:12:26 <pickpacket> This remains the best game ever
16:13:09 <pickpacket> Love playing it both alone and with others
16:13:41 <talltyler> That sounds suspiciously like a liveries GUI π
16:14:15 <talltyler> andythenorth: This is so nice to look at
16:14:27 <talltyler> I love when the stations look like part of the industry and not something jammed on the side
16:14:34 <andythenorth> not sure I can do it on classnames
16:14:38 <andythenorth> they're only 4 chars
16:14:49 <andythenorth> how will I compress arbitrary meaning into them? π
16:17:18 <andythenorth> "INCO" is "Industry Station Cobble"
16:21:27 <alfagamma7> I guess I should learn how to put company colour on parts of stations in a newgrf
16:24:23 <andythenorth> I could do numbers: "ICO1" for the first company colour
16:24:32 <andythenorth> but then I could do numbers for the ground tiles as well
16:24:54 <andythenorth> hmm "ICO0" for first company colour, 0 indexed
16:25:05 <andythenorth> and hex, so up to "ICOF"
16:25:15 <andythenorth> but then I can use hex for ground type as well
16:25:33 <andythenorth> and for town/industry split
16:25:52 <andythenorth> so labels could just be "02F_" etc
16:26:35 <andythenorth> I can write a parser so the string names make sense
16:26:41 <peter1138> _m[TILE_INDEX].colourmap./
16:29:35 <_glx_> (compile tested in my head only)
16:30:54 <andythenorth> oh peter doesn't see my Discord reactions π
16:31:03 <andythenorth> wasted some animated emoji credits there π
16:35:29 <andythenorth> peter1138: paint tool π
16:35:33 <peter1138> Even if I could... it would still be wasted.
16:41:29 <alfagamma7> andythenorth: Reacting with this to your own message is like Obama giving himself a medal meme ( obv it's edited)
16:43:38 <andythenorth> oh that was just me being bad at discord
16:44:48 <alfagamma7> The IRC bridge was the second best thing to be added in this server really
16:47:37 <peter1138> Oh, that's an idea.
16:51:38 <_glx_> andythenorth: with useful info in crash dialog ?
16:52:03 <andythenorth> no, macOS crash handling failed
16:52:18 <andythenorth> `libc++abi: terminate_handler unexpectedly threw an exception
16:52:18 <andythenorth> Something went seriously wrong when creating the crash log. Aborting.`
16:58:14 <andythenorth> I should, am in the middle of grf things right now π
16:59:06 <_glx_> oh but you trigger a lot of crashes with your grf things
17:14:19 <andythenorth> this is a bit stupid, but might work
17:14:33 <andythenorth> also it can be a parameter I imagine, and 'simplified' to just CC
17:14:57 <andythenorth> I haven't done all 16 colours though, that would be horrific
17:15:50 <andythenorth> oh the compile has added it for objects and roadstops as well, just needs the recolour cb
17:32:07 <andythenorth> I'm sure this is fine?
17:32:48 *** Wormnest has joined #openttd
17:40:05 <andythenorth> ^ try it, it's odd
17:40:21 <andythenorth> lots of the tiles don't have much CC, so it's strange they're repeated so much
17:52:41 <andythenorth> Why repeat? Or why no CC? Or why bother with this at all? π
18:11:42 <andythenorth> this is just weird in game, I'm going to rethink
18:11:53 <andythenorth> it makes building stations way too faffy
18:12:06 <andythenorth> even though the model-train building element is improved
18:26:22 <peter1138> I don't see why you want even ground-type selection.
18:29:22 <truebrain> talltyler: won't be any time soon; maybe others can pitch in too π
18:29:34 <truebrain> new job is consuming all my free time π¦
18:30:58 <truebrain> _glx_: is it really going to be that easy? π
18:31:17 <andythenorth> peter1138: because FIRS, with different industry ground tiles
18:31:28 <andythenorth> the only point of CHIPS really is "matches FIRS"
18:32:32 <andythenorth> although FIRS could lose 'cobble', I never liked it much
18:33:40 <andythenorth> right, that's a thing, deleting 'cobble'
18:44:16 <andythenorth> ok removed all the colours and the 'cobble' ground type
18:46:52 <truebrain> truebrain: _glx_ sadly, seems to make little difference. Still no dialog π¦
18:47:02 <truebrain> (and still a "serious fault")
18:47:43 <truebrain> however, it still writes down a crash.json.log, and shows the assert on the CLI console (if you have that open). But that is only true for a semi-recent nightly π
18:54:35 <truebrain> the issue doesn't seem to be the runModal; but something earlier
18:54:44 <truebrain> it is not really reporting a clear error to me, so it is a bit trial and error
18:57:19 <truebrain> seems the `init` is already giving issues
19:13:56 <truebrain> lol .. so I delegate the whole function to the main thread; now it just hangs π
19:14:10 <truebrain> guess it never switches to the main thread anymore π
19:14:23 <truebrain> (most likely as we keep a lock preventing switching)
19:22:46 <truebrain> yeah, okay, this is a bit more complicated than I am wiling to deal with atm π "it is complicated" π
19:22:52 <andythenorth> ok maybe this is fine?
19:23:09 <andythenorth> then the 'normal' stations are just
19:24:35 <andythenorth> wonder if I could make the coloured sheds use ground from the nearest station tile
19:26:16 <andythenorth> not sure the ground matters on the largest sheds anyway
19:27:51 <andythenorth> really not relevant
19:28:32 <andythenorth> the ground types are already drawn so they can tile and not look stupid
19:32:03 <_glx_> truebrain: ah yes we use multiple threads but fully synchronised
19:45:51 <truebrain> we are crashing; the mainthread should be suspended like its life depended on it
19:46:39 <truebrain> (I moved all of the dialog code to the mainthread, but it never started to do anything π )
19:47:07 <andythenorth> talltyler: try this? The industry sheds are isolated in their own class, and use only colours FIRS industries use
19:47:23 <andythenorth> they might still want a class per colour, not sure
19:47:35 <andythenorth> going to draw a lot more of them using existing FIRS sprites
19:48:19 <truebrain> I keep wondering if there isn't a certain channel dedicated to all this sprite stuff .... π
19:48:34 <_glx_> like the one above this one ?
19:48:40 <truebrain> now you mention it!
19:58:19 <_glx_> hmm maybe a combination of QueueOnMainThread() and GameLoopPause()
20:00:56 <truebrain> pretty sure the main thread is dead dead
20:06:48 *** gelignite has quit IRC (Quit: Stay safe!)
20:24:53 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:31:36 <_glx_> the biggest issue is we don't have devs for macos π
20:46:16 *** frosch123 has quit IRC (Quit: User went offline on Discord a while ago)
20:46:32 <andythenorth> oops, forgot to build statues in my game
20:51:00 <peter1138> Hmm, so the yapf nodelist container defaults to 65536 items. Each item is either 48 or 64 bytes.
20:51:26 <peter1138> So 4MB allocated to a structure called "SmallArray" ;D
20:52:08 <peter1138> SmallArray destroyed with 7 (48) items
20:52:08 <peter1138> SmallArray destroyed with 2667 (48) items
20:52:10 <peter1138> SmallArray destroyed with 35 (48) items
20:52:22 <peter1138> Quite a variety of sizes used.
20:53:22 <peter1138> I've seen a 5000, I wonder what's needed to see a larger node list.
20:54:00 <_glx_> ships in open sea I think
20:54:39 <peter1138> Creating a 4kx4k map... forgot to turn off industries.
20:59:14 <peter1138> I'm pretty sure this structure is pointless.
20:59:55 <peter1138> At least with the default pathfinder limits. Hmm.
21:05:10 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:19:17 <peter1138> Eh, OpenTTD is using 100% CPU, even when paused...
21:19:52 <peter1138> I suspect Hardware Acceleration + SDL1.
22:20:26 *** tokai|noir has joined #openttd
22:20:26 *** ChanServ sets mode: +v tokai|noir
22:20:39 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:27:18 *** tokai has quit IRC (Ping timeout: 480 seconds)
continue to next day β΅