IRC logs for #openttd on OFTC at 2024-11-04
⏴ go to previous day
01:36:14 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
02:12:28 *** XYZ has quit IRC (Read error: Connection reset by peer)
03:24:55 *** Wormnest has quit IRC (Quit: Leaving)
03:34:53 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:10:37 *** XYZ_ has quit IRC (Read error: Connection reset by peer)
04:15:22 *** D-HUND is now known as debdog
04:47:39 <DorpsGek> - Update: Translations from eints (by translators)
06:04:43 *** XYZ has quit IRC (Read error: Connection reset by peer)
06:11:56 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:23:17 *** Lukas[m]12 has left #openttd
06:35:16 *** TinoDid|znc has joined #openttd
06:36:34 *** TinoDidriksen has quit IRC (Ping timeout: 480 seconds)
06:47:43 *** TinoDid|znc is now known as TinoDidriksen
07:13:58 *** ialokin has joined #openttd
07:16:15 <DorpsGek> - Add: summary for week 44 of 2024 (by OpenTTD Survey)
09:16:03 *** XYZ_ has quit IRC (Ping timeout: 480 seconds)
10:33:45 <peter1138> Can we get shares in OpenTTD? 😄
10:35:07 <peter1138> I am sure my fingers are broken.
10:35:21 <andythenorth> my fingers are numb, is it cold?
10:35:33 <andythenorth> I was in Tenerife last week, it was more ambient
10:48:12 <peter1138> Can we get shaders in OpenTTD?
11:11:02 <reldred> Ugh hate those fake CRT shaders
11:11:17 <reldred> First thing I turned off in dosbox-staging
11:13:06 <peter1138> I actually like this one, it's subtle enough for me. It's not trying to be like a TV.
11:13:52 <peter1138> No warp rounded edges or irrelevant NTSC smearing...
11:14:14 <peter1138> (And no, I don't really want it in OpenTTD :))
11:33:39 <peter1138> Store it in the map. bonus side effect: cliffs.
11:34:46 <xarick> ` int hmin = std::min({ hnorth, hwest, heast, hsouth });
11:34:46 <xarick> int hmax = std::max({ hnorth, hwest, heast, hsouth });`
11:42:01 <xarick> I threw GetTileSlopeGivenHeight into CoPilot
11:47:46 *** XYZ has quit IRC (Ping timeout: 480 seconds)
11:50:05 <xarick> hmm he's into something
11:50:45 <xarick> just need a little hand and order the array matching the SLOPE_x's
11:56:49 <xarick> isn't there a corner to slope?
12:06:44 <xarick> SlopeWithOneCornerRaised got it
12:29:07 <peter1138> But you have the tools to benchmark.
12:44:57 <LordAro> peter1138: good grief
12:54:10 <belajalilija> peter1138: Sounds like a good idea
13:10:02 *** Wormnest has joined #openttd
13:29:53 <xarick> wow, the sheer amount of tiles this function is called is staggering
14:08:26 <peter1138> Maybe we need a better user interface.
14:13:34 <belajalilija> What game is that?
14:14:13 <belajalilija> I woulda guessed that but the RCI was in the wrong order
14:15:38 <peter1138> It's RCI in SimCity 2000, but before that anything goes.
14:18:58 <peter1138> And the classic BBC Micro version.
14:23:08 <belajalilija> Reminds me of the bug that exists in locomotion and rct where the palette can sometimes become inverted
14:24:06 <peter1138> Oh this is deliberate, this hardware only has 4 colours (out of 8) in that graphics mode. And it's already doing timing trickery to change the palette for the toolbar.
14:24:33 <peter1138> When you only have 32KB, and your graphics display takes up a large chunk of that, you have to get... serious.
14:25:54 <peter1138> And yes they are also very non-square pixels.
14:28:06 <peter1138> ZX Spectrum version is perhaps better visually. More colours and higher resolution, because it didn't actually have full colour graphics, it's monochrome with an additional 8x8 pixel colour attribute.
14:34:04 *** pitagoras991_44893 has joined #openttd
14:34:04 <pitagoras991_44893> peter1138: this looks really good, compared to micro version...
14:34:38 <belajalilija> The ZX Spectrum version looks tolerable at least
14:35:59 <pitagoras991_44893> belajalilija: it would have looked good...
14:35:59 <pitagoras991_44893> On an phone
14:35:59 <pitagoras991_44893> Just move one row of buttons to the top and we will have an good touch interface
14:36:00 <belajalilija> I know my mam had a ZX Spectrum, it’s wild to think that there’s only about a 5 year gap between the games she played as a kid and the games i played as a kid
14:36:39 <pitagoras991_44893> back in those days computer were delevoping soo rapidly!
14:36:41 <belajalilija> pitagoras991_44893: Nah, can’t get behind mobile gaming
14:37:00 <pitagoras991_44893> belajalilija: what do you mean?
14:37:21 <belajalilija> It’s just too uncomfortable for me
14:39:32 <belajalilija> I don’t find staring at my phone for long times comfy unless I’m in bed or similar
14:39:52 <belajalilija> Just hurts my neck to stand or sit in that way
14:41:11 <pitagoras991_44893> for me too
14:41:17 <pitagoras991_44893> also 99% of mobile games is just shit
14:41:30 <pitagoras991_44893> that bombards you with ads and microtransactions
14:41:35 <pitagoras991_44893> not to mention terrible sound...
14:42:09 <pitagoras991_44893> music (or viedo) being played from an mobile whotut headphones or speaker sounds soo dreadfull that my head hurts
14:44:03 <belajalilija> I’m just most happy with a noise and keyboard
14:44:26 <belajalilija> I’ve been able to type blind for as long as i can remember so it just comes naturally to me
15:12:07 <peter1138> belajalilija: We call it touch-typing 🙂
15:19:27 <peter1138> I downloaded 3 random multiplayer games the other day. They have between 7 and 9 companies so fairly well established. None of them had any ships.
15:22:14 <peter1138> Which suggests we don't need to optimise for 70,000 ships 🙂
15:23:31 <talltyler> peter1138: I talked to a friend the other day who told me his multiplayer group never used ships for performance reasons, but he’d like to try them now that the devs made the pathfinder multi-core. 🙂
15:24:30 <talltyler> I guess he only read the patch notes and not kuhnovic’s blog post 😛
15:24:34 <belajalilija> peter1138: I hear that it is counted as a skill
15:25:09 <belajalilija> I’ve also heard that the younger gen zers also struggle with computers more than gen x-old gen z
15:25:13 <peter1138> Does anyone here actually NOT touch type? I can't imagine having to look at the keyboard.
15:25:25 <peter1138> Maybe the mobile users.
15:25:37 <belajalilija> But in the general populace
15:26:30 <belajalilija> I remember i was doing something in college about 9 years ago and people who were my age (I’m 27 now) wondered how i could type without looking at the keyboard
15:27:04 <belajalilija> I think we’re the exception to the rule
15:27:05 <kuhnovic> I guess it will take a while until ships become more popular. They still have a bad reputation.
15:27:34 <peter1138> Maybe we need to hide other vehicle types, like we hide the bad signals.
15:32:12 <ketsuban[d]> I think part of the problem is that the terrain generation is by default biased towards producing a single giant island. There's not a lot of incentive to use ships to move stuff around the periphery of the play area - 90% of the industries aren't adjacent to water, and canals are too expensive to be worth using.
15:36:48 <_jgr_> Canals only really make sense to connect closely adjacent bodies of water. Even if they were cheap it wouldn't be worth using them within a large land mass.
15:37:41 <xarick> The corner method isn't faster 😦 I created a script running GetTileSlope all over the map
15:37:48 <_jgr_> It isn't too hard to get the terrain generator to make large bodies of water, e.g. by raising the sea level setting.
15:39:08 <peter1138> There's no general "shaping" because what works for 256x256 does not work for 4096x4096.
15:43:08 <xarick> auto heights = { hnorth, hwest, heast, hsouth };
15:43:08 <xarick> int hmin = std::min(heights);
15:43:08 <xarick> int hmaxnw = std::max(heights);```
15:43:10 <peter1138> I've got some separate work that might help.
15:43:40 <xarick> oops wrong variable name
15:43:58 <peter1138> Basically it needs high-amplitude low-frequency perlin noise map that is not affected by the Smooth/Rough setting. And TGP doesn't have the ability to have separate perlin noise maps.
15:44:42 <peter1138> (It could maybe be bodged into TGP by having a fixed low-frequency pass, but I had TGP enough already :D)
15:45:03 <peter1138> Maybe not fixed. "Landmass size".
15:47:37 <peter1138> Step 1: Identify a bottleneck
15:48:06 <xarick> I'm massing GetTileSlope with a GS
15:48:46 <peter1138> An artificial test case isn't the same as identifying a bottleneck.
15:51:49 <xarick> I guess GetTileSlopeGivenHeight is already maximally optimized
15:52:06 <xarick> can't extract any more performance out of it
15:53:59 <xarick> 3 steps of std::min are faster than 1 single step
15:55:02 <peter1138> Probably, your "single step" needs to turn it from individual variables into an array.
15:55:46 <peter1138> And who knows whether that array is stored in RAM or in registers.
15:58:51 <_jgr_> xarick: How do you think that "1 step" is implemented?
16:00:08 <xarick> no idea... std:: stuff is impossible to read
16:03:17 <xarick> GetTileZ and GetTileMaxZ could perhaps be done in the same manner?
16:13:45 <Borg> damn, took me years to understand and master YAPF...
16:13:56 <Borg> but now.. it works like a charm
16:14:50 <Borg> PBS and PBS back signals are briliant :)
16:20:55 <xarick> my very unscientific method of measuring openttd speed via who fast forwards faster, tells me that GetTileZ and GetTileMaxZ can be made faster 🙂
16:34:19 <_glx_> using our own min/max made no sense when they are available in standard library
17:17:36 <peter1138> Did you performance test it?
17:17:46 <xarick> yes, with fast forward
17:17:59 <peter1138> Did you profile it?
17:18:20 <xarick> no, 😦 not really sure how to do it for these tiny ones
17:19:35 *** D-HUND has quit IRC (Remote host closed the connection)
17:21:21 <johnfranklin> has the "ships cost computer performance" thing been solved?
17:22:57 <xarick> tested with 70000 ships
17:23:48 <xarick> gets around 0.25x - 0.30x simulation rate
17:26:51 <peter1138> Back when the main typeface for a game was 3x5 pixels 😄
17:27:19 <xarick> woah that was one of my favourite games
17:30:50 <johnfranklin> Because I am afraid of "you lose" message, I refuse lots of such games including Civilisation, Europa Universalies, even Railway Empire by Kalipso...
17:32:08 *** bornacorn has joined #openttd
17:32:08 <bornacorn> Pixelised text that small reminds me of sprite sheet numbering
17:34:02 <xarick> the GS used for testing
17:39:39 <Borg> ahhh Colonization :) I remember it.. good game
17:39:47 <Borg> and those fonts.. similar to Master of Orion
17:44:35 <xarick> how do I profile OpenTTD
17:58:10 *** HerzogDeXtEr has joined #openttd
18:05:27 <Borg> even all those years.. and tuning.. pathfinder sometimes suprise me w/ not so good decisions..
18:07:10 <peter1138> If you're "tuning" it then it's probably something subtle you've "tuned"
18:07:59 <Borg> peter1138: 99.9% im very happy w/ settings
18:08:05 <Borg> yeah, I tuned it quite a bit..
18:08:51 <Borg> im currntly using: Borg (new)
18:09:30 <Borg> and works very very well... sometimes there are little quirks I dont get.. like there is path free. and train do NOT take it.. waiting for other one to free..
18:09:37 <Borg> but as I said.. its very rare
18:11:37 <debdog> peter1138: dang these TGVs look good! which newgrf is that?
18:11:47 <Borg> peter1138: if you interested, I can share probably interesting case...
18:16:18 <Borg> now description if situation
18:16:45 <Borg> the lower right food train nearly left that track. moving to bridge
18:17:24 <Borg> and now upper right food train going to the left is taking wrong path imo
18:17:46 <Borg> not sure why it gets lower track.. where entire upper track is free.. up to PBS
18:18:00 <LordAro> i think junctions have a cost
18:18:13 <Borg> it should be even preffered.. because lower one have RED block signal. with have penalty
18:18:16 <Borg> LordAro: yes.. everything have cost
18:18:18 <LordAro> but really a screenshot is impossible to tell
18:18:22 <peter1138> The penalty for the 3 junctions is higher than the penalty for the occupied tiles, probably.
18:18:40 <Borg> if I would remove the lower left train.. I mean.. no trains there
18:18:50 <Borg> that food track would take straight path
18:18:55 <Borg> I can make another screen if you want
18:19:01 <LordAro> a save would be more useful
18:19:19 <Borg> its old OpenTTD tho.. its all right?
18:19:50 <LordAro> i don't know why it wouldn't be
18:21:14 <Borg> shit.. you need grfs probably
18:21:40 <LordAro> don't distribute anything you don't have permission to
18:21:56 <Borg> its mine stuff I did them
18:22:23 <Borg> GS is not necessary I guess
18:30:06 <Borg> LordAro: any conclusions? ;)
18:31:22 <xarick> I don't know what to make of this 😦
18:33:38 <peter1138> I reset all the penalties to default and that situation doesn't recur. But it could be timing related.
18:34:30 <Borg> peter1138: yeah it takes a while to get right situation..
18:34:31 <_jgr_> xarick: You're missing the point a little. The expensive bit is the calls to TileHeight, to read the height values. The order you do you std::min calls in doesn't matter that much.
18:34:59 <Borg> peter1138: but reseting all penalties is nono :) took a damn white to tune them..
18:35:32 <Borg> as I said.. interesting triva... maybe I will dick into YAPF source again..
18:36:27 <Borg> I could probably making easy work around
18:36:38 <Borg> by placing PBS+block signal right before PBS
18:36:52 <Borg> so that green light would be preffered for pathfinder
18:37:35 <peter1138> Hopefully @LordAro gets his arse into gear and rebases that PR to remove the settings...
18:38:20 <Borg> what settings? look_ahead?
18:39:44 <peter1138> Might be a rewrite at this point 😄
18:40:55 <Borg> peter1138: yep.. placing block signal right before PBS seems to fix it.. Ill watch more to confirm
18:48:36 <Borg> but as I said.. its very minor.. and not problematic in that case
18:49:05 <Borg> because even if train uses "weird" path.. its still correct.. and load balance nicely
18:57:58 <Borg> okey.. I changed the layout there.. to even better :>
19:02:58 <Borg> peter1138: so, imo those settings I have are best
19:03:11 <Borg> correct load balancing.. correct primary vs auxiliary tracks
19:03:27 <Borg> correct waiting for platforms when there is just 1 signal ahead
19:03:41 <Borg> there is little triva hidden in YAPF code :) when looking for platform
19:03:57 <Borg> look_ahead_max_signals/2
19:04:27 <Borg> It took me few days of digging thro YAPF code to understand what it did and how badly it works with default look_ahead_max_signals=10 :)
19:15:09 *** gelignite has joined #openttd
19:38:41 <xarick> i think i can make rivers generate faster
19:39:10 <xarick> some expensive functions are repeated, they could perhaps be stored in a variable
19:55:25 <andythenorth> hmm, german-speaking friends of the channel, how might you translate `Stückgut` ?
19:57:04 <debdog> andythenorth: may depend on context: general cargo, package freight, piece goods
19:58:07 <andythenorth> so we have cargo class `piece goods` as a direct translation
19:58:25 <andythenorth> but in English-speaking logistics, that term is only used within the textile industry
19:59:28 <debdog> except for ships, then it is general cargo
20:00:50 <debdog> wikipedia translates it to "Breakbulk cargo"
20:00:53 <andythenorth> breakbulk might be a non-literal translation
20:05:55 <peter1138> _jgr_: does GoodsDataEntry help performance or just memory?
20:06:42 <peter1138> (or was it GoodEntryData)
20:08:38 <_jgr_> My motivation was memory. Using less memory tends to have some performance benefit in of itself.
20:09:44 <peter1138> I looked at doing something with GoodsEntry before but focused on the whole thing, which didn't really work because lots of things touch ratings without cargo ever being involved.
20:10:29 <peter1138> Really wish C++ had a coalesce operator though 😄
20:30:03 <peter1138> Really wish I knew what all this SwapPackets business is about in saveload.
20:32:15 <peter1138> Data format change I guess.
20:45:14 <_jgr_> Effectively putting a std::vector<Order> into OrderList and getting rid of the pool and linked-list stuff for struct Order.
20:45:29 <_jgr_> I was pondering PRing this at some point if I can make the saveload stuff nicer.
20:48:48 <xarick> couldn't make river gen much faster 😦
20:49:18 <xarick> there's two loops of diagdirections, im trying to make it only loop once
21:00:54 *** ChanServ sets mode: +v tokai
21:04:50 *** Borg has quit IRC (Quit: leaving)
21:06:55 *** gelignite has quit IRC (Quit: Stay safe!)
21:07:33 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
21:08:03 <_glx_> river gen happens only one time so not very important
21:08:37 <xarick> it's faster on linux even as a virtual machine for some reason
21:09:40 <_glx_> and it's usually not the slowest part of map generation, placing industries takes more time (especially for newgrf ones with landscape constraints)
21:14:51 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:26:15 <xarick> if he's caring so much about not breaking river tiles why not sure DC_NO_WATER on the terraform command 😦
21:27:57 <talltyler> I didn’t know about that flag when I wrote the code, I think 🙂
21:28:19 <talltyler> (But that was a long time ago, so I don’t really recall)
21:28:53 <xarick> I see it's being terraformed multiple times
21:29:06 <xarick> needs to keep track of terraformed tiles somehow
21:36:05 <xarick> nevermind, DC_NO_WATER can't be used on shores
21:46:51 <LordAro> peter1138: how does wentbourne do? :p
21:48:32 <peter1138> I don't keep a master tree lying aruond to compare 😦
21:48:51 <peter1138> (The Steam nightly build is different enough to make comparisons invalid)
21:52:28 <peter1138> Worst way to compare ever 😄
21:54:03 <xarick> try the fast forward method!
21:54:11 <peter1138> For stations it should be 4.5MiB instead of 20.6MiB.
21:54:24 <peter1138> But not including the GoodsEntry data that is needed.
21:55:04 <xarick> i think the 70k ships has more stations
21:55:27 <peter1138> Yes, about 1,000 per company. But it's also even worse of a test than Wentbourne.
21:56:00 <peter1138> Sadly our pools don't actually track how much memory is allocated.
21:56:16 <peter1138> Which would normally be a feature of something called a memory pool, but alas.
21:56:40 <peter1138> We'd probably just use a std::vector<T *> if we were implementing them these days 🙂
21:57:07 <_jgr_> One of the valgrind modes gives fairly detailed heap allocation tracking, I usually use that
21:57:19 <xarick> i have a savegame with 64k stations, it's "small"
21:57:31 <xarick> only stations, no vehicles
21:57:34 <peter1138> Fair, I always forget about valgrind. Mainly because it makes things even slower.
21:57:53 <peter1138> Wentbourne is already running at only 0.5x on my old CPU. Which was new not that long ago.
21:58:47 <peter1138> Okay, maybe I should make a nother OpenTTD check out and have a clean master to compare against.
22:00:33 <peter1138> Nice, cmake segfaulted.
22:03:28 <peter1138> Not interesting to me.
22:03:46 <peter1138> Testing normal usage works better.
22:08:01 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:17:04 <peter1138> Also, testing different versions helps.
22:17:20 <peter1138> (I cloned my local repo to avoid network access, and forgot it doesn't clone master, it clones the checked out branch)
22:18:43 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:31:29 <peter1138> Been so long I can't remember how to get the output I want.
22:31:49 <peter1138> massif seems to vague, callgrind isn't showing memory.
22:31:59 <peter1138> I'm sure I had something that was a combination of both before.
22:36:53 <_jgr_> You might need to adjust the --threshold setting?
22:46:00 <xarick> there are differences but...
22:46:24 <xarick> comparing unregulated terraform vs terraform failing when touching water
22:48:06 <xarick> honestly, I expected worse, I was expecting rivers being badly generated
22:48:15 <xarick> like, disconnected, malformed
22:48:21 <xarick> but no, they still exist fully
22:55:40 <xarick> it's noticeable where the terraform has failed now
22:56:16 <peter1138> [2024-11-04 22:56:00] dbg: [misc:0] Stations: Before: 24340416, Now: 5359552
22:56:16 <peter1138> [2024-11-04 22:56:00] dbg: [misc:0] GoodsEntryData: 7135 created, 3231 alive (387720)
22:58:19 <peter1138> [2024-11-04 22:57:49] dbg: [misc:0] Stations: Before: 588288000, Now: 129536000
22:58:19 <peter1138> [2024-11-04 22:57:49] dbg: [misc:0] GoodsEntryData: 7145 created, 0 alive (0)
22:58:29 <peter1138> Xarick's save. As I suspected, not a useful test.
22:59:38 <xarick> half a gigabyte of memroy?
23:02:57 <xarick> probably needs a bit of tweaking
23:03:10 <xarick> it's a bit shy on terraforming around sea level
23:04:24 <peter1138> Hmm, Wentbourne is 3231 / 2242 = 1.44 cargo data per station.
23:04:59 <peter1138> Yes, each station is 9192 bytes, so 64000 of that is 588MiB.
23:06:49 <peter1138> [2024-11-04 23:06:08] dbg: [misc:0] Stations: Before: 344084136, Now: 75764392
23:06:49 <peter1138> [2024-11-04 23:06:08] dbg: [misc:0] GoodsEntryData: 44725 created, 32988 alive (3958560)
23:06:54 <peter1138> Amazing Xarick's Savegame
23:07:30 <peter1138> 32988 cargo data, so not all stations are used.
23:15:27 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:16:10 <_glx_> not all stations are sources
23:16:30 <_glx_> some are just final destinations I guess
23:22:06 <peter1138> Hmm, that's true, no cargo packet list needed for destinations.
continue to next day ⏵