IRC logs for #openttd on OFTC at 2024-03-20
โด go to previous day
00:01:52 <xarick> omg, how many trains/wagons exist in iron horse 3.14.0 ?
00:04:01 <peter1138> Some would say ... enough.
00:04:43 <xarick> is experimenting all train/wagon compatibility of all available engines
00:05:01 <_glx_> oh there are many variants
00:06:06 <xarick> never imagined the cause of my AI apparent slowdown was due to the insane amount of engines being tested
00:06:26 <_glx_> maybe API needs to know about variants
00:06:50 <xarick> there really should be a way to check if a train can pull a wagon
00:07:03 <xarick> without buying to test it
00:07:42 <_glx_> it's impossible, newgrf needs a real vehicle for callbacks
00:09:10 <_glx_> and in iron horse many wagons are just duplicates (variants with same data but different colours)
00:10:57 <Eddi|zuHause> maybe it's time to revive the AI callback?
00:11:01 <xarick> testing attachments since 1935, it's 1943 now
00:11:45 <xarick> it's a one time thing, but gee...
00:11:46 <Eddi|zuHause> given an engine and a cargo, and a usage pattern, the AI callback will return a fitting wagon
00:12:51 <_glx_> but newgrf rarely implement it
00:13:09 <Eddi|zuHause> yes, because OpenTTD never used it
00:19:18 <Eddi|zuHause> back when noai was introduced, i was told off for suggesting to implement it...
00:21:34 <_glx_> if you want some fun, try dbset where some engines require a specific amount of passenger cars
00:21:51 <_glx_> or old UKRS and the mandatory caboose
00:21:59 <peter1138> And that's from 2004 or something :p
00:24:42 <_glx_> and fallback to your expensive method for unknown newgrf
00:25:19 <_glx_> that's just a lot of combinations ๐
00:25:29 <peter1138> Implementing the callback to allow AIs to use it doesn't mean AIs need to use it.
00:25:46 <peter1138> But, uh, difficult to test without much source material ๐
00:26:15 <_glx_> I think dbset had the AI callback
00:27:16 <peter1138> IIRC the callback is able to return special AI-only vehicles which allow the AI to cheat. So that'll have to be filtered out.
00:28:02 <Eddi|zuHause> well, the command to actually purchase the returned vehicle should take care of that
00:28:29 <_glx_> oh and nml doesn't implement CB18 ๐
00:28:49 <Eddi|zuHause> that's a different problem :p
00:29:31 <_glx_> many newgrf are written with nml, so without nml support it's not very useful
00:30:21 <_glx_> ah and the CB doesn't support railtypes or NRT
00:33:36 <peter1138> Or multiple NewGRFs.
00:34:08 <_glx_> "This makes it possible to leave certain decisions to the previous handler and allows some cooperation between several .grf files. "
00:34:20 <_glx_> it's supposed to support multiple grf
00:35:06 <_glx_> but "For trains, the track types (0=regular, 1=electric, 2=monorail, 3=maglev) are automatically mapped as appropriate depending on the electrifiedrailways/unifiedmaglev switches."
00:36:46 <peter1138> Almost like it wasn't implemented for a reason ๐
00:38:14 <_glx_> I really think it's simpler to check for newgrf presence and provide working association directly in the AI code
00:40:29 <_glx_> or introduce variants support in the API so it's possible to filter them out
01:42:03 *** Wormnest has quit IRC (Quit: Leaving)
01:48:17 *** tokai|noir has joined #openttd
01:48:17 *** ChanServ sets mode: +v tokai|noir
01:55:11 *** tokai has quit IRC (Ping timeout: 480 seconds)
02:01:39 *** wallabra has quit IRC (Read error: No route to host)
02:02:20 *** wallabra has joined #openttd
02:02:51 *** herms has quit IRC (Quit: bye)
02:36:31 <merni> _glx_: Or xussr which requires specific arrangements of head, motor and trailer cars
03:00:01 *** herms has quit IRC (Ping timeout: 480 seconds)
03:30:46 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:40:37 <DorpsGek> - Update: Translations from eints (by translators)
06:21:26 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:07:29 <andythenorth> Funny thing: all Horse wagons are compatible with all engines, assuming same track type ๐
07:07:48 <andythenorth> Because attach checks are completely stupid
07:09:57 <andythenorth> _glx_: Literally just recolour sprites in many cases ๐
07:21:21 <ahyangyi> andythenorth: And one can even use Horse wagons with engines from other mods
07:21:52 <ahyangyi> I think Horse even has a parameter to support this use case?
07:42:26 <emperorjake> ahyangyi: Assuming those other mods don't have coupling restrictions on their wagons
07:43:09 <emperorjake> and also the fact that Horse has a slightly different alignment to most other trainsets
07:48:28 *** SigHunter has joined #openttd
08:29:07 <LordAro> there you go, can rebase now :)
08:31:17 <kamnet> Hey everyone, I'm thinking of putting together a promotional video for OpenTTD 14, and setting up a multiplayer server to show off some of the new features. Would any devs who worked on the new features be interested in participating in a live broadcast and interview to personally talk about the features and improvements?
08:43:47 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
09:23:57 <orudge> Nightlies look to be signed fine with the new certificate
09:33:38 *** Leopold_ has quit IRC (Ping timeout: 480 seconds)
09:35:53 *** Leopold_ has joined #openttd
10:58:26 *** D-HUND is now known as debdog
11:20:32 *** ChanServ sets mode: +v tokai
11:20:35 *** Eddi|zuHause2 has joined #openttd
11:20:40 *** wallaby2 has joined #openttd
11:20:55 *** azubieta6082266638 has joined #openttd
11:21:01 *** pickpacket7 has joined #openttd
11:24:51 *** wallabra has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:51 *** tokai|noir has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:51 *** kale91 has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:51 *** drludde has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:51 *** charlieatlas_ff03k64 has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:51 *** xertov has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:51 *** kamnet has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:51 *** talltyler has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:51 *** _glx_ has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:51 *** pickpacket has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** Eddi|zuHause has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** jeeg[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** azubieta608226663 has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** giords[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** emilyd[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** Farrokh[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** cjmonagle[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** einar[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** patricia[m]1 has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** audunm[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** temeo[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** rain[m]1 has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** karl[m]12 has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** playback2396[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** yubvin[m] has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** KenjiE20 has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** calbasi[m]1 has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** peter1139 has quit IRC (reticulum.oftc.net helix.oftc.net)
11:24:52 *** pickpacket7 is now known as pickpacket
11:29:48 *** peter1139 has joined #openttd
11:35:46 *** KenjiE20 has joined #openttd
11:35:47 *** charlieatlas_ff03k64 has joined #openttd
11:35:48 *** talltyler has joined #openttd
11:36:13 *** drludde has joined #openttd
12:11:58 *** calbasi[m]1 has joined #openttd
12:25:34 *** SigHunter_ has joined #openttd
12:27:02 *** SigHunter has quit IRC (Ping timeout: 480 seconds)
12:32:18 <xarick> wormnest: hey, still alive?
12:32:51 *** SigHunter has joined #openttd
12:32:56 <xarick> I notice NoNoCAB underperforming vs NoCAB...
12:33:23 *** emilyd[m] has joined #openttd
12:35:37 *** SigHunter_ has quit IRC (Ping timeout: 480 seconds)
12:43:51 <peter1138> Hmm, I've no idea how SlCopy works.
12:59:05 <_glx_> peter1138: Copies bytes from/to savegame ?
13:00:56 <peter1138> I found a better way ๐
13:03:33 <frosch123> truebrain: how large is the json overhead? i assumed name, description text and tags are long enough to make the []",: and keys "name", "desc", "tags" irrelevant
13:03:42 *** giords[m] has joined #openttd
13:03:53 *** Farrokh[m] has joined #openttd
13:04:44 <_jgr_> Is you're using HTTP or something derived from it, then gzip compression makes JSON not such a big issue
13:08:46 *** jeeg[m] has joined #openttd
13:10:24 <peter1138> All those 256 slots get used a lot ๐
13:18:33 *** wormnest has joined #openttd
13:18:33 <wormnest> xarick: Sure, I've noticed that too sometimes, but it's not always easy to pinpoint where exactly the problem is. Could be that some of the extra safety checks have negative side effects.
13:18:48 <__karma> Hey, I got a question regarding issue #11345 I believe my last commit fixes the issue, but also changed the text so that each mode shows only its units, should this be included in the same PR or not?
13:26:42 <xarick> oh I like the new CheckShipReverse
13:31:29 <xarick> kuhnovic: while (node->m_parent != nullptr) {
13:33:49 *** cjmonagle[m] has joined #openttd
13:34:03 *** playback2396[m] has joined #openttd
13:35:03 <xarick> you always forget the != nullptr
13:35:30 <kuhnovic> Oh ๐ yeah that's a habit of mine
13:36:13 <talltyler> __karma: Yes, I think so. It could be a separate commit within the same PR if thatโs easy, it makes reviewing nicer ๐
13:38:29 <kuhnovic> xarick: Indeed, but more importantly, it means that all the special logic such as the restrict-on-second-attempt stuff doesn't need to be duplicated ๐
13:47:42 <peter1138> such saving in savegame size :p
13:53:37 *** marchnex has joined #openttd
13:54:01 <peter1138> If only vectors could use less than 24 bytes on 64-bit ๐ฆ
13:56:45 *** marchnex has quit IRC (Remote host closed the connection)
13:57:43 <kuhnovic> Not necessary, but a nice way to explicitly say that you want to omit a return value. It also makes sure compilers don't throw any warnings.
13:58:51 <xarick> nobody else seems to do that way from the cases I found
14:01:15 <xarick> a slowdown is expected on my 70k ships save
14:01:33 <xarick> reverse now doing the 2 attemps
14:02:53 <peter1138> Compilers don't usually warn if you ignore the result. That's why we use `[[nodiscard]]` when we want to make sure it's not ignored.
14:04:29 <xarick> hmm it's actually faster, that's odd
14:04:49 <xarick> either something broke
14:04:55 <xarick> or... too good to be true
14:05:46 <peter1138> Good before and after co,parison there....
14:06:07 <xarick> I vaguely remember it was in the 50s
14:09:34 <kuhnovic> Reverse will only do the 2nd attempt if the 1st one wasn't succesful. That does happen, but not often.
14:10:32 <xarick> funny, it's even faster on master
14:10:39 <xarick> what the heck happened
14:16:14 <peter1138> Someone upgraded your CPU.
14:16:31 <xarick> i just tried single core affinity for openttd, and video output is laggy as hell
14:16:38 *** asymptotically2 has quit IRC (Remote host closed the connection)
14:16:48 <peter1138> That's because OpenTTD uses two threads.
14:16:50 <xarick> mouse pointer struggles to move even on windfows
14:17:13 *** asymptotically2 has joined #openttd
14:17:55 <xarick> so openttd now requires a dual thread system
14:20:35 <xarick> select sorting criteria should have a "vehicle is lost" filter
14:23:22 <xarick> instead of discarding the path cache when testing reverse, it should keep it
14:23:51 <xarick> this way it wouldn't need to ChooseShipTrack again
14:26:59 <peter1138> Not required, but if you deliberately force it onto one core it'll perform worse...
14:33:03 <xarick> so yeah, there is a slowdown
14:33:46 <xarick> waiting for new year to check for lost ships, if any
14:33:54 *** Wormnest_ has joined #openttd
14:36:03 <xarick> locks are like a mini breakdowns
14:36:12 <xarick> they actually slow down a lot
14:38:55 <xarick> 160 days in transit when I targeted 65
14:40:37 <xarick> makes me wonder if i should use the ferry instead of hovercraft
14:41:34 *** yubvin[m] has joined #openttd
14:44:00 <xarick> kuhnovic: this seems like a regression
14:44:12 <xarick> those ships there are acting weird
14:44:45 *** karl[m]12 has joined #openttd
14:44:52 <kuhnovic> I can't really tell anything from that screenshot
14:44:55 <xarick> if profit is -ยฃ3117, they're lost
14:45:14 <xarick> they're going back and forth, reversing non stop
14:45:45 <ahyangyi> Are these boats all stacking in the same position?
14:45:58 <xarick> yes, seem to be stuck at doing reverse
14:46:07 <kuhnovic> Hmm, can you send me a savegame?
14:46:08 <xarick> master doesn't have this problem
14:46:25 <xarick> uh, yeah, it's a big save 70k ships
14:46:35 <kuhnovic> That's what I was afraid of :p
14:47:57 <xarick> and they will start accumulating there
14:48:40 <kuhnovic> Can't run it now, but will look into it soon
14:50:25 <__karma> talltyler: Btw what tag should I use in the commit message? Does this message look ok?
14:50:25 <__karma> Tag: Display correct default value and unit for vehicle service interval
14:51:24 <peter1138> Either Fix: or Change: here, depending on how wrong you feel it is before ๐
14:56:41 <__karma> Alright Change: fits better ig, since nothing was broken before lol
15:14:43 *** einar[m] has joined #openttd
15:15:03 <__karma> Another question, do you require unit tests to show that an issue has been fixed, in the commit/pr?
15:18:27 <merni> But attaching a savegame or such would probably help
15:18:34 <merni> And screenshots if applicable
15:23:27 <xarick> pathfinder is being dumb for some reason
15:23:47 <xarick> the cost for reversing should be 100000 or something
15:23:57 <xarick> kinda like rail pathfinder does it
15:24:19 <merni> the rail pathfinder allows reversing?
15:24:44 <merni> I don't think it can find a route that require a train to reverse
15:25:00 <xarick> yes, when departing from stations
15:26:06 <xarick> rails are a bit different, an entire segment of tracks until it finds a crossing or a signal is 1 node
15:26:29 <xarick> water tracks, a segment is every tile
15:26:58 <xarick> so they can check for reversing every tile (on this PR though), unlike trains
15:28:15 <kuhnovic> Yeah and currently I added no reversal penalty to the ship pathfinder. Maybe that's the fix, but it feels more like a bandaid than a fix. Need to dig into Xarick's save first.
15:28:52 <LordAro> __karma: if adding unit tests is easy, then by all means add some :p
15:30:05 *** Eddi|zuHause2 is now known as Eddi|zuHause
15:53:03 <xarick> wow, it's not a rare occurence at all
15:53:08 <xarick> all companies are affected
15:58:20 <kuhnovic> The ships-going-back-and-forth-thing?
16:01:05 <xarick> wondering if it's because they're bordering
16:03:31 <xarick> seems that on one direction, they get one region as start, and on the reverse they get another
16:04:26 <kuhnovic> That's indeed what I suspect at well. Could be the region pathfinder, but it could also be the low level PF.
16:05:04 <kuhnovic> It' similar to #12176. But the fix for that issue doesn't fix this, because you can't cache a path with a reversal in it, it won't work.
16:06:15 <kuhnovic> Reversal penalties might be the solution here. Or "only reverse if all else fails".
16:06:38 <LordAro> which can be achieved with a suitably high penalty
16:06:59 <LordAro> adding a special case for reversing seems hacky
16:10:02 <kuhnovic> Depends on whether you see reversal as "the only way out in case of utter failure" or "just an option, but not the preferred one". But in this case it's most likely the latter.
16:11:40 <kuhnovic> xarick: Did see this happening in the code, or is it just a suspicion?
16:13:37 <xarick> the 'tile' you pass on is the tile the ship is about to enter, but the ship isn't yet on that tile, so on reverse, you can get different regions as start
16:14:09 <xarick> seems to be a design choice that is now bitting back at you
16:16:09 <xarick> maybe don't let reverse be a choice in YapfShipChooseTrack
16:16:32 <xarick> unless that's something you intend to happen
16:19:03 <xarick> discord doesn't like .mkv
16:20:41 <xarick> I still don't quite get why the pf prefers to move northwest, the dock is at the bottom side
16:23:01 <xarick> i need to see it print the tracks, this debug is failing me
16:33:20 <peter1138> "Edge cases won't happen very often"
16:41:23 <kuhnovic> xarick: The region pf now takes both the reverse region (the current ship tile) and the forward region into account.
16:44:45 *** patricia[m]1 has joined #openttd
16:44:55 *** temeo[m] has joined #openttd
16:47:40 <Eddi|zuHause> dunno what there's to misread :p
17:05:46 <Eddi|zuHause> i was being ironic :)
17:06:04 <xarick> seems to be again the case of intermediate regions
17:07:50 <xarick> one sets the intermediate region at 51,26, the other on 50,26
17:08:19 *** Wormnest_ has quit IRC (Ping timeout: 480 seconds)
17:26:25 <xarick> hmm what should I do there? test speed?
17:34:33 *** Wormnest_ has joined #openttd
17:35:46 <xarick> waiting 1 year to check if there's lost ships
17:41:06 <xarick> openttd must be very memory sensitive
17:41:27 <xarick> 1 openttd, ship ticks ~39 ms
17:41:41 <xarick> 2 openttds, ship ticks ~46 ms
17:42:05 <xarick> I've been testing this the wrong way ๐
17:45:04 <LordAro> it's almost self evident that you want to be doing as little else as possible when benchmarking
17:45:09 <LordAro> i'm sure we've told you that before
17:45:32 <LordAro> games are more sensitive than most
17:46:06 <LordAro> OTTD isn't the most multi-threaded game out there, but it'll be just as sensitive to memory & storage resource usages
17:48:08 <xarick> not even thread affinity helps ๐ฆ
17:48:50 <LordAro> the only thing that could is if you could limit memory bandwidth, and i'm not aware of any platform that you can do that on
17:48:54 <LordAro> especially not Windows
17:50:58 <xarick> there is a way after all
17:51:48 <LordAro> i'm 90% certain this will not do what you want it to
17:53:10 <xarick> why not, seems to be improving
17:53:48 <LordAro> because OTTD isn't (generally) bottlenecked on the number of cores that are available
17:58:03 *** HerzogDeXtEr has joined #openttd
18:07:38 *** xertov has quit IRC (Quit: User went offline on Discord a while ago)
18:33:15 <andythenorth> from the 'nobody asked for this' reddit suggestions wishlist, a nugget of silver
18:33:24 <andythenorth> buildable tile fences
18:33:37 <andythenorth> so many objects, stations and industries faff about with fencing
18:39:01 <xarick> what I see however is the extreme slow down effect of locks
18:41:08 <xarick> 600 days to complete a journey
18:41:21 *** rain[m]1 has joined #openttd
19:07:19 *** gelignite has joined #openttd
19:08:16 *** audunm[m] has joined #openttd
20:15:46 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:19:19 <truebrain> you got to love commit messages ๐
20:22:02 <talltyler> Should it be marked for backporting?
20:22:32 <truebrain> (don't expect serious answer from me tonight ๐ )
20:23:19 <andythenorth> fair warning ๐
20:28:23 *** gelignite has quit IRC (Quit: Stay safe!)
20:30:49 <Rubidium> and I just wanted to get a serious answer from you :( For python you suggested to use cryptography, but that does not have the encryption routine we need (chacha with a 24 byte nonce) so you need some other library like pycryptodome. That made me think, why not use some bindings for monocypher but found already existing ones. Would using pymonocypher be a worse solution than using two (more common)
20:31:24 <truebrain> pymonocypher would be a good idea, if the license is nice, and it is up-to-date-ish
20:32:05 <truebrain> I believe the latter was a bit of an issue
20:32:51 <Rubidium> it's CC0 or BSD-2. Only caveat is the up-to-dateness, that's about about one-and-a-half year
20:33:11 <truebrain> I don't know if that has any impact
20:39:16 <talltyler> We backport translator commits, so I marked this one too
21:11:21 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
21:18:36 <truebrain> Rubidium: you can btw always make a bug report in the pymonocypher's repo, see if that author is willing to upgrade to v4
21:19:20 <andythenorth> hmm recolour-only special variants? ๐
21:19:35 <andythenorth> just an ID, and a recolour sprite? ๐
21:19:43 <Rubidium> truebrain: monocypher v4 renamed a lot of things, and we do not need everything from v4... but 3.1.3 misses some bits in blake so it's going to be a bit of pain :(
21:19:49 <andythenorth> (as a static action 0 prop)
21:19:55 <truebrain> so ask the author ๐
22:04:41 <andythenorth> wallclock, such a better game pace
22:07:07 *** reldred has quit IRC (Quit: User went offline on Discord a while ago)
22:14:10 <peter1138> Big coop iron horse firs game?
22:14:41 <peter1138> Or maybe that 7 year challenge but 7 years being stretched out ๐
22:20:27 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:55:13 <rau117> andythenorth: Hmm... on the other hand, being able to place a fence (or some other object) on top of another tile would be nice.
22:55:13 <rau117> This will cause problems, but it will create a lot of new decorating opportunities
22:58:34 <peter1138> Remember when tile-edge signals was the meme...
23:09:57 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
continue to next day โต