Config
Log for #openttd on 21st January 2023:
Times are UTC Toggle Colours
10:44:36  <andythenorth[d]> how do I make AIOrder.InsertOrder available to GS?
10:44:48  <andythenorth[d]> I thought it would just be one line a .h file or something
10:44:51  <andythenorth[d]> but my eyes fail
10:46:58  *** osswix has joined #openttd
10:46:58  <osswix> Stupid dumb question; what language are game scripts even in? I successfully merged two, so maybe I should learn at least the basics so I can make my own in the future.
10:49:01  <andythenorth[d]> does the comment `* @api -game` cause the method to be dropped from NoGO?
10:49:31  <andythenorth[d]> GS is squirrel
10:50:49  <JGR> andythenorth[d]: It's is not included in the GS version of the class, yes
10:51:22  <andythenorth[d]> thanks
11:07:59  *** Wolf01 has quit IRC
11:11:26  *** Wolf01 has joined #openttd
11:11:32  <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1066314098100424747/Screen_Recording_2023-01-21_at_11.10.36.mov
11:11:40  <andythenorth[d]> "Fly the plane"
11:11:52  <andythenorth[d]> petern: I am sure you are enjoying me dragging you into this πŸ˜›
11:18:24  <DorpsGek> [OpenTTD/OpenTTD] rubidium42 opened pull request #10380: Hide Tile and TileExtended implementation details inside Map structure https://github.com/OpenTTD/OpenTTD/pull/10380
11:24:38  <andythenorth[d]> so....can I expose my GS storybook buttons to hotkeys?
11:43:04  <Samu> Rubidium, you gave me an awful idea for a PR... https://github.com/OpenTTD/OpenTTD/pull/10380/commits/18a02b8f857a4aee275fbca6b149d461252ec4c1
11:43:42  <Samu> there's many more functions using the global functions when there's already a script one
11:43:58  <Samu> should I... replace them all :p
11:44:10  *** michi_cc[d] has joined #openttd
11:44:10  <michi_cc[d]> Okay, #10380 looks like it would be a gigant conflict if I ever get back to my newmap branch. (Not a criticism against the PR, more against me that I've been procrastinating for like 10 years on that πŸ™‚ )
11:44:24  <petern> Hid that
11:44:27  <petern> ...
11:44:39  <petern> God that was cold
11:44:40  <Rubidium> Samu: awful would be using std::map for the tiles of a map
11:47:25  <Samu> already gonna fix my rail PR using ::MapSize()
11:48:16  <Rubidium> michi_cc[d]: does that change all the fields where stuff gets saved, then yes... that'll conflict in a nasty manner, though otherwise it might reduce the size of the branch if it was mostly about how tile indices are used/stored
11:48:36  <Eddi|zuHause> michi_cc[d]: but something like #10380 is also overdue for like 10 years :p
11:49:13  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10376: Fix: [Script] Ensure building/removing rail lines can't be backwards and allow building/removing rail lines coming from or heading to the void https://github.com/OpenTTD/OpenTTD/pull/10376
11:50:34  <Samu> future proof
11:51:10  <petern> andythenorth[d]: It's almost like chocks away
11:53:06  <DorpsGek> [OpenTTD/OpenTTD] andythenorth opened pull request #10381: Change: allow GS to mutate vehicle orders (previously AI-only) https://github.com/OpenTTD/OpenTTD/pull/10381
11:53:54  <andythenorth[d]> petern: we have a no war theme, but I'm considering a 'release bomb' button
11:54:14  <Samu> oh, nice, I always wondered why GS's couldn't use some of the AI functions
11:54:15  <andythenorth[d]> which demolishes the tile somewhat underneath the plane, but allowing for speed and rate of fall of bomb etc
11:54:47  <Eddi|zuHause> we have this fighter jet disaster...
11:55:19  <andythenorth[d]> I'm also considering 'release giant cat' button, which will plant one of the object cats
11:55:26  <andythenorth[d]> and then giving the GS to yogscast for jingle jam
11:55:30  <michi_cc[d]> Rubidium: The main conflict to my branch would be that I switch the map accessors to take a Tile* to avoid the cost of repeatedly getting the appropriate sub-tile for the TileIndex.
11:55:44  <michi_cc[d]> But don't let that stop you, I could have worked on that years ago πŸ™‚
11:55:51  <andythenorth[d]> it's quite plausible that  funny GS would raise Β£100k or so for charity on the stream
11:56:03  <andythenorth[d]> 'donate to bomb cats'
11:56:28  <andythenorth[d]> I would not mind raising Β£100k for charity by basically doing stupid scripted things
11:57:10  <michi_cc[d]> I.e. the main "feature" of the newmap branch is that you get more than one Tile for each TileIndex (out-dated in-between partial rebase at <https://github.com/michicc/OpenTTD/commits/newmap>)
11:57:16  <Eddi|zuHause> michi_cc[d]: shouldn't that be a thing the optimizer should figure out? most of the map accessors should be inline?
11:58:21  <michi_cc[d]> It's not about that, but that TileIndex to Tile* becomes somewhat costly. Some clever code rewriting  can mitigate that, but this is way beyond a normal compiler optimization.
11:59:42  <Eddi|zuHause> can't we merge Tile and TileExtended and live with the potentially wasted memory?
12:01:33  <petern> What problem does that solve?
12:02:12  <Eddi|zuHause> simplify the map accessors?
12:02:20  <Samu> no one really attempted to make a GS-as-an-AI
12:02:27  <Samu> i wonder what kind of bugs will you uncover
12:02:41  <Samu> andythenorth[d],
12:05:53  <Samu> Script_Group is also not accessible to GS
12:06:10  <Samu> will you look at that one?
12:06:14  <petern> Eddi|zuHause: I don't think it does though.
12:07:16  <Eddi|zuHause> petern: but in the context of michi_cc[d]'s approach to pass a pointer instead of an index, it would save passing two pointers in some situations
12:08:21  <andythenorth[d]> Samu: πŸ˜‡ 🧐 :spray_bottle:
12:08:49  <andythenorth[d]> 'an AI is just a GS fixed to company mode'
12:08:52  <andythenorth[d]> said nobody yet
12:09:23  <michi_cc[d]> Well, I do merge both in my branch, but there the end goal is a re-arranged Tile struct that is smaller anyway.
12:22:56  <Rubidium> https://godbolt.org/z/bb4jdxfze <- interesting idea?
12:23:39  <Rubidium> test1 is basically the current code, test2 would be an intermediate variant and test3 would be with merged objects
12:27:41  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #10381: Change: allow GS to mutate vehicle orders (previously AI-only) https://github.com/OpenTTD/OpenTTD/pull/10381#issuecomment-1399242305
12:30:10  *** WormnestAndroid has quit IRC
12:30:12  *** WormnestAndroid has joined #openttd
12:32:04  <petern> Can't see much on mobile, what's the summary?
12:32:42  <michi_cc[d]> Rubidium: Definitly interesting. It would de-couple Tile and Map enough that I might not even have to change any map accessor even with a changed map backend.
12:33:57  <michi_cc[d]> petern: Pass a wrapper tile class into the map accessors, and let the compiler optimize the wrapper away.
12:34:40  <michi_cc[d]> Which means *_map.h is mostly independent on how the map is actually stored.
12:35:54  <TrueBrain> I always wondering when talking about map/tiles .. how important is it to us to hold on to the low memory usage of OpenTTD? If it would, say, double, would anyone actually mind? Bit random question maybe, but I always wonder πŸ˜›
12:36:59  <reldred> TrueBrain: Do it
12:37:26  <petern> 32bpp and 4x extra zoom pretty much wiped that out anyway
12:37:27  <michi_cc[d]> TrueBrain: I think the important thing is cache usage, not main memory usage, i.e. access patterns.
12:37:30  <reldred> I dunno what we’re even getting for the increased memory usage but let’s ball
12:37:43  <TrueBrain> michi_cc[d]: I totally agree; read access mostly is what should be really fast
12:37:59  <TrueBrain> we used to balance memory-usage too, but I think that is non-sense these days, not?
12:38:21  <TrueBrain> petern: didn't even consider that; so yeah, okay πŸ™‚ Just funny how times change πŸ˜›
12:38:22  <Rubidium> adding 4 bytes to the map array is 1 GB for 16kx16k ;)
12:38:45  <petern> Illegal map size πŸ™‚
12:38:46  <TrueBrain> Rubidium: pff. nothing we support anyway πŸ˜›
12:39:04  <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1066336127893643264/Screen_Recording_2023-01-21_at_12.36.00.mov
12:39:05  <andythenorth[d]> I shouldn't
12:39:05  <andythenorth[d]> but I did
12:39:16  <TrueBrain> 165MB .....
12:39:45  <TrueBrain> and yeah, you shouldn't have
12:39:48  <TrueBrain> really, you shouldn't
12:39:53  <TrueBrain> this is not a military game ffs πŸ˜›
12:40:36  <TrueBrain> funny how the local gov attitude towards you seems to be winning from the bombs πŸ˜›
12:40:42  <andythenorth[d]> yeah it's in company mode
12:40:46  <andythenorth[d]> has to be to control the vehicle
12:40:49  <TrueBrain> "No, I refuse your bomb to blow up my house, AS I DONT LIKE YOU"
12:40:54  <andythenorth[d]> I might need to flip to and from deity mode
12:41:07  <andythenorth[d]> also 'DemolishTile' is not as advertised by Doxygen
12:41:13  <andythenorth[d]> it doesn't remove everything on the tile, at all
12:41:25  <andythenorth[d]> `Destroy everything on the given tile.`
12:41:32  <andythenorth[d]> except objects, industries and protected buildings
12:41:35  <andythenorth[d]> and town signs
12:41:41  <TrueBrain> would be a weird game ... "a town has to like you for you to destroy it" .. such a weird balance that gives
12:41:44  <TrueBrain> first you send it bananas
12:41:47  <TrueBrain> then you blow parts up
12:41:50  <TrueBrain> more bananas
12:41:51  <TrueBrain> more blowing up
12:41:56  <andythenorth[d]> well it was the early 90s
12:42:05  <andythenorth[d]> nothing made sense between 1989 and 1997
12:42:33  <andythenorth[d]> anyway we have been neglecting GS and we should pay our dues
12:43:44  <andythenorth[d]> hmm clicking 'bomb' too fast actually causes it to become quite non-responsive
12:43:56  <andythenorth[d]> due to the events on the queue
12:44:09  <andythenorth[d]> maybe I should add spam protection
12:44:55  <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1066337599603625994/image.png
12:44:55  <andythenorth[d]> now trying to write my name in demolished tiles
12:45:25  <andythenorth[d]> could do a painter-type game
12:45:59  <nielsm> etch-a-sketch
12:46:47  <andythenorth[d]> I wonder if we could enforce some sort of 'performance mode' πŸ˜›
12:46:53  <andythenorth[d]> with a limited event queue
12:47:17  <andythenorth[d]> I don't know much about how UI performance is handled in comp sci πŸ˜›
12:47:39  <andythenorth[d]> also can we add a plane crash?
12:47:55  <andythenorth[d]> I want to add tower defence objects, with a random chance of downing your zellepin
12:48:03  <andythenorth[d]> nobody has to die
12:48:28  <petern> Rubidium: I did already increase the map size by quite lot without anyone complaining...
12:48:43  <petern> (Not even devs)
12:48:46  <TrueBrain> with what? πŸ˜›
12:50:57  <petern> Maybe it was silent protest...
12:51:32  <petern> I doubled TileExtended.
12:51:36  <TrueBrain> owh, in 2018
12:51:38  <TrueBrain> that was long ago πŸ˜›
2023-01-21T12:55:2023-01-22T1

Powered by YARRSTE version: svn-trunk