IRC logs for #openttd on OFTC at 2023-01-25
โด go to previous day
00:05:12 *** Wormnest has joined #openttd
00:13:52 <glx[d]> but zorg may have good suggestions
00:33:10 <TallTyler> I hope so, I can filter the good ideas out of the scope creep feature requests ๐
00:42:57 <FLHerne> TallTyler: what are you trying to do, GS mapgen?
00:47:39 *** WormnestAndroid has joined #openttd
00:58:26 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:35:59 *** Wormnest has joined #openttd
02:06:36 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
02:06:42 *** WormnestAndroid has joined #openttd
02:06:46 <glx[d]> looks like you forgot something in your PR
02:15:07 <TallTyler> Yeah, Iโll fix it tomorrow
02:15:36 <TallTyler> Funny how these things build just fine with no warnings locally and then fail CI
03:02:32 *** Wormnest has quit IRC (Quit: Leaving)
03:09:35 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:06:48 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:17:08 *** HerzogDeXtEr has joined #openttd
05:58:13 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:36:45 *** WormnestAndroid has quit IRC (Remote host closed the connection)
07:42:51 *** sla_ro|master has joined #openttd
08:09:59 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
08:14:08 *** MaverickFischer has quit IRC (Quit: Due to budget cuts, the light at the end of the tunnel has been turned off.)
08:15:24 *** MaverickFischer has joined #openttd
08:20:08 *** greeter has quit IRC (Remote host closed the connection)
08:21:28 *** greeter has joined #openttd
08:28:47 <GLaDOS> To get vulkan and dx12 rendering i have had to rewrite all the driver and render code once I intergate it with the original project would it be accepted?
08:30:21 <GLaDOS> petern: sorry to at you but your the only main dev i know to be active your opinion on this?
08:31:23 <petern> If it's done well there is no problem.
08:33:15 <GLaDOS> It would mean the removal of all old drivers like win32 and cocoa when done it will probably be October before i have a draft ready lol
08:35:03 <LordAro> that seems like it would break a lot of systems
08:37:02 <LordAro> OTTD's ability to run on low power computers with old/minimal graphics capabilities is a feature, and not we'd be particularly keen on removing
08:37:56 <Gwyd> Yeah I'm curious what benefits it would bring to the player
08:38:55 <Gwyd> They seem to be 3D oriented renderers which isn't really optimal for OpenTTD?
08:40:03 <LordAro> Gwyd: vulkan is a more modern graphics.. interface? to the GPUs, it's somewhat equivalent to opengl
08:40:29 <LordAro> it's obviously most commonly used for actual 3d graphics, but it doesn't require it - it can draw pixels just as well
08:40:46 <LordAro> opengl/directx/metal/etc
08:55:15 * petern ponders a different approach to 10408
09:25:36 <petern> Gah, why is Windows 11 still so trashy.
09:32:17 <petern> Teams has decided it needs to appear on all desktops, but doesn't appear in the desktop list so I can't change it.
11:08:21 <Xarick> heh, the last company being asked for a merger only has ~3 days to answer before the company bankrupts, that's unfair
11:09:26 <Samu> screenshot doesn't show dates, :(
11:22:00 <TallTyler> โYou snooze you loseโ
11:22:45 <TallTyler> are the offers in company ID order or by some score metric like performance rating?
11:24:21 <petern> Judging by that black text, company ID order.
11:26:43 <TallTyler> Thatโs what Iโd guess too but they could be all empty companies with identical scoring
11:28:28 <TallTyler> If GitHub-code-scanning has warnings about the 3rd-party library added in my PRโฆ am I allowed/required to fix them? Itโs in the json parser so thereโs no risk of MP-unsafe behavior.
11:30:35 <petern> Unless it's squirrel, I think it's best to not touch 3rd party stuff?
11:37:35 <Samu> it's strange that GS'es still can change company stuff while the game is paused
11:42:39 <andythenorth[d]> nah that's fine
11:42:46 <andythenorth[d]> there are multiple reasons
11:42:53 <andythenorth[d]> mostly they are 'why not?'
11:46:50 <Samu> company 15 has 3 days, while the others have more
11:47:20 <Samu> the first company asked has the whole time
11:51:22 <petern> Just a side effect of increasing the company limit to 15.
11:51:44 <Samu> I added the date this event was fired to the code, but now that i think about it, it would be really cool if all other events also had their dates
11:53:18 <Samu> but I'm removing, i just wanted to get the dates displayed
11:53:22 <andythenorth[d]> petern: if we add more companies, do you get negative time period?
11:53:38 <andythenorth[d]> or do we get Xeno's paradox and the company can never go bankrupt
11:54:16 <petern> Oddly enough, I searched for the original limit and found a forum post from Samu suggesting more companies on 2kx2k maps...
11:54:35 <andythenorth[d]> seems under-ambitious
11:54:48 <andythenorth[d]> we should make companies-in-companies
11:54:54 <andythenorth[d]> on maps-within-maps
11:57:06 <petern> ```static const int TAKE_OVER_TIMEOUT = 3 * 30 * DAY_TICKS / (MAX_COMPANIES - 1);```
11:57:12 <petern> I guess it is taken into account ๐
11:58:26 <petern> The time seems to be 3 months though, not 2.
12:00:17 <LordAro> not necessarily 3 months :p
12:01:54 <petern> 3 economy months with NoDL ๐
12:03:22 <andythenorth[d]> I had another horrific idea
12:03:51 <andythenorth[d]> tile actions, but repeat with offset, over a list of tile indexes
12:04:13 <andythenorth[d]> this is so we could make 4 identical areas of the map, for head-to-head
12:04:31 <andythenorth[d]> otherwise it will all have to be looped in GS, in cmds, one tile at a time
12:05:14 <andythenorth[d]> it's probably a single map function at openttd level ๐
12:05:56 <andythenorth[d]> there might already be things to use / repurpose, mass-dragging terraforming etc must handle looping over tiles?
12:06:29 <teun> TallTyler: so is there a working version with this?
12:07:46 <andythenorth[d]> hmm map(command, tile, array of offsets) maybe
12:07:53 <andythenorth[d]> "I iz not a programmer"
12:30:27 <petern> Head-to-head needs way more than that.
12:31:49 *** esselfe has quit IRC (Quit: rebooting)
12:32:57 <petern> teun: Just follow the link to checkout the PR and build it.
12:33:27 <petern> "Just" may be oversimplifying it.
12:40:40 *** esselfe has joined #openttd
12:46:56 <Merni> Trying to fix 10255 and it seems to be another one character change
12:46:56 <Merni> At least this time the fix was explicitly suggested by peter so I can blame him if anyone says it was a bad idea :p
12:47:39 <Merni> Really wish I had faster build times tho
12:48:37 <petern> Take me ages to realise using MSVC requires extra parameters to build concurrently.
12:49:55 <petern> cmake's option doesn't work because it's just one command to build each project.
12:50:14 <petern> In that case -j ... will help, if you're not already using it ๐
12:50:34 <Merni> I'm just doing "cmake .." then "make"
12:52:17 <petern> Run `make -j x` then, where x is approximately between num cpu cores and num cpu cores * 2.
12:52:32 <Merni> thanks, will try that next time!
12:52:56 <petern> (And if it's still compiling you can interrupt, it'll just continue)
12:55:00 <Merni> definitely faster, tysm
12:58:14 <Merni> weird, the default image viewer is firefox?
12:58:27 <Merni> I guess I hardly use my linux install enough to care
13:08:09 <Merni> welp the commit message doesn't match
13:10:17 <Merni> Er, is it possible to change a commit message of an existing commit?
13:10:47 <petern> Yes, git commit --amend.
13:11:04 <Merni> Oh I have to use the command line
13:12:30 <petern> Well there are probably other ways but that's the way that uses git directly.
13:13:43 <TallTyler> Git Gui has an amend tool and isnโt totally command line
13:23:46 <Samu> ais are intentionally not skipped for preview? but the code does the opposite, i'm confused
13:26:53 <TallTyler> From the description, it seems to use the preview as a delay to not always give it to the human player immediately. But AIs canโt use the preview so they donโt actually get shown it
13:26:56 <glx[d]> No it just don't notify AI if it's useless
13:27:13 <Merni> TallTyler: Nah I'm fine with using the command line, it's just that I find it rather inconvenient compared to the website for such small changes
13:31:52 <Merni> fixed commit message, hopefully
13:39:06 <Merni> Why does shift disable fast forward on linux?
13:46:06 <petern> You've got a debug build.
13:52:25 <Merni> Yeah. But is that intentional?
14:08:08 *** sla_ro|master has quit IRC ()
14:22:56 *** WormnestAndroid has joined #openttd
14:25:53 <Samu> CMake Warning at D:/OpenTTD/OpenTTD GitHub/OpenTTD/cmake/scripts/SquirrelExport.cmake:598 (message):
14:25:53 <Samu> Constructor for 'ScriptEventCompanyAskMerger' has @api. Tag ignored.
14:27:05 *** ag has quit IRC (Quit: User went offline on Discord a while ago)
14:27:45 <glx[d]> Constructor can't be conditional
14:29:44 <glx[d]> If you have a class then the constructor is mandatory
14:30:16 <Samu> i dont know what a constructor is
14:30:28 <Samu> is it complaining about that?
14:32:54 <glx[d]> Btw one of your constructors doesn't initialise all fields
14:33:54 <Samu> the buyer is irrelevant for the AI, it's itself
14:34:42 <glx[d]> It's not only the docs
14:34:56 <glx[d]> It's also the API itself
14:36:20 <Samu> it's initialized as ScriptCompany::CompanyID buyer = ScriptCompany::COMPANY_INVALID;
14:39:16 <Samu> but show buyer for GS, in the same place
14:41:17 <glx[d]> I don't know if it's supported
14:46:07 <Samu> I thought simply adding @api -ai or @api -game would do magic work
14:47:42 <TonyPixel> While encoding pngs, does nml store anything other that raw image data?
14:50:26 <glx[d]> Might work, but needs deep look in how the squirrel binding is done, and probably update of the cmake script
14:51:20 <glx[d]> Overloading constructors was never done before for the API
15:00:40 <TonyPixel> TonyPixel: I wanted to create a png-based sprite editor and I'm wondering if there's any chunks I can ignore to save space while saving images
15:01:31 <petern> Possibly the palette is used to check if it's the correct palette.
15:02:52 <TonyPixel> Well, it's also critical and so required block, I would keep it anyway :P
15:03:05 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
15:03:07 *** WormnestAndroid has joined #openttd
15:04:24 <TonyPixel> I'm mostly asking because Photoshop adds a ton of uncompressed xml which literally nobody cares about
15:05:21 <TonyPixel> And It would be nice for projects with a lot of gfx to just don't add them, so it's a little bit faster compilation
15:05:54 <petern> Does PNG metadata affect compilation speed...?
15:07:22 <TonyPixel> Ok I'm not yet fully informed about uses of that block
15:07:28 <TonyPixel> will check you guys later xd
15:12:10 <Xarick> the new GS events are working!
15:14:56 <Xarick> hmm, I didn't know multiple companies could be offered the same preview
15:17:07 <andythenorth[d]> have you timestamped them?
15:17:38 <Samu> That was an idea, to give all events the date they fired in
15:24:01 <Samu> serious question though, how large is the event pool?
15:24:08 <Samu> how many events can be there
15:26:10 <Samu> the events for vehicle unprofitable will just explode in numbers cus it's from all companies
15:27:03 <Samu> vehicle waiting in depot, too
15:30:57 <glx[d]> Not sure it's a good idea to forward all company events to GS
15:42:46 <Samu> I wanna see what errors I'm gonna get
16:08:31 *** pickpacket has quit IRC (Remote host closed the connection)
16:12:15 *** sla_ro|master has joined #openttd
16:25:22 *** HerzogDeXtEr has joined #openttd
16:41:28 *** pickpacket has joined #openttd
17:05:06 <glx[d]> If you just want to test via CI you can open PR on your own fork instead
17:15:53 <Samu> I would eventually post a pr in the end
17:16:17 <Samu> i didnt know i could post PR's on my fork
17:16:34 <Samu> i thought that wouldn't run the ci
17:18:53 <Samu> besides, the work is done
17:19:38 <Samu> everything exposed to GS
17:40:14 <Merni> TallTylerviaGitHub: TallTyler Well I thought it was a "change" since nothing is actually broken or bugged as such :p
18:17:27 *** Wormnest has joined #openttd
18:24:53 <TallTyler> petern: Any thoughts on which 3rd party JSON parser I should use instead? The main differences seem to be whether they're one huge header file or several smaller header files. I quite like the look of this one, but its single include header file is 24,640 lines...
18:26:06 <TallTyler> RapidJSON also looks nice and is apparently smaller, but is a bunch more files to include
18:26:39 <Wormnest> TonyPixel: the PS xml stuff is most likely XMP metadata, you would have to check the specs which PNG tag it uses. PNG works fine without it, except it might contain things like copyright and license that the owner of the image might want to keep.
18:27:58 <TallTyler> In other news, the 13.0 milestone just has a single bug report and one PR left ๐
18:28:44 *** gelignite has joined #openttd
18:32:57 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:34:25 <TallTyler> Looks like we'll be on schedule for our New Year's release after all ๐
18:45:00 <petern> Is there one we can use a library rather than importing it?
18:45:36 <petern> I don't know if that's a good idea or not.
18:46:59 <LordAro> last time i checked there wasn't any particularly good one (commonly) in repos?
18:49:34 <petern> The CodeQL results also put me off this one...
18:59:03 <TallTyler> When I looked originally, json11 was by far the smallest 3rd party import I found, which is why I used it
18:59:30 <TallTyler> Originally being several months ago, I think
18:59:44 <JGR> Newer is not necessarily better for small libraries like that
18:59:49 <TallTyler> Also the only one with good documentation that I found ๐
19:00:02 <JGR> It's not like the JSON spec changes very often
19:00:38 <TallTyler> Nor are we doing anything particularly complicated with it
19:00:41 <petern> JGR: Main qualm with this one is the repository is archived, so it's unmaintained.
19:02:49 <TallTyler> Does unmaintained != `finished, nothing else to do`?
19:03:28 <JGR> If someone finds some security issue, it could be a problem
19:04:27 <JGR> But realistically a huge fraction of repos which aren't tagged as archived are de-facto unmaintained/finished
19:05:40 <JGR> Known bugs is a bit of a killer
19:07:38 <JGR> For what it's worth I've used rapidjson in a past project and it was fine
19:10:12 <TallTyler> Maybe it's worth the multiple header files to use rapidjson, then
19:10:47 <petern> Oh I searched json*, not *json*. Hmm.
19:17:15 <petern> rapidjson is available via vcpkg and apt, would we even need to include it?
19:21:46 <TallTyler> Thatโs definitely a question I canโt answer, but if so Iโd need some guidance on how to add a dependency
19:29:15 <petern> Stupid user interfaces with tiny fonts...
19:29:49 <petern> VSTs from the 32-bit era designed for 1024x768 screens I think ๐
19:46:38 <andythenorth[d]> a week ago I was starting a game ๐
19:46:47 <andythenorth[d]> then I needed to write a GS for it ๐
20:02:04 <glx[d]> I tried looking at generated .sq files to understand how it works
20:03:02 <glx[d]> And I don't fully understand everything
20:25:55 <Rubidium> Samu: I think the gist is... there are no constructors for ScriptEvents avaiable in the scripts at all
20:26:59 *** supermop_toil has joined #openttd
20:27:12 <Rubidium> so technically the constructors should not end up in the documentation
20:33:30 <Samu> what will the doxygen look like?
20:36:35 <Samu> im about to install doxygen :p
20:40:14 <Samu> meh, i dunno how to use it :o
20:42:46 <glx[d]> you don't use it, you just tell cmake were the binary is
20:43:47 <glx[d]> Rubidium: but I can see constructor/destructor in API doc for many ScriptEvent subclasses
20:44:04 <Rubidium> glx[d]: oh yes, you can...
20:45:35 <Rubidium> as in, currently only for two of 32 ScriptEvents the constructor is exposed to scripts
20:46:12 <Rubidium> somebody just forgot to add #ifndef DOXYGEN_API around the constructors to not have them in the documentation
20:48:03 <glx[d]> and the 2 derived ScriptEventCompanyTown classes also use AddConstructor() calls
20:48:21 <glx[d]> probably because they are derived and it's not catched by the script
20:50:13 <glx[d]> let's fix squirrelexport ๐
20:58:23 <Rubidium> only problem is that now it won't should the event at all anymore...
20:59:03 <LordAro> that feels suboptimal
20:59:44 *** gelignite has quit IRC (Quit: Stay safe!)
21:10:38 <glx[d]> oups I forgot we explicitely skip doxygen on windows
21:11:35 <Rubidium> now the doxygen works again
21:13:34 <Rubidium> LordAro: if you want to know suboptimal, see MSVC ;) Either you disable all inlining including forced ones (standard for debug builds), or you enable all inlining based on inline/__forceinline
21:16:15 <Rubidium> MSVC debug build takes 2.5 to 3.5 the time of a GCC/Clang build. Okay, different computers and OS... I know. But... the Windows computer is a few years newer
21:20:42 <glx[d]> ah I think I remember why we don't try doxygen on windows, it doesn't work very well
21:24:36 <LordAro> Rubidium: Windows in general is just slow at compiler operations, in my experience
21:24:42 <LordAro> something to do with lots of (small) file io
21:24:58 <LordAro> also Win Defender does slow it down if you haven't excluded all the right folders
21:25:25 <Rubidium> oh, I'm not talking about the building itself, just the executable that's horribly slow
21:32:21 <glx[d]> samu: now your contructors should be fine (just don't put `@api` in the doc
21:34:51 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:36:12 <Samu> if constructors are not shown anymore, i can just reduce it to 1 constructor
21:36:31 <Samu> wish i could see the outcome
21:44:09 <glx[d]> oh I know why, it's the shell filter
21:56:42 <Samu> glx[d], i can't find it there
21:57:58 <glx[d]> doxygen is disabled for windows, because it doesn't work yet
21:58:18 <Samu> i see lots of other things openttd documented though
22:06:54 <petern> So tempted to install Linux on my PC...
22:09:35 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:15:11 *** Samu has quit IRC (Quit: Leaving)
23:28:05 *** Fairy has quit IRC (Quit: User went offline on Discord a while ago)
23:34:18 <glx[d]> ok doxygen INPUT_FILTER is not really usable in a cross platform way
23:35:19 <glx[d]> I tried something with ${CMAKE_COMMAND} but as the path contains spaces it fails
23:37:26 *** sla_ro|master has quit IRC ()
23:49:37 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
continue to next day โต