IRC logs for #openttd on OFTC at 2024-01-26
โด go to previous day
00:07:21 <peter1138[d]> > >>> (1.3).as_integer_ratio()
00:07:21 <peter1138[d]> > (5854679515581645, 4503599627370496)
00:07:48 <peter1138[d]> Yeah, that function is pretty poor ๐ฎ
00:17:13 <goddess_ishtar> peter1138[d]: what do you mean?5854679515581645/ 4503599627370496 is concise and human-readable :p
00:22:21 <_jgr_> 1.3 is likely not perfectly representable as a float
00:24:09 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
00:30:31 <dwfreed> it is the default representation of floats that makes it look like 1.3 when you do 13/10
01:02:10 *** Wormnest has joined #openttd
01:07:21 *** ChanServ sets mode: +v tokai
01:14:04 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
01:30:55 <belajalilija> Iโd like to suggest that industry grf devs be able to use more than one field type to allow for things like cattle farms, vineyards and forests with dynamic field like tiles
01:31:45 <belajalilija> As currently it is my understanding that you can only have 1 field type
01:32:26 <belajalilija> However vineyards and orchards would be cool and sexy
02:05:17 *** herms has quit IRC (Quit: bye)
03:26:02 *** Wormnest has quit IRC (Quit: Leaving)
03:33:59 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:11:48 *** Smedles has quit IRC (Remote host closed the connection)
04:14:01 *** Smedles has joined #openttd
06:20:19 *** keikoz has quit IRC (Ping timeout: 480 seconds)
08:14:54 <truebrain> finding bugs when solving bugs ... I need a bug-stack now
08:15:05 <truebrain> ErrorDParam do some memory badness sometimes ๐
08:15:42 <truebrain> `heap-use-after-free`
08:15:55 <truebrain> `CopyOutDParam` causes it
08:16:02 <truebrain> right, `stack push`
08:18:32 *** felix has quit IRC (Ping timeout: 480 seconds)
08:20:26 <_zephyris> belajalilija: 100%. A simple object as field option would be amazing. But I have no ability to do it myself, so we can but ask very politely!
08:37:41 <locosage> freaking rust, how is inlining code making it 10% slower :/
08:44:33 <locosage> something about allocating 256 byte array on stack it looks like
08:46:33 <locosage> somehow it works faster in a separate function ๐คทโโ๏ธ
09:55:02 *** thelounge345 has joined #openttd
11:08:23 <peter1138[d]> Not so much one field type, there are only fields, not field types.
11:09:33 <andythenorth> newgrf fields ๐
11:09:40 <andythenorth> "frosch has a patch for that"
11:21:38 <truebrain> andythenorth: how are my logos doing? ๐
11:31:42 *** thelounge345 has quit IRC (Ping timeout: 480 seconds)
11:34:47 <_zephyris> Just need one animated object, updated per tile cycle
11:42:36 *** thelounge345 has joined #openttd
11:49:34 <xarick> it's been running for 12 hours
12:05:57 <locosage> Not quite what I expected to achieve...
12:05:57 <locosage> grf-py-v4: 0.161 sec, 549738 bytes (CORRECT) decode 0.00252 sec
12:05:57 <locosage> grf-py-v3: 0.056 sec, 552416 bytes (CORRECT) decode 0.00253 sec
12:05:57 <locosage> grf-py-v1p: 0.132 sec, 552416 bytes (CORRECT) decode 0.00229 sec
12:05:57 <locosage> truegrf: 0.304 sec, 570092 bytes (EXACT) decode 0.00225 sec
12:05:59 <locosage> nml: 0.228 sec, 570092 bytes (EXACT) decode 0.00227 sec
12:05:59 <locosage> nml_py: 0.757 sec, 570092 bytes (EXACT) decode 0.00225 sec
12:06:01 <locosage> optimal_py: 12.642 sec, 549738 bytes (CORRECT) decode 0.00297 sec
12:08:42 <locosage> but I guess having 40% faster optimal encoder and 4x faster sub-optimal one counts as a win
12:12:03 <locosage> Algorithms go brrr...
12:14:52 <truebrain> so I guess we will not be publishing OpenTTD in the MacOS Store under the new EU regulation .. 50 eurocent per download, even if your game is free. lolz. That gives them zero incentive to prevent fake downloads ... Apple is being weird (and childish)
12:18:35 <xarick> 5000 ships per company might be a dream come true!
12:21:18 <xarick> this wouldn't be possible with buoys
12:21:29 <xarick> it would reach the station limit
12:23:10 <locosage> btw, it funny how optimized nml python encoder is
12:23:15 <locosage> couldn't make it any faster at all
12:24:28 <locosage> on the other hand C one should be pretty simple to get to rust speed with some pointers
12:40:27 <peter1138[d]> Are you trying to remove dependencies of grf-py?
12:50:28 *** maxshpuntozavr has joined #openttd
12:50:36 <maxshpuntozavr> i have a question
12:52:00 <locosage> peter1138[d]: kind of
12:52:11 <locosage> don't really fancy bothering with native extensions rn
12:52:16 <maxshpuntozavr> how the CB can work. we need to do a major renovation and than he restore's a life time
12:52:22 <locosage> but it's nice to know my options for when I need them
12:52:51 <maxshpuntozavr> maxshpuntozavr: is it possible to do?
12:54:54 <maxshpuntozavr> maxshpuntozavr: like for ukraine train it very useful we restroe old trains in new one
13:26:13 <_glx_> maybe so combinaison of age and last service date
13:56:10 *** georgevb has joined #openttd
13:56:10 <georgevb> _glx_: It would not affect amount of breakdowns nor auto-replace.
13:56:10 <georgevb> The main idea of the request is to make vehicle act as it is younger, than it is. For example, vehicle life is 30 years. If you make an "overhaul" refit, it begins to act as 15 years old. its' reliability grows, and auto-replace functions does not try to replace it (for the next 15 years).
13:56:58 <_glx_> reliability and breakdowns doesn't work anyway
13:57:44 <_glx_> a vehicle can breakdown while going out of the depot
14:11:23 <maxshpuntozavr> georgevb: maybe make like kife longer from 15 years to 30?
14:38:11 <andythenorth> truebrain: can make tonight
14:38:55 <truebrain> talltyler: is there anything more needed for ND? I guess frosch is doing the translation issues .. but anything besides that?
14:55:42 <Eddi|zuHause> georgevb: what about having the refurbished model be completely separate, but have lower lifetime? so instead of having lifetime of 30 years, but starting at 15, it'll just have a lifetime of 15 years. then it's the players responsibility to (auto) replace the original by its correct refurbished model
14:57:43 <talltyler> truebrain: Remaining to-do items are:
14:57:43 <talltyler> * Translations - frosch seems to be handling this
14:57:43 <talltyler> * Changing server list from Years to Minutes (or maybe hours? Not sure what's best here...) - you volunteered to help with this ๐
15:13:03 <locosage> constructing factory looks pretty awkward ...
15:17:48 <locosage> locosage: also, these are all building sprites that just happen to cover whole ground tile
15:17:57 <locosage> actual ground is bare land sprite
15:19:17 <truebrain> talltyler: You are on your own with 10606. Might require a bit of lobbying to get other devs to approve it / give an opinion about ๐
15:21:11 <georgevb> Eddi|zuHause: If refurbished model is cheaper, player would buy it even without buying the previous one. If it is more expensive, the aim of refurbishment (saving money) is lost. So, this does not fit
15:24:09 *** Wormnest has joined #openttd
15:24:17 <xarick> who's the graphics guy
15:25:10 <xarick> the default hovercraft has the same colour for every company
15:26:07 <Eddi|zuHause> georgevb: we had a discussion on per-vehicle storage recently, but i forgot what our conclusion was. maybe you could do something with that
15:26:34 <talltyler> truebrain: _jgr_ , would you care to weigh in on #10606?
15:26:43 <emperorjake> I'll have to give 10606 another go now to use it together with the slowed calendar time
15:27:00 <Eddi|zuHause> xarick: using which base set?
15:27:03 <emperorjake> and do some side by side testing with JGRPP daylength
15:27:23 <talltyler> Yes, please do, and put your comments in the PR so reviewers can find them later ๐
15:27:37 <Eddi|zuHause> xarick: should probably report that there
15:28:04 <Eddi|zuHause> xarick: unless you can reproduce it with other base sets as well
15:28:44 <_jgr_> I haven't had time to closely look through any of the recent changes to the new time/cargo scaling PRs yet
15:28:58 <xarick> there is a very thin line in the carcass that is company coloured, but it's unnoticeable
15:29:18 <_jgr_> That said I have changed the setting in my branch to more closely resemble the setting in your cargo scaling PR
15:33:10 <_jgr_> emperorjake: The two are doing different things, so the effects are not going to be directly comparable
15:34:19 <_jgr_> Play testing it (whether beside other implementations or not) is a good idea
15:40:35 <truebrain> talltyler: how do I go from an EconomyDate to real-time hours?
15:44:17 <talltyler> 30 economy days = 1 minute
15:44:50 <truebrain> is there a define for that by any chance?
15:46:14 <talltyler> DAYS_IN_ECONOMY_MONTH in timer_game_economy.h
15:46:27 <truebrain> that is not helping me in any way shape or form ๐
15:46:43 <talltyler> It might be nice to have a new one for how many economy days are in an hour
15:47:02 <belajalilija> Hey, last night i made a suggestion regarding improvements to fields, is this on the pile now?
15:47:29 <_glx_> xarick: don't expect any fix in OpenGFX though, now there's OpenGFX2
15:49:16 <truebrain> hmm, I should have highlighted the changes, but okay ๐
15:49:28 <talltyler> truebrain: Itโs worth noting that in calendar mode, economy calendar matches the calendar date ๐
15:49:31 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
15:49:39 <_glx_> oh the first server in the list looks like spam btw
15:50:15 <talltyler> I wonder if I have a branch for this
15:50:20 <truebrain> right, got to run; but I will finish this up tonight
15:50:30 <truebrain> just need to fix the game coordinator
15:50:41 <truebrain> and have a proper way of calculating hours ... not how I did this ๐
15:50:58 <truebrain> talltyler: hmm .. that is slightly problemetic
15:51:13 <truebrain> why isn't it the "calendar date - start of game"?
15:51:43 <truebrain> as that is a better representation of economy time, not?
15:51:53 <truebrain> so the amount of days from 1-1-1 are the amount of days the game is old?
15:52:03 <truebrain> anyway, really got to run; talk later ๐
15:53:49 <merni> LC-ZorgviaGitHub: Does building a bridge over a diagonal river as shown here really block boats? That seems to defeat one of the purposes of a bridge :p
15:54:15 <_glx_> it does block them because pillars
15:54:54 <xarick> ramp takes the whole tile
15:56:38 <_glx_> to be safe a diagonal river should be at least 2 tiles wide
15:56:43 <merni> Oh, it altogether removes the water, lmao
15:57:27 <_glx_> and not 2 half tile next to each other
15:57:44 <talltyler> truebrain: In calendar mode, it should be this. In wallclock mode economy time starts at year 1, so it needs different logic.
15:57:59 <merni> If I could convert the river into land somehow why would I not just build an embankment instead of a bridge :p
15:58:06 <xarick> > block the route either by another player or by the growing city.
15:58:06 <xarick> My PR about towns growing blocking ships is still around
15:58:27 <xarick> well not a PR, just the branch
15:59:18 <xarick> towns can also build such bridges
16:04:36 <truebrain> talltyler: And my question was, why isn't it always from year 1? We have the info.
16:05:16 <truebrain> Answering with what it is doesn't answer why it is ๐
16:06:48 <_glx_> so many ways to block water ๐
16:08:26 <merni> the top one feels more like a bug, that it is possible to traverse a river without a bridge (or can that road not be used to cross)
16:10:15 <belajalilija> merni: Itโs a ford
16:11:08 <belajalilija> Would be cool to have these in game
16:11:14 <_glx_> haha next to the bridge
16:11:19 <belajalilija> Maybe with overlapping tiles
16:11:32 <belajalilija> The bridge will be for pedestrians
16:11:48 <merni> do fords prevent navigation (when there is enough water) though?
16:11:49 <belajalilija> A pedestrian bridge is very common with fords
16:12:24 <_glx_> the pedestrian bridge itself is too low for navigation anyway
16:12:27 <belajalilija> Personally i wouldnโt cross one with more than like 20cm of water
16:12:57 <merni> _glx_: true in that example
16:13:26 <belajalilija> Recently some guys in a 4x4 went through one near me near when a storm happened and their car got washed away and 3/4 of them died
16:13:30 <_jgr_> Even 20cm is too much for typical vehicles
16:14:12 <_glx_> and in any case you'd have to go very slow
16:14:13 <belajalilija> Theyโre something that is safe if you respect them but the people in the 4x4 didnโt respect them
16:14:34 <merni> personally I can't imagine driving through one of thos
16:14:42 <merni> driving ordinarily is stressful enough :p
16:15:10 <belajalilija> Theyโre only really a thing in low traffic rural areas
16:15:20 <belajalilija> Normally where the road isnโt marked
16:15:38 <_glx_> I think many people don't understand how water reacts with speed
16:16:12 <belajalilija> belajalilija: They were in a 4x4 club too
16:16:24 <belajalilija> Wild that they didnโt know tbh
16:16:25 <_jgr_> Going very slow is not necessarily the best strategy
16:16:42 <_glx_> but too fast you may break stuff
16:18:05 <_jgr_> Well you shouldn't go excessively fast, but if you feel that you have to drive very slowly then you just shouldn't cross there at all
16:18:48 <belajalilija> I remember when i was little i helped push a car out of this one
16:18:54 <_glx_> of course, don't try to cross during a flood event
16:19:14 <belajalilija> I think itโs ideal to keep on the throttle
16:19:30 <belajalilija> So the water doesnโt go up the pipe
16:19:56 <belajalilija> But also not go fast enough so the water smashes your radiator
16:20:08 <belajalilija> Or whatever the front part of the cat inside is called
16:36:38 <georgevb> belajalilija: It does not look that dangerous
16:41:31 <peter1138[d]> I think it's ideal to take a different route.
17:07:50 <locosage> random photo from my travels xd
17:08:54 <locosage> but up to like half a meter fords aren't anything special, hard to kill a car there even if you try
17:09:35 <locosage> and main danger is getting water through air intake into the engine
17:21:13 <belajalilija> locosage: You always go to beautiful places
17:22:02 <talltyler> Are you asking why economy time doesnโt start at year 1, even in calendar timekeeping mode? Because economy time is shown in a few places โ finance window, company graphs, last service date, etc. โ and these need to show calendar dates. The easiest/safest way to do this is to just keep calendar and economy dates synced in calendar timekeeping mode.
17:22:27 <talltyler> truebrain: Are you asking why economy time doesnโt start at year 1, even in calendar timekeeping mode? Because economy time is shown in a few places โ finance window, company graphs, last service date, etc. โ and these need to show calendar dates. The easiest/safest way to do this is to just keep calendar and economy dates synced in calendar timekeeping mode.
17:26:11 <truebrain> Is the month (30 vs 31) relevant for it? Just trying to understand what to do best with multiplayer
17:42:43 <talltyler> Relevant for what? I donโt understand what youโre asking.
17:45:10 <talltyler> If the game is in calendar timekeeping mode, Iโd send the current date minus the start date, converted to hours by multiplying by days (not years, because 356/366 days is not an even number of minutes โ itโs slightly longer than 12 minutes). In economy timekeeping mode Iโd send the current date converted to hours.
18:02:22 <merni> looks like CI doesn't like you renaming a file:
18:02:22 <merni> > CMake Error at cmake/SourceList.cmake:22 (target_sources):
18:02:22 <merni> > Cannot find source file:
18:02:22 <merni> > /Users/runner/work/OpenTTD/OpenTTD/src/3rdparty/catch2/catch_amalgamated.cpp
18:06:24 <_glx_> ah it should be better ๐
18:08:20 <peter1138[d]> Damn, that doubled the number of lines added :p
18:08:29 *** gelignite has joined #openttd
18:10:24 <Eddi|zuHause> from one to two?
18:11:58 <peter1138[d]> No, 12,000 to 24,000
18:14:56 <talltyler> xarick: Fixing crashes when passing invalid arguments seems pretty straightforward ๐
18:15:13 <talltyler> You could also look at issues tagged `good first issue`
18:15:34 <talltyler> Obviously not your first issue, but might be low-hanging fruit
18:16:54 <xarick> I think 10407 is already fixed by rubidium
18:22:33 <xarick> EnforceDeityOrCompanyModeValid_Void() was done to prevent crashes like that
18:24:02 <xarick> yep, it's not crashing
18:24:53 <talltyler> Excellent, feel free to close your own issues if they are resolved ๐
18:25:13 <talltyler> (Assuming you are allowed to do that)
18:25:15 <xarick> let me check the last error message which is what it produces now
18:25:30 <xarick> instead of outright crashing openttd
18:26:30 <peter1138[d]> Turns out NewGRFs work better when you have the correct one loaded...
18:26:52 <talltyler> An AI crashing if it does the wrong thing isnโt a bug. But it crashing OpenTTD is.
18:30:58 <truebrain> talltyler: Not asking how you should do it, asking you to teach me how it works ๐ What I was asking, if in calendar mode, it is relevant that the economy date hits 31 days from time to time? Is there any system linked to the economy date where that is relevant
18:38:11 <talltyler> Ah, okay. In calendar timekeeping mode, the economy timer behaves just like the calendar timer. It inherits all of its functions from TimerGameCommon, ticks at the same rate as calendar time, and follows the calendar when it gets changed by the date cheat. No issues with the number of days per month or year.
18:39:08 <_glx_> calendar is like before noDL
18:39:27 <truebrain> talltyler: yes, that is the how again ๐
18:39:32 <truebrain> damn language barriers ๐
18:39:49 <merni> github-advanced-secu: Lol codeql doesn't like library authors' code
18:40:04 <truebrain> So let me put it even more blunt: does the economy date care if a months is 30 or 31 days; does anything break if it would always be 30 for calendar mode? (and if so, what?)
18:40:24 <talltyler> `Not asking how you should do it, asking you to teach me how it works` ๐
18:40:49 <talltyler> If you ask how I will tell you how ๐
18:40:52 <truebrain> as I said, language barriers ๐
18:41:05 <truebrain> I asked before: I want to know the why; I can read code ๐ I reviewed the bloody thing ๐
18:41:11 <truebrain> I just need to know how it functionally behaves
18:41:14 <truebrain> that is hard to make out ๐
18:41:18 <talltyler> What are you trying to do?
18:41:24 <truebrain> nothing; I am trying to understand
18:41:41 <truebrain> I want to know what breaks if the economy date is always from year 1
18:41:59 <truebrain> and so far the answer is: it is in sync with the calendar date in calendar mode
18:42:01 <truebrain> that part I got ๐
18:42:17 <truebrain> but what weird parts of OpenTTD crack if it doesn't! ๐
18:42:36 <talltyler> Company graphs, company finance sheet, and last service date all show the economy date.
18:43:00 <truebrain> okay, so 31 days are actually important there, as the user will observe it
18:43:51 <talltyler> In wallclock mode they are relative to current time, so the user doesnโt see the economy time directly, but in calendar time it is absolute and assumes that calendar time = economy time
18:45:01 <truebrain> hmm, something I could look up in the code, but lazy: do we have any interval timers on economy time?
18:45:01 <talltyler> Yes, economy time needs to match calendar time exactly in terms of the day of the year. If you were to change it to start at year 1 but then show an offset to the current calendar year, it would work until the player does silly things with the date cheat ๐
18:46:06 <peter1138[d]> Is that a problem>
18:46:20 <talltyler> Yes, canโt give you a list off the top of my head though
18:46:21 <_glx_> breaking things when using cheats is expected ๐
18:46:30 <truebrain> talltyler: that is fine ๐
18:46:30 <peter1138[d]> It's no longer a cheat, right?
18:46:58 <talltyler> _glx_: Sure, but a negative economy date would be a new bug ๐
18:47:08 <truebrain> okay ... all this is a tiny bit problemetic for forward/backward compatible with networking; but I have an idea to try out ... but at least now I understand the functional behaviour a bit better. Tnx ๐
18:47:36 <talltyler> Sorry I didnโt know what you were asking ๐
18:48:01 <truebrain> we got there in the end ๐
18:48:15 <truebrain> talking about not sure I understand you correctly, I really did not know how to read your comment in that ticket ๐
18:48:19 <truebrain> so I just made an assumption ๐
18:50:32 <truebrain> that is unexpected ๐
18:50:36 <talltyler> I explained myself in the approval I think ๐
18:51:33 <truebrain> btw, solution for money: setting that says: infinite money
18:51:39 <truebrain> and just remove the "give money"
18:51:45 <truebrain> (introducing: pitchforks!)
18:52:00 <LordAro> truebrain: i'd go with that
18:52:10 <LordAro> that'd make it a true "sandbox" mode
18:52:23 <truebrain> the only moment I found "giving 10M" useful, was during development. In normal gameplay, I don't get the point
18:52:36 <truebrain> either you care about money, or you don't
18:52:42 <truebrain> personal opinion ๐
18:52:44 <LordAro> also remove the floating money text and the yearly overview popup
18:53:09 <peter1138[d]> I think money sandbox means "track money like normal, but always allow building"
18:53:28 <merni> I think a useful implementation of "infinite money" might be to just allow doing stuff that costs money, even if the money is negative
18:53:57 <truebrain> disabling bunkrupt is easy; but people will have the emotion with "omg, that balance is very negative" in company overview etc
18:53:59 <peter1138[d]> `FOR_ALL_COMPANIES(c) c->money = 100000000000000;` on every tick ๐
18:54:02 <_glx_> yeah I only used money cheat when testing stuff (same as the money shortcut in debug build)
18:54:02 <truebrain> so that needs a bit of polishing
18:54:39 <truebrain> peter1138[d]: owh, that is smart; as that won't show up in the finance window
18:54:56 <truebrain> and hide the money in the statusbar
18:55:22 <merni> truebrain: do people who don't care about money care about that?
18:55:32 <truebrain> merni: strangly enough, yes
18:55:38 <truebrain> being "in the red" gives an emotion
18:55:42 <merni> I see red negative income of trains quite frequently, I just dismiss it since I expect that
18:55:47 <xarick> wow, ScriptGroup::GetNumEngines has more bugs than anticipated
18:55:55 <truebrain> similar that "cheat" gives an emotion
18:56:06 <truebrain> on that note ... bye cheat
18:56:38 <_glx_> and it used to be worse with the previous wording in the window
18:58:34 <_glx_> oh of course, now we can't see when the nightly build is about to begin
18:59:31 <truebrain> smart; never actually correlated those two events ๐
18:59:59 <talltyler> So maybe we will start the slow process of moving cheats out of the sandbox options until there are none left
19:00:10 <truebrain> I think that is the best approach
19:00:13 <talltyler> Some are easy, others not so much ๐
19:00:43 <frosch123> "road rebuilding programme brings 6 minutes of misery to motorists" <- such meme potential
19:01:25 <truebrain> TimerGameTicker::counter is stored in the savegame .. something to remember when I process surveys
19:01:58 <truebrain> I kinda wrote a line there that assumes it always starts at zero. Not one of huge impact, but still.
19:07:29 <truebrain> talltyler: anyway, the problem I was solving: how to show hours correctly for older servers in the game-listing
19:07:34 <merni> truebrain: Then how about making all the "negative" texts no longer red if no-money-mode is on?
19:08:01 <truebrain> I think that the money-popups are less relevant than your company's worth
19:08:12 <truebrain> but, requires experimentation
19:08:13 <merni> well, red text is not limited to those
19:08:48 <truebrain> w00p, I created a random sorter .... the server list is resorting itself constantly!
19:09:33 <truebrain> the sorter does not appreciate my `uint64_t`
19:11:04 <andythenorth> truebrain: I admit to not paying attention recently...we need an icon pack assembled for macOS, or we need a new logo for the project drawn?
19:11:29 <truebrain> What I need, for the social integration plugin, is an MIT licensed "icns" file and a Splash image, both for MacOS
19:12:13 <truebrain> so yes to both your questions
19:13:15 <truebrain> (as we cannot promote the GPLv2 icons to MIT)
19:13:43 <andythenorth> ok I think drawing icons might need _zephyris ๐
19:13:48 <peter1138[d]> Can't you just link them via another shared library that can be installed separately? ๐
19:13:48 <andythenorth> never been a thing I do well
19:14:07 <andythenorth> I think we safely be derivative in style from the current icon
19:14:46 <truebrain> _zephyris: would you be willing to draw an OpenTTD Logo, licensed under MIT, for us to use for the Social Plugins? ๐
19:15:03 <andythenorth> should we make it a plug ๐
19:15:16 <andythenorth> or some other visual reference which will not seem a good idea in 3 years time
19:15:20 <truebrain> I always enjoyed the icons we had for our subdomains ๐
19:17:26 <truebrain> there is a server online that is running for, on estimation, 16588 hours. It runs 1.3.3
19:17:40 <truebrain> that is .. what .. almost 2 years?
19:17:56 <truebrain> well, the server is not online for that long, the map that is being played is
19:18:11 <truebrain> it might have used date-cheats; that I cannot tell
19:18:43 <andythenorth> we're perpetuating the dollar theme?
19:18:51 <andythenorth> it's an in-joke for a very small number of people
19:19:08 <andythenorth> game with a $ icon, in which money turns out to not be the goal at all
19:19:34 <truebrain> it would be nice if the icon is something that people know is from OpenTTD, that we distributed it
19:19:47 <truebrain> but I don't have any further wishes; I just wish to be able to release the plugin ๐
19:21:31 <frosch123> i am sure people would be confused, if it was a ยฃ instead
19:21:53 <truebrain> `Running` feels off ... `Playing`?
19:22:17 <belajalilija> truebrain: Leopard bus
19:22:45 <belajalilija> Or the hovercraft
19:23:42 <truebrain> it is not the duration of the game, as when paused, it is not ticking
19:24:03 <frosch123> i read "running" as "online time" ๐
19:24:13 <frosch123> time since server boot
19:24:18 <truebrain> which also isn't the case ๐
19:24:24 <truebrain> so `Play time` ๐
19:26:26 <andythenorth> do we need to focus group a logo and slogan?
19:26:36 <truebrain> no. I just want it done.
19:26:52 <truebrain> *murmles something about stupid MacOS and stupid demands*
19:27:15 <andythenorth> wonder what's already in opengfx 2 that might be useable
19:27:24 <truebrain> is OpenGFX MIT licensed? ๐
19:27:39 <andythenorth> if Zeph relicenses the asset it is
19:27:42 <frosch123> ideally it should look the same as the GPL logo, or people will be confused
19:28:08 <_zephyris> truebrain: Sure! Very happy to help
19:28:39 <_zephyris> So is the issue having an OpenTTD icon that's MIT? Or an OpenTTD plugin-specific icon that's MIT?
19:29:05 <truebrain> all the logos we have are GPLv2 licensed
19:29:12 <truebrain> and the author hasn't been seen in years
19:29:27 <andythenorth> I think we are on safe moral and legal ground to derive something from current icon
19:29:58 <truebrain> as long as it isn't pixel-identical, I would say ๐
19:30:45 <_zephyris> Yeah, the 'brand' isn't the issue - it's the specific artistic interpretation/implementation.
19:31:22 <_zephyris> I might nudge the colours to TTD palette entries ๐ If it doesn't look too far off
19:31:26 <andythenorth> I'm not going to look too closely at the discord or reddit ๐
19:31:38 <andythenorth> oh actually cute
19:32:59 <andythenorth> truebrain: which "MIT license" is it specifically? ๐
19:33:09 <truebrain> luckily, there is only one
19:33:57 <truebrain> dunno what GNU is smoking there, but I think they base that on very old information
19:35:28 <truebrain> talltyler: I took a bit of a different turn than you might have expected; curious to what you think.
19:35:30 <merni> > The difference between the X11 license and the Expat license is that the X11 license contains an extra paragraph about using the X Consortium's name. It is not a big deal, but it is a real difference.
19:35:41 <andythenorth> it's moot anyway, as you said, can't transfer GPL -> MIT
19:44:41 <xarick> GSEngine.IsValidEngine is a mess
19:45:40 <truebrain> we just are never ever again allowed to change the value! ๐
19:47:25 <peter1138[d]> Well, you could send ticks_per_ms just in case, but no...
19:47:29 <peter1138[d]> (dP might change it)
19:47:41 <truebrain> funny, the game-coordinator also needs to fill in that field based on the same calculation; as newer clients always get a new game-info blob back
19:47:44 <truebrain> even for older versions
19:48:39 <truebrain> the code in our C++ is only used for LAN games ๐
19:52:34 <belajalilija> andythenorth: I hate it
19:53:05 <belajalilija> I feel dirty enough using discord x
19:58:48 <truebrain> now to wait for an hour to see if it actually works ..... boooorrrriiiiinnnnnggggggg ๐
20:00:47 <peter1138[d]> Does it matter that you can't reliably provide 1/8th zoom sprites? ๐
20:00:58 <truebrain> awesome, I have 2 servers running on the same invite-code ...
20:01:27 <truebrain> normally the GameCoordinator would detect that
20:01:27 <peter1138[d]> "That'll never happen"
20:01:35 <truebrain> they are also on the same port ๐
20:01:52 <truebrain> so they are sharing the same connection ๐
20:02:20 <truebrain> funny, when I connect to the IP, I end up in either of the two
20:04:53 <truebrain> only one tooltip has "click to sort by ..."
20:04:58 <truebrain> something for your list talltyler ๐
20:09:49 <truebrain> the more I look at our UI and mostly, the labels
20:09:51 <truebrain> the more annoying I get
20:09:56 <truebrain> `Date`... and it reads a year
20:10:12 <truebrain> and the game info is just a lot of text cramped together in a tiny little box
20:11:12 <andythenorth> so close, but not the actual logo
20:11:49 <truebrain> clearly it was the inspiration for it
20:12:17 <peter1138[d]> > but i think you should replace that dollar symbol with steam locomotive or some other vehicle.
20:12:19 <andythenorth> can't find any actual original post in forum with actual logo
20:12:35 <andythenorth> found Bjarni and Dalestan linking to it in svn etc
20:13:14 <peter1138[d]> > The game isn't really about money, though..
20:13:28 <truebrain> the last post on page 2 is pretty
20:14:07 <truebrain> `I have the very same idea. I had a 1024x1024 png of the previous icon but not the current one. If I had such an image then the 512x512 image for OSX 10.5 would already be added.`
20:14:07 <truebrain> `... Why would you need so large icons?..`
20:14:07 <truebrain> That ages like milk
20:14:48 <belajalilija> Aside from the leopard bus or hovercraft suggestions for a loco you could do a steam train a la locomotion
20:16:42 <peter1138[d]> > Interesting. It would appear that somebody on wikipedia made an svg based on our png. Luckily it's gpl so we can use it
20:16:46 <peter1138[d]> The good ol' "someone"
20:18:09 <xarick> ``` if (!IsValidGroup(group_id)) {
20:18:09 <xarick> if (group_id != GROUP_DEFAULT && group_id != GROUP_ALL) return -1;
20:18:09 <xarick> } else if (ScriptEngine::GetVehicleType(engine_id) != GetVehicleType(group_id)) return -1;```
20:18:09 <xarick> Is this acceptable code style?
20:18:33 <peter1138[d]> > I do SVG conversions as well as trying to keep the category for them tidy. In doing so, I come across a lot of butt-ugly images.
20:18:56 <peter1138[d]> So... we could possibly just ask them?
20:19:35 <talltyler> xarick: No. CODINGSTYLE.md says:
20:19:35 <talltyler> When only a single statement is contained, the brackets can be omitted. In this case, put the single statement on the same line as the preceding keyword (if, while, etc.). Note that this is only allowed for if statements without an else clause.
20:20:21 <xarick> oh :/ it's gonna look ugly with a {
20:20:29 <truebrain> peter1138[d]: Are they still active users? ๐
20:20:44 <talltyler> Ugly but correct ๐คท
20:22:49 <peter1138[d]> You could do days but that incorrectly assumes it's not been paused.
20:23:11 <truebrain> this is actually play-time, mind you. When paused, it doesn't increase
20:23:43 <peter1138[d]> Hmm, not "assumes", but gives the impression it's been running only for 4 days, rather than 96 hours spread out...
20:23:43 <_zephyris> That's with colours tweaked to the TTD palette
20:23:45 <Rubidium> xarick, talltyler: it's only a return in the if, so the else is not needed and should actually be avoided
20:23:51 <frosch123> pretty sure the SI spelling is "min"
20:24:04 <andythenorth> ok need a macOS icon maker next ๐
20:24:14 <truebrain> frosch123: 6d 9h 4min ?
20:24:17 <truebrain> that is just weird ๐
20:24:27 <truebrain> peter1138[d]: more than just hours? I don't really see that difference?
20:24:31 <xarick> i'm trying to avoid the else
20:24:40 <truebrain> `Unpaused play time`? ๐
20:25:06 <xarick> ```/* static */ SQInteger ScriptGroup::GetNumEngines(GroupID group_id, EngineID engine_id)
20:25:06 <xarick> EnforceCompanyModeValid(-1);
20:25:06 <xarick> if (!ScriptEngine::IsValidEngine(engine_id)) return -1;
20:25:06 <xarick> bool valid_group = IsValidGroup(group_id);
20:25:06 <xarick> if (!valid_group && group_id != GROUP_DEFAULT && group_id != GROUP_ALL) return -1;
20:25:06 <xarick> if (valid_group && ScriptEngine::GetVehicleType(engine_id) != GetVehicleType(group_id)) return -1;
20:25:08 <xarick> return GetGroupNumEngines(ScriptObject::GetCompany(), group_id, engine_id);
20:25:12 <peter1138[d]> Well, you might measure a generator runtime in hours, but probably not days.
20:25:18 <frosch123> days is also weird, i would go for "Unpaused play time: HHH:MM"
20:25:40 <truebrain> frosch123: do we have anything that prefixes a number with a zero when < 10?
20:25:43 <_zephyris> Hmm, I missed a slight lightening on the top-left edge, I'll do a quick tweak. And make a version with exact original colours.
20:25:54 <truebrain> (in the string-system)
20:26:31 <truebrain> _zephyris: Now we just need to store it somewhere so we know who the author was in 10 years ๐
20:26:39 <peter1138[d]> When does manually copying something because a non-derivative work?
20:26:50 <frosch123> truebrain: ZEROFILL_NUM
20:27:29 <Rubidium> frosch123: days, hours, minutes are not even official SI units. So, just go with s, ks and Ms ;)
20:27:52 <truebrain> frosch123: people might confuse that with `mm:ss` for the first bits
20:28:08 <truebrain> I do like the `123h 45m` notation because of that
20:28:15 <frosch123> you never have "mm:ss" without "hh:" in front?
20:28:24 <truebrain> sure you do, for systems that measure low times
20:28:33 <truebrain> had plenty of those in my life
20:29:31 <peter1138[d]> Measure it in DHCP units
20:31:25 <truebrain> that works for me at least?
20:31:38 <peter1138[d]> That says 'yea not playing that'
20:32:22 <_zephyris> Enjoy. For OpenTTD under whatever license you need - and save a screenshot of me saying that!
20:32:50 <truebrain> mind storing this in a GitHub repo with a license to it?
20:33:00 <truebrain> also allows you to update it there if you thinker more ๐
20:33:14 <truebrain> I can do the same btw
20:33:25 <truebrain> but maybe better if it is under your space
20:33:35 <truebrain> and seriously, thanks a lot for this ๐
20:34:54 <_zephyris> No problem at all! I'll make a repo, just give me a list of licenses (just GPL2 and MIT?) you need, and I'll add a general statement for future use too.
20:35:06 <truebrain> GPLv2 and MIT indeed
20:36:01 <truebrain> maybe, if it is not too much trouble, render a few PNGs from it? ๐ 256x256 all the way up to 2048x2048? ๐ Again, otherwise I can do it, not a real issue ๐
20:37:40 <peter1138[d]> I think after so many hours, you probably don't need to show minutes any more.
20:38:11 <andythenorth> allegedly this is a macOS icon set, but I'm not convinced
20:38:12 <peter1138[d]> But that probably makes it harder to display, string-system-wise ๐
20:38:33 <truebrain> sometimes wording of people annoy me enough that I reply ๐
20:38:35 <_zephyris> truebrain: Sure. I can make windows icons too (might even make pixel-tweaked small ones).
20:38:44 <_zephyris> Not sure how mac or Linux icons work!
20:38:50 <peter1138[d]> Feature request: "not fixed" uh huh.
20:39:31 <truebrain> peter1138[d]: looks odd, in a single list
20:39:38 <truebrain> but I do agree, as I did try ๐
20:40:15 <peter1138[d]> There are a lot of servers with a lot of play time...
20:40:35 <truebrain> normally you don't see them, as they are old servers
20:40:40 <andythenorth> dunno if it's valid ^
20:41:53 <peter1138[d]> `iconutil -c icns FolderName.iconset -o IconName.icns`
20:43:37 <peter1138[d]> What does 13.x see? The years still?
20:43:53 <truebrain> andythenorth: yeah, I need an icns file .. not sure it is actually a zip .. but what peter1138[d] says might work ๐
20:44:01 <truebrain> peter1138[d]: yup; nothing changes there
20:44:22 <andythenorth> I am "researching"
20:44:28 <andythenorth> aka googling in hope
20:45:18 <peter1138[d]> (No idea what Figma is but possibly not relevant)
20:45:35 <truebrain> haha, you clearly never work with UXers ๐
20:46:11 <peter1138[d]> I work with WWT_PANELs ๐
20:46:18 <andythenorth> my day is mostly Figma some days ๐
20:48:31 <truebrain> grrr .. you are not wrong, but you are wrong
20:48:39 <truebrain> I will have to write that a tiny bit nicer ๐
20:53:01 <locosage> measuring time by ticks is not very precise
20:53:21 <locosage> I once plotted avg tick rate for all citymania games and it's wasn't very consistent
20:53:26 <locosage> also increased with time xD
20:54:09 <truebrain> hmm, no, CodeQL is plain wrong, and it is kinda obvious it is. Annoying
20:54:30 <andythenorth> think this needs the white background knocked out
20:54:30 <locosage> and that's not even considering lagging games
20:54:36 <andythenorth> and I don't know if it has all icons needed
20:54:58 <andythenorth> Apple appear to have switched recently from .icns to a newer, more complex format
20:55:43 <truebrain> well, at long as it wants to build, honestly
20:56:04 *** Webster has quit IRC (Ping timeout: 480 seconds)
20:56:45 <locosage> btw, how long game game is running is not very useful info
20:56:53 <locosage> what everyone needs is time until restart
20:57:04 <truebrain> new: `os/macos/openttd.icns: Mac OS X icon, 207009 bytes, "info" type`
20:57:06 <truebrain> old: `../os/macosx/openttd.icns: Mac OS X icon, 213612 bytes, "TOC " type`
20:57:19 <truebrain> so there is some difference in "type"
20:57:23 <truebrain> just no clue what that actually means
21:00:03 <andythenorth> this version has no white bg
21:00:18 <andythenorth> I haven't optimised the small versions, just shrunk them
21:00:24 <andythenorth> 16px and 32px both look not great
21:00:32 <andythenorth> they need manually redrawn really but eh
21:01:24 <peter1138[d]> As long as it's svg rendered as each size rather than just pixel scalesd.
21:01:51 <andythenorth> it's just bitmap currently
21:02:03 <andythenorth> I can redo, this is a bit of a guessing game
21:02:59 <truebrain> it happily build with the last version you send
21:03:07 <truebrain> give me a sec for the build to finish so you can try it
21:03:15 <truebrain> to at least check it actually works etc etc
21:06:32 <truebrain> ugh, all those node16 issues ... ugh
21:08:25 <truebrain> good; so the technoligy works
21:08:32 <andythenorth> all sizes appear
21:08:43 <truebrain> mind creating one now with SVG -> PNG for the different sizes? ๐
21:09:27 <peter1138[d]> And transparent ๐
21:10:57 <andythenorth> the difference will be negligible but yes I can
21:11:20 <truebrain> let's do it properly while we are at it ๐
21:11:27 <truebrain> just a one-time-thingy ๐
21:12:01 <andythenorth> do we have the repo with the svg yet?
21:12:12 <andythenorth> /me reading up, been a long week though
21:15:31 <truebrain> pfff, a lot of work to make this happen talltyler ... none related to the actual work ๐
21:16:19 <xarick> still terrible at commit descriptions
21:17:09 * andythenorth found the svg link in discord
21:18:37 <truebrain> okay ... now the CI should be happy
21:19:20 <peter1138[d]> _zephyris: What, this one not that long ago?
21:20:13 <andythenorth> the 16px and 32px icons rasterised from svg are qualitatively worse then the downsized bitmaps
21:20:44 <andythenorth> it's a known thing, progressive downsizing in steps tends to be higher quality
21:20:48 <andythenorth> at least when using photoshop
21:21:02 <andythenorth> rendering the vectors small, photoshop has no particular skill at
21:21:10 <andythenorth> whereas downsizing pixels is all-day-long
21:21:47 <andythenorth> downsized bitmap
21:22:21 <_zephyris> I'll do the logo repo ASAP, but might need to be tomorrow
21:22:43 <andythenorth> rasterised 64px svg
21:22:55 <truebrain> _zephyris: no worries ๐ That is fine!
21:23:00 <andythenorth> 64px downsized progressively from 512px
21:23:22 <andythenorth> neither is idea, compared to hand-drawing the same size, but eh, death approaches
21:23:27 <peter1138[d]> The latter one has sharpening applied.
21:23:43 <andythenorth> yes, photoshop does that
21:23:48 <andythenorth> unless told not to
21:24:46 <peter1138[d]> gimp-rendered 64px
21:25:37 <peter1138[d]> Seems to be a gamma-difference at least as well, but that's Macs for you.
21:26:18 <andythenorth> iconutil is fussy about the pngs it gets
21:26:21 <andythenorth> without useful erros
21:26:45 <truebrain> ssshhh CodeQL, I already said that!
21:34:02 <truebrain> abort-deployment-after-merge, abort-deployment-after-merge ... I forgot to abort deployment after merge
21:34:15 <truebrain> I did not want to kick all TURN users from their game on a Friday night ๐ฆ
21:34:29 <truebrain> but GitHub was like: yeah, don't do this
21:34:34 <truebrain> so it created an internal error ๐
21:37:15 <truebrain> owh, not internal. You are no longer allowed to upload artifacts with the same name ๐ That used to just work ...
21:42:08 <xarick> im bad at preconditions ๐ฆ
21:43:30 <xarick> valid_group && ScriptEngine::GetVehicleType(engine_id) != GetVehicleType(group_id)
21:43:47 <xarick> what's the inverse, reverse
21:47:45 <peter1138[d]> Certainly is, ollie.
21:47:47 <Eddi|zuHause> you know you can just !() it and callit a day?
21:47:48 <truebrain> yes; finish tomorrow? ๐
21:49:03 <xarick> describing the @pre is difficult
21:49:15 <andythenorth> maybe I'll stay up too late playing openttd
21:49:27 <truebrain> but how far did you get with openttd.icns?
21:49:53 <andythenorth> I made the svg -> png files, but iconutil fails on them for reasons I can't understand
21:49:56 <andythenorth> no error message
21:50:31 <truebrain> copy back the pngs that were working till it works again?
21:50:59 <truebrain> would at least indicate which png is the issue
21:51:39 <andythenorth> ok it's not the pngs
21:51:46 <xarick> * @pre ScriptEngine::GetVehicleType(engine_id) == GetVehicleType(group_id).
21:53:35 <truebrain> andythenorth: so what is the problem file? ๐
21:54:16 <andythenorth> totally unclear, iconutil is a strange beast
21:54:41 <andythenorth> I copied the downsampled bitmap icons folder, replaced all the pngs with the rasterised svg pngs
21:54:48 <andythenorth> must be some macos crap
21:55:08 <andythenorth> or I'm typing the wrong command somewhere for iconutil
21:56:20 <truebrain> cool, tnx; going to build some binaries tomorrow ๐
21:56:23 <xarick> Who's a logical expert?
21:57:43 <xarick> I'm not sure about 2TallTyler suggestion
22:00:48 <xarick> those @pre seem to contradict themselves
22:02:36 <xarick> it requires mental gymnastics to decipher those @pre's
22:07:34 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:10:38 <xarick> if !IsValidGroup(group_id) is omitted, then group_id can only be GROUP_ALL or GROUP_DEFAULT - the vehicle type check must be ignored in this case
22:11:25 <xarick> `* @pre !IsValidGroup(group_id) || ScriptEngine::GetVehicleType(engine_id) == GetVehicleType(group_id).`
22:12:35 <xarick> `* @pre group_id == GROUP_ALL || group_id == GROUP_DEFAULT || ScriptEngine::GetVehicleType(engine_id) == GetVehicleType(group_id).`
22:25:30 <peter1138[d]> Hmm, do we ever run the ICU layouter in separate threads?
22:36:51 <truebrain> _zephyris: Thank you!
22:37:40 <xarick> am I missing something obvious?
22:38:27 <truebrain> peter1138[d]: Threads? What are those?
22:39:10 <xarick> what happens between if's?
22:49:20 *** nielsm has quit IRC (Ping timeout: 480 seconds)
23:04:28 <xarick> ```bool isValidEngine = ScriptEngine::IsValidEngine(engine_id);
23:04:28 <xarick> bool isValidGroup = IsValidGroup(group_id);
23:04:28 <xarick> bool isDefaultOrAllGroup = (group_id == GROUP_DEFAULT || group_id == GROUP_ALL);
23:04:28 <xarick> bool isVehicleTypeMatch = (isValidGroup && ScriptEngine::GetVehicleType(engine_id) == GetVehicleType(group_id));
23:04:28 <xarick> if (!isValidEngine || (!isValidGroup && !isDefaultOrAllGroup) || !isVehicleTypeMatch) {
23:05:29 <xarick> there's no way to avoid IsValidGroup repeating
23:05:52 <xarick> according to Co-pilot, lol
23:07:20 <xarick> oh well, I'm boring you
23:16:13 *** Test_User has joined #openttd
23:50:20 <peter1138[d]> Hmm. huge bug ๐
23:53:23 <Test_User> bugreport (I'm not going to use github): "refresh server" button can get stuck in some situations, and prevent you from re-checking and joining it without restarting openttd; exact conditions I found is when something accepts the tcp connection but doesn't send anything: there seems to be neither a timeout nor acceptance of the "connection closed" part; tested on latest
23:53:26 <Test_User> (80ebcc72fb415fc73f80cb8afbf0d927ade639e4) and 13.4
23:54:31 <Test_User> I'm using gnu/linux, if that's relevant
23:56:33 <locosage> Test_User: Yeah, seen that too but never quite figured how to reproduce
23:57:04 <Test_User> you can use netcat as the "server" to trigger the condition reliably
continue to next day โต