IRC logs for #openttd on OFTC at 2022-05-01
⏴ go to previous day
00:55:56 *** gelignite has quit IRC (Quit: Stay safe!)
02:10:13 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:10:37 *** Cthulhux has quit IRC (Remote host closed the connection)
02:10:52 *** tokai|noir has joined #openttd
02:10:53 *** ChanServ sets mode: +v tokai|noir
02:17:53 *** tokai has quit IRC (Ping timeout: 480 seconds)
02:26:58 *** D-HUND is now known as debdog
02:43:03 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
02:43:36 *** WormnestAndroid has joined #openttd
02:49:11 *** Wormnest has quit IRC (Quit: Leaving)
03:57:08 *** HerzogDeXtEr1 has quit IRC (Read error: Connection reset by peer)
06:57:45 *** andythenorth has joined #openttd
06:58:44 *** andythenorth_ has joined #openttd
07:05:48 *** andythenorth has quit IRC (Ping timeout: 480 seconds)
08:01:15 *** gelignite has joined #openttd
08:08:34 *** HerzogDeXtEr has joined #openttd
08:17:44 *** sla_ro|master has joined #openttd
08:39:53 *** Gustavo6046 has quit IRC (Quit: Goodbye! Leave messages at my XMPP @ gustavo6046@anonym.im or my Discord Gustavo6046#9009 or possibly my Mastodon gustavo6046@fosstodon.org – I don't ch)
10:34:46 <FLHerne> it's raining, so I can't paint my boat like I planned, perhaps it's OTTD day
12:05:39 <TrueBrain> 802f 20 Jump(Call(false, PointerBank(PBR, Literal(87c0))))
12:15:38 *** sla_ro|master has quit IRC ()
12:24:31 <TrueBrain> and even other weird ASCII thingies
12:24:42 <TrueBrain> 8036 a5 LoadStore(Load(C, Resolve8(PointerBank(Zero, Addition(Literal(12), Literal(D)))), U8))
13:02:19 <nielsm> C++ doesn't have a way to mark functions "global const", right? like "this function is only allowed to touch data it was explicitly passed in by non-const reference"
13:02:32 <nielsm> (it doesn't, but I wish it did)
13:09:15 *** virtualrandomnumber has joined #openttd
13:10:48 <LordAro> __attribute__((const)) or __attribute__((pure)), perhaps?
13:10:52 <LordAro> though they are gcc-isms
13:15:24 <LordAro> looks like something in need of some intermediate variables
13:23:24 <nielsm> all of this logic for movement is so impenetrable...
13:23:41 <nielsm> it really feels like it could be much shorter if it was all just shuffled around
13:24:52 <LordAro> delete it all and start again!
13:48:24 *** virtualrandomnumber has quit IRC (Quit: virtualrandomnumber)
13:48:30 *** virtualrandomnumber has joined #openttd
13:59:41 <glx> some parts of the test seem common to multiple vehicle types too
14:03:28 <glx> I think the main issue with movement logic (like the should RV stop here) is that each new feature was added on top of the previous one, ending in ultra complex conditions
14:06:28 <glx> and there's also some weird stuff like #8609
14:12:34 <andythenorth_> movement code reminds me of programming flash games
14:13:06 <andythenorth_> do it basically correct, using basically valid physics
14:13:26 <andythenorth_> then add a nest of tweaks and fixes that work but paint into a combinatorial corner
14:13:39 <andythenorth_> it's all ok until it needs changed
14:26:25 *** Cthulhux has joined #openttd
14:38:58 *** andythenorth_ has quit IRC (Ping timeout: 480 seconds)
14:47:02 *** andythenorth has joined #openttd
14:53:45 *** Wormnest has joined #openttd
15:01:02 *** virtualrandomnumber has quit IRC (Quit: virtualrandomnumber)
15:23:47 *** snail_UES_ has joined #openttd
15:39:30 *** sla_ro|master has joined #openttd
15:48:55 <FLHerne> LordAro: that's where you find you changed some obscure calculation by 2% and it Breaks The Game
15:52:50 <andythenorth> or someone's Workflow
15:53:30 <andythenorth> played 3 campaigns, still can't finish a final level
15:53:44 <andythenorth> last level is a bit like last level of shareware Doom 1
15:58:57 <nielsm> yay it compiles again! ... oh
16:04:31 *** Cthulhux has quit IRC (Quit: Cthulhux)
16:08:19 <nielsm> now ALL the vehicles probably break
16:14:36 <peter1138> As long as it's consistent.
16:15:45 <TrueBrain> consistent breakage :D
16:16:50 <TrueBrain> there is some combination of * on TrueWiki that breaks the wiki, but the backtraces don't contain enough information to find what combination
16:16:53 <TrueBrain> and I cannot reproduce it :D
16:19:18 <nielsm> https://0x0.st/oA_S.png the trouble here is that the backtrace is useless, the message is triggered after a goto that can be gone to from like 4 or 5 places
17:11:19 <nielsm> one bug fixed! new bug hit
17:12:03 <nielsm> this time in a ship having INVALID_TRACKDIR somewhere it should not
17:24:02 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
17:35:12 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:36:50 *** WormnestAndroid has joined #openttd
17:54:10 <TrueBrain> well, it doesn't crash anymore!
17:55:49 <nielsm> I had to neuter the title game to get a simpler test case first tho
18:11:48 <LordAro> nielsm: oh hey, people have been requesting train reversing for ages
18:14:31 *** Wormnest has joined #openttd
18:22:58 <TrueBrain> enough with this spam already :(
18:33:10 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:33:19 *** andythenorth has quit IRC (Quit: andythenorth)
18:39:32 <TrueBrain> 0088cf LoadStore(Load(C, Resolve16(Addition(Pointer(Resolve24(PointerBank(Zero, Addition(Literal(00), Literal(DP))))), Literal(Y))), U16))
18:39:37 <TrueBrain> I cannot believe how complicated very old CPUs are
18:44:39 *** andythenorth has joined #openttd
18:45:32 <DorpsGek> - Update: Translations from eints (by translators)
18:46:18 *** Gustavo6046 has joined #openttd
18:47:10 *** andythenorth has quit IRC ()
19:03:42 <michi_cc> This while front/primary/normal vehicle stuff is a totally convoluted area as well. Vehicle *v and Vehicle *v can mean totally different things, and unless somebody was nice enough to call it something with front in the name, one usually has to look for clues around to distinguish them.
19:18:44 <LordAro> i've always found it fairly neat
19:19:06 <LordAro> (that consists are just linked lists)
19:20:15 <michi_cc> That's not really what I mean, but that like half of the members/variables of Vehicle are only ever valid for the primary vehicle in a chain.
19:27:21 <michi_cc> Signature: "uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *colour);", but oh wait, in the .cpp it is actually "uint8 CalcPercentVehicleFilled(const Vehicle *front, StringID *colour)".
19:28:17 <michi_cc> There's a subtle difference here. CalcPercentVehicleFilled is only valid for primary/front vehicles, but the saveload line calls it for all vehicles, making the return value nonsensical.
19:29:03 <michi_cc> Luckily, v->trip_occupancy is also only ever evaluated for front/primary vehicles, which makes this not a serious bug but just useless calculations.
19:29:50 <michi_cc> But unless you carefully follow the control flow and look at all usages sites, this is something completely opaque and relies on correct comments.
19:30:23 <nielsm> so do consists own vehicles in your concept?
19:31:44 <michi_cc> Yes, the Consist in the end should contain everything that currently is contained in the primary vehicle. It has a reference to the vehicle chain, which keeps of course all the real per-vehicle stuff.
19:32:12 <michi_cc> The biggest thing is of that is order handling.
19:32:15 <nielsm> and so each vehicle gets a pointer to its consist, instead of a "front"
19:33:04 <michi_cc> Both, you still need the front for e.g. graphical NewGRF stuff, so I've opted to keep the front pointer (but this is just some implementation optimisation).
19:33:35 <michi_cc> In my current code, it is equivalent to v->GetConsist()->Front().
19:38:25 <nielsm> at least it doesn't crash
19:44:58 <LordAro> michi_cc: iirc there's a waening we could enable to force definition and declaration to match
19:45:10 <LordAro> not that it actually fixes anything here
19:45:30 <TrueBrain> nielsm: PROGRESS :D
19:47:21 <nielsm> ships do approximate the same when leaving depot
19:55:00 <Gustavo6046> i want to believe the cc in 2cc stands for choo choo
20:02:23 <TrueBrain> why is printing stuff to your CLI always making your application so slow :(
20:02:41 <LordAro> because you're printing too much :p
20:03:20 <nielsm> so you have time to read it all, of course
20:03:33 <TrueBrain> that is the sad part .. it is quick enough that that is not an option :P
20:06:53 <nielsm> okay found one reason the ship was not leaving depot
20:07:13 <nielsm> (forgot to actually store the new tile when it moved to a new tile)
20:07:53 <glx> so it leave but stay static ?
20:08:13 <glx> and leaves again on next pass
20:08:14 <nielsm> yeah it stays on the depot tile, accelerating to full speed while not moving
20:09:31 <nielsm> or well, now it does move, but crashes in the pathfinder when the ship turns out to suddenly have an invalid direction
20:12:15 <nielsm> also it looks rather silly that the ship visually doesn't rotate when it starts going diagonally
20:12:53 <nielsm> I occasionally think that maybe I should start over in a more structured manner (inside out rather than outside in) with the things I've learned so far
20:25:45 *** Cthulhux has joined #openttd
20:27:23 *** andythenorth has joined #openttd
20:33:57 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
20:34:25 *** WormnestAndroid has joined #openttd
20:55:14 *** nielsm has quit IRC (Remote host closed the connection)
21:14:23 *** gelignite has quit IRC (Quit: Stay safe!)
21:34:02 *** sla_ro|master has quit IRC ()
22:08:20 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:13:08 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:17:36 *** andythenorth has quit IRC (Quit: andythenorth)
22:48:46 *** snail_UES_ has quit IRC (Quit: snail_UES_)
23:28:22 *** snail_UES_ has joined #openttd
continue to next day ⏵