IRC logs for #openttd on OFTC at 2024-06-29
⏴ go to previous day
02:16:06 *** Wormnest has quit IRC (Quit: Leaving)
02:44:07 *** gnu_jj_ has joined #openttd
02:47:18 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
02:57:35 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:43:00 <DorpsGek> - Update: Translations from eints (by translators)
04:44:16 <andythenorth> goddess_ishtar: It’s really precise about why Dall-E can’t do pixels, due to Dall-E being a smush tool
05:30:19 <wensimehrp> wensimehrp: I eventually fixed it, but in a very weird way. It turns out that it's something related to procedures, and I fixed it by expanding the procedures in the TEMP registers.
05:38:06 <wensimehrp> wensimehrp: oh and also related to TEMP registers themselves. Whenever there is a TEMP registration that requires reading a TEMP value (i.e. `STORE_TEMP(LOAD_TEMP(0)+0x123, 1)`) the game just assumes the loaded value to be 0 or some other magic number
06:08:14 *** nielsm has quit IRC (Ping timeout: 480 seconds)
06:45:38 *** ufo-piloot_ has joined #openttd
06:52:22 *** ufo-piloot has quit IRC (Ping timeout: 480 seconds)
07:00:17 *** XYZ has quit IRC (Quit: AndroidIrc Disconnecting)
07:05:30 *** ufo-piloot has joined #openttd
07:12:11 *** ufo-piloot_ has quit IRC (Ping timeout: 480 seconds)
07:31:14 *** silent_tempest has joined #openttd
08:03:34 <pickpacket> Does a GS have to have a main loop? Is it possible to register event handlers and only react to events instead?
08:04:18 <LordAro> well, kinda yes, if your main loop only contains an event handler
08:06:54 <LordAro> how else would it be called?
08:08:47 <andythenorth> It’s effectively polling, there’s no callbacks
08:09:51 <andythenorth> If it doesn’t happen inside a main loop, it basically doesn’t happen, except a few things like init and save
08:09:53 *** HerzogDeXtEr has joined #openttd
08:12:05 <andythenorth> pickpacket if that's MinimalGS, there's an event handling example in it
08:12:18 <andythenorth> note that it only pulls one event per loop by default in MinimalGS, which is unwanted
08:22:31 <andythenorth> I know full well that I am the loudest complainer about GS, but it really was a smart addition to OpenTTD
08:22:55 <andythenorth> It can do so much, once you accept the limitations
08:26:15 *** locosage has joined #openttd
08:26:15 <locosage> it can do so much until you try to actually affect gameplay 😜
08:29:48 <andythenorth> I haven’t tried it for MP
08:30:01 <andythenorth> Single player, it’s kind of fine
08:30:57 <andythenorth> Our complaining about it just makes people less interested in extending the API
08:35:24 <pickpacket> andythenorth: it's minimalgs. It looks odd to me, coming from other languages. Is the "handleevent" just a poll?
08:43:12 <pickpacket> I don't understand the python you write for FIRS :D I've learned general nml and am learning general gs :)
08:47:06 <pickpacket> I figure I need all events if I want to find vehicle crashes. Most crashes have at least two vehicles involved after all
08:52:19 <andythenorth> pickpacket: GS is odd. You just have to adapt 😛
08:57:19 <pickpacket> I'm willing to adapt :D But I need a way to get all events
08:58:56 <locosage> I guess I've seen enough languages before GS that it didn't strike as particularly odd xD
09:03:47 *** ufo-piloot has quit IRC (Quit: you click on fancy icons. i execute code !)
09:05:02 *** ufo-piloot has joined #openttd
09:07:19 <goddess_ishtar> wait I thought game scripts were written in custom Squirrel
09:11:30 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
09:20:49 <andythenorth> pickpacket: There’s almost no python in the two file I linked
09:30:58 <pickpacket> andythenorth: I'll have a look at them :) I worry about causing a busy wait
09:41:04 <andythenorth> GS can lag OpenTTD if you set the loop sleep too low, but GS/AI performance effect is limited by the per tick opcode limit
09:41:40 <andythenorth> I worry about performance too, but it’s not worth overthinking
09:44:12 <andythenorth> If your goal is still to run a stock ownership GS, it’s mostly just a book-keeping job, the only performance concern is probably handling button clicks quickly
09:45:46 <pickpacket> oh! That's a later project. I'm working on a kill count
09:48:13 <andythenorth> Per company, all time?
09:50:57 <pickpacket> when a crash happens I want to update the storybook with which company did it, how many crashes it's caused so far, and how many have died in those crashes
09:55:44 <andythenorth> Unlikely to be a performance issue is my guess 🙂
09:56:05 <andythenorth> Just a table in root
09:58:36 <pickpacket> yeah, it's the busy wait polling for the events I'm worried about :) That would be a bit of a performance issue
10:03:13 <pickpacket> while (GSEventController.IsEventWaiting()) { [...] if (event == null) continue; [...] }
10:03:19 <pickpacket> isn't that a busy wait?
10:13:59 <LordAro> iterates over the list of events that have come in since the last time the event handler ran
10:14:11 <LordAro> if the event is null, i guess that means it's expired or some such
10:16:01 <andythenorth> It’s an unbounded wait because the event queue length is unknown in this loop
10:16:47 <andythenorth> And it the handling spans multiple ticks, more events can be added by OpenTTD I think
10:22:28 *** gelignite has joined #openttd
10:28:03 <pickpacket> I read it as "check the queue and if it's empty check it again immediately"
10:37:15 <andythenorth> GSEventController.IsEventWaiting() should return false to the outer while
10:37:26 <andythenorth> if there's no event in the queue
10:38:11 <andythenorth> `event == null` is possibly just to prevent a crash on malformed events, I assume Zuu added it to MinimalGS for a reason
11:04:43 <andythenorth> pickpacket, GS timing (and memory use) is reported in the FPS window by the way
11:04:54 <andythenorth> there might be inaccuracies, but it's a guide
11:05:29 <andythenorth> you can usually tell easily if your script is lagging the game, as it will be noticeable in the max frame rate on FFWD
11:05:45 <andythenorth> if you remove the sleep on main loop, you should see the max frame rate reduced
11:16:20 <johnfranklin[d]> eating breakfast, lunch, and dinner in 8 hours
11:17:07 <johnfranklin[d]> another 16 hours without lunch. hmm.
11:32:10 <peter1139> Hmm, I assumed #12828 was due to my recentish changes, but the report seems to be 14.1
12:05:39 <pickpacket> andythenorth: if it returns false on empty queue it would stop as soon as the queue was empty and then never start again. At least it looks that way :/
12:06:59 <pickpacket> Then we return to the loop with the sleep
12:07:40 <peter1139> There's an op-codes-per-game-tick limit, so even if you busy-wait, it won't lock up the game.
12:07:55 <peter1139> That is inefficient though, of course.
12:15:59 <pickpacket> Sleeping for a few seconds is no problem in this case, I guess
12:16:35 <peter1139> I think you can "sleep" until the next game tick.
12:19:01 <peter1139> Well, the parameter to Sleep is ticks...
12:24:43 <pickpacket> Oh! I just assumed it was seconds
12:31:01 <andythenorth> I set sleep to 5 in main loop
12:31:10 <andythenorth> I haven't tested it much, seems to work ok, so far
13:37:52 <andythenorth> ok so I have a feature branch
13:38:01 <andythenorth> and I want to merge it into another feature branch
13:38:10 <andythenorth> but branch merge is considered bad practice
13:38:35 <pickpacket> Are we talking about the OpenTTD repo?
13:39:09 <pickpacket> I would rebase one branch om the other
13:39:43 <andythenorth> it's FIRS, but same effect. When I do a rebase of feature branches I usually lose some history
13:39:52 <andythenorth> rebasing to master is usually ok
13:40:26 <pickpacket> Rebase one on master, merge it and rebase the other?
13:40:48 <andythenorth> I might just cherrypick
13:40:53 <andythenorth> tried a rebase, got conflicts
13:41:00 <andythenorth> resolving the conflicts is usually where I lose things
13:41:11 <andythenorth> cherrypick is more work, but more reliable
13:42:01 <pickpacket> If it's only a handful of commits I guess it's worth it
13:45:05 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
14:11:37 <peter1139> Basically if you need to merge feature branches, your separation of features is not right.
14:12:08 <peter1139> But merging isn't bad, we just don't do it in OpenTTD.
14:12:43 <peter1139> I always use merge commits on my work stuff, but it's always merging into main, not merging one feature into another feature.
14:34:19 <peter1139> Meh, too much traffic in the TdF these days.
14:34:27 <peter1139> All the support cars getting in the way.
14:53:15 <audigex> Yeah it feels like I’m watching a really slow Skoda race
14:56:52 <peter1139> And then you miss out on the action due to an ad-break :S
14:57:49 <peter1139> And of course, the commentary of Phil Liggett and the music in the 80s was much better ;)
14:59:09 <johnfranklin[d]> So are the tracks dedicated for bicycle runners? Or normal cars can still get into it during the race?
15:05:04 <peter1139> It's a bicycle race, not a bi-athlon. There's no running.
15:05:23 <peter1139> The roads are closed, but there's so many team cars following behind...
15:21:52 <johnfranklin[d]> I mean cyclists, sorry
15:43:37 <andythenorth> I wanted to watch some tdf, but couldn’t find how
15:59:03 <andythenorth> Is that on Sky? 😛
16:16:55 <peter1139> No idea, I've never had Sky.
16:19:24 <andythenorth> The current prime minister sympathises
17:03:12 *** ufo-piloot has quit IRC (Quit: you click on fancy icons. i execute code !)
17:04:27 *** ufo-piloot has joined #openttd
17:29:47 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
17:30:39 <andythenorth> that's excellent
18:24:10 <LordAro> peter1139: good grief
18:25:45 <LordAro> also yeah, a lot of cars
18:26:48 <LordAro> ban team cars, make them fix punctures themselves
19:03:25 <LordAro> lunch considered harmful
19:34:15 *** gelignite has quit IRC (Read error: Connection reset by peer)
19:34:38 *** gelignite has joined #openttd
20:12:54 *** ChanServ sets mode: +o orudge
20:12:54 *** ChanServ sets mode: +v Terkhen
20:12:54 *** ChanServ sets mode: +v Rubidium
20:45:28 <pickpacket> How about bed? Is bed also banned?
20:46:36 <andythenorth> I might test mine out
21:27:21 <andythenorth> could we just OpenAI translate?
21:37:49 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:43:11 *** ChanServ sets mode: +v tokai
21:46:48 *** HerzogDeXtEr has joined #openttd
21:49:59 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
21:57:17 <andythenorth> peter1138: I heard you like cargo icons?
21:59:14 <andythenorth> railroad tycoon 3 used them to show cargo oversupply (too much waiting at a station) I think
22:13:22 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:37:47 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:08:17 <talltyler> I don’t remember seeing that in RT3
23:25:28 *** gelignite has quit IRC (Quit: Stay safe!)
continue to next day ⏵