IRC logs for #openttd on OFTC at 2024-10-12
⏴ go to previous day
01:57:04 *** gelignite is now known as Guest6098
01:57:07 *** gelignite has joined #openttd
02:04:28 *** Guest6098 has quit IRC (Ping timeout: 480 seconds)
02:14:14 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:53:18 *** gelignite has quit IRC (Quit: Stay safe!)
02:56:51 *** gnu_jj_ has joined #openttd
02:59:59 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
05:42:19 *** reldred has quit IRC (Quit: User went offline on Discord a while ago)
06:16:23 <soylent_cow[m]> this city up above spreads by building super-long tunnels
06:20:05 *** HerzogDeXtEr has joined #openttd
07:11:18 <_pruple> did the town build those tunnels? It's quite unusual...
08:20:26 *** SigHunter has joined #openttd
08:32:31 <peter1138> Okay but what tunnels.
08:49:39 *** gelignite has joined #openttd
09:25:27 *** gelignite has quit IRC (Quit: Stay safe!)
09:49:15 <xarick> whats the hotkey for bringing up the framerate window?
10:18:52 <kuhnovic> Check hotkeys.cfg in your openttd folder
10:32:19 <peter1138> I changed my code to use a StrongType.
10:32:22 <peter1138> It failed to compile.
10:32:26 <peter1138> Because... I'd used the wrong type.
10:48:15 <xarick> i'm in a chicken egg situation way too often
10:51:50 <xarick> `if (IsDockingTile(n.GetTile()) && Yapf().GetVehicle()->current_order.IsType(OT_GOTO_STATION)) {`
10:52:37 <xarick> but I think it's insuficient
10:55:32 <xarick> but CheckIfShipNeedsService doesn't change the order until it actually finds a depot. The pathfinder checking current order may detect a goto station order while transitioning to a goto depot order 😦
11:27:52 <xarick> Which order should I place this?
11:27:52 <xarick> `IsDockingTile(n.GetTile())` &&
11:27:52 <xarick> `Yapf().GetVehicle()->current_order.IsType(OT_GOTO_STATION)`
11:29:16 <xarick> I reckon PfCalcCost is called a massive amount of times
11:59:34 <peter1138> HS2 is looking a bit damp at the moment...
12:00:36 <peter1138> Maybe they're doing it as a canal?
12:16:14 <xarick> can i build openttd with debug info and asserts disabled?
12:16:51 <xarick> a release build with debuginfo and asserts disabled
12:45:47 *** gelignite has joined #openttd
14:31:07 *** Hobbyboy has quit IRC (Quit: The BNC has broken!)
14:51:36 <xarick> no!! assert again... I'm losing my mind
15:50:52 *** Borg has quit IRC (Quit: leaving)
16:12:54 <soylent_cow[m]> <_pruple> "did the town build those tunnels..." <- Yes!
16:41:03 <wensimehrp> LC-ZorgviaGitHub: well
16:44:39 *** virtualrandomnumber has joined #openttd
16:45:22 *** virtualrandomnumber has quit IRC ()
16:51:46 <truebrain> Tnx for making my life easier 🙂
17:00:25 <kuhnovic> "you always have interesting points of view, but you don't have to write it down." . That gave me a good chuckle.
17:13:14 <kuhnovic> YAPF's templating stuff is just madness..
17:14:32 <truebrain> it actually is madness, yes
17:30:16 <peter1138> We could do with enforcing some standardisation on template parameter naming.
17:31:31 *** Flygon has quit IRC (Read error: Connection reset by peer)
17:35:35 <peter1138> (Not just across YAPF)
18:26:18 <kuhnovic> Honestly, YAPF could use some general cleaning up. Something with inheritance or maybe just function pointers (or std::function), not this CRTP-on-cocaine
18:42:24 <peter1138> CRTP should be fine but the way YAPF does it is kinda... obscured.
18:44:40 <peter1138> Avoiding virtual functions when performance is a concern can be worthwhile.
18:45:14 <peter1138> But also, it was written years and years ago.
18:48:16 <xarick> okay, so this assert is because of ship pos on tile
18:49:20 <xarick> need some mental gymnastics to understand this... GetNewVehiclePosResult
18:52:30 <xarick> when the pf is called, ship is at (v->x_pos, v->y_pos). GetNewVehiclePosResult tells me the position the ship will be after it advances 1 subtile
18:53:06 <xarick> advancing 1 subtile could put the ship in a new tile
18:54:23 <xarick> ShipController is called next which may or may not actually make the ship advance
18:54:58 <xarick> what I'm really worried about is whether the ship will be at the "entry position" of a ship depot
18:56:55 <xarick> i need to detect that beforehand so that I return the tile of the depot the ship is under at the moment, or to call the pathfinder depending if it's been past that "entry position"
18:57:48 <xarick> pathfinder already deals with "ship already at destination" problem
18:58:45 <xarick> and will generate either a roundabout path to itself or a new depot
19:03:41 <xarick> something is failing though
19:33:59 *** herms61 has quit IRC (Ping timeout: 480 seconds)
19:38:18 <kuhnovic> I might have a stab at refactoring YAPF at some point. Not at the top of my to do list though.
19:39:28 <xarick> is there a way to know ship position with drawing boxes or something?
19:39:36 <kuhnovic> And you make fair points PeterN. I will have to do some profiling to see how much it actually matters with modern hardware / compilers
19:40:12 <xarick> not entirely newgrf related, but i need the ship to be exactly in a subtile position
19:59:09 <xarick> The problem I am having, in video
20:00:50 <xarick> I wonder if it's a battle of costs
20:04:28 <xarick> nop, it's a deeper problem 😦
20:05:20 <xarick> cost to depot on the left 1910, cost to depot under the ship, 1584
20:10:19 <xarick> it's the pathfinder...
20:10:39 <xarick> the problem I thought I had resolved, is not resolved
20:12:04 <xarick> something something about node already tested as unfit, something
20:15:30 <xarick> the origin node is tile 1, trackdir_x_sw, it is the origin and the destination. this node runs a IsDestination, and my "fix" was to return false. What happens when it is tested again after doing the roundabout? it's again tile 1, trackdir_x_sw... kuhnovic sorry for bothering u
20:17:25 <xarick> I dont understand open lists and closed lists yet
20:22:51 <kuhnovic> Hehe you'll figure it out eventually, the A* algorithm is quite fascinating
20:24:16 <kuhnovic> Keep in mind that a node on the closed list is really closed, it will never be added to the search again.
20:25:52 <kuhnovic> Meanwhile I just do the usual thing: wait a little until you figure out what the real issue is 😛
20:27:29 <wensimehrp> 😮 I think should've kept silent
20:28:13 <xarick> kuhnovic: crap! that's my problem
20:28:15 <truebrain> nah; you are doing fine 🙂
20:28:28 <truebrain> normally they use the tt-forums as a community-bug-tracker
20:28:37 <truebrain> not sure what made them use the OpenTTD's this time
20:29:50 <LordAro> do we record newgrf usage?
20:30:08 <LordAro> in the surveys, that is
20:30:11 <wensimehrp> number of NewGRF used in game
20:30:13 <LordAro> can't see it in the summary
20:30:35 <truebrain> it is tracked; just not published
20:42:45 <truebrain> You are such a troll 🙂
20:43:38 <peter1138> It's okay, everyone else hates me anyway.
20:54:10 <johnfranklin> should someone re-release the bugfix of 0.8 as "URaTT Classic"?
20:55:01 <LordAro> the author is welcome to
20:55:05 <LordAro> anyone else, not so much
21:05:24 <peter1138> IIRC the issue is only apparent before a certain date as well.
21:06:31 <peter1138> We added this message specially to stop the whole drama of generating a map only to have it fail at the end.
21:12:02 <LordAro> it would be helpful to put that in the issue
21:41:09 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:48:43 <xarick> okay, to fix this issue, I had to revert 30e1a61
21:49:01 <xarick> what could possibly go wrong now if it's reverted?
21:49:47 <xarick> trains will collapse? what was the train issue?
21:51:17 *** ChanServ sets mode: +v tokai
21:57:58 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:04:25 <xarick> leaving this running overnight, see if i get more asserts
22:10:43 <andythenorth[d]> also did we discuss lunch?
22:33:46 <johnfranklin> How does Assembly look like? NFO?
22:37:34 <johnfranklin> Hmm, it has other characters than 0-9A-F.
22:38:17 <peter1138> That isn't assembly. That is disassembly.
22:41:03 <peter1138> x86 assembly. Other instruction sets are availalbe.
22:42:40 <andythenorth[d]> it's a text adventure
22:42:44 <andythenorth[d]> but each room is a register
22:44:02 <peter1138> You can of course write machine code in hexadecimal instead. You just need to look up the byte representations of the instructions, and forego useful things like names.
22:44:51 <johnfranklin> So assembly is like YAGL?
22:45:23 <_glx_> I won't recommend using hexadecimal 🙂
22:45:43 <LordAro> peter1138: names? pah, looxury
22:45:54 <peter1138> Look up the Z80 MPF-1.
22:46:38 <peter1138> I had lessons programming with them.
22:47:15 <peter1138> It was out of date even then mind you, but back then we were taught basics of computing.
22:48:02 <_glx_> z80 is fun, I wrote some for ti85
22:48:03 <peter1138> That was in '94-95, which is a bit mad as the BBC Micro we had in the 80s had a full assembler built in to BASIC.
22:48:38 <_glx_> except pages of DATA and POKES
22:48:41 <peter1138> But it was about learning how instructions work, what they are, etc etc. The goals would've been something very simple.
22:50:12 <peter1138> (Instructions are variable byte length in the z80)
22:50:27 <peter1138> Yeah, 6502 was simpler. And only 3 registers.
22:50:48 <_glx_> z80 is a 8bit/16bit hybrid
22:52:16 <peter1138> Although 6502 has zero-page, fast access to the first 256 bytes of memory to use as temporaries.
22:54:51 <johnfranklin> I was born near the midpoint between badger mushroom and openttd 0.1.
22:59:09 <peter1138> So yeah, writing assembly isn't writing hexadecimal bytes, although you might have hexadecimal values in places.
23:00:00 <peter1138> Disassembly is taking the machine code bytes and displaying it as the relevant instructions. That's why you get the hex on one side and the instructions next to it.
continue to next day ⏵