Config
Log for #openttd on 23rd February 2024:
Times are UTC Toggle Colours
10:05:33  *** Webster has joined #openttd
10:05:51  <LordAro> are you looking at the version from when that patch was added?
10:05:53  <peter1138> Well the patch exists, not sure if it's applied.
10:06:07  <LordAro> https://cgit.freebsd.org/ports/tree/games/openttd/files
10:06:35  <peter1138> Ah, I guess so, cgit's user interface is a bit shit.
10:06:56  <DorpsGek> [OpenTTD/OpenTTD] zephyris commented on pull request #12164: Add: Highlight in white all pieces of company owned infrastructure in the viewport https://github.com/OpenTTD/OpenTTD/pull/12164#issuecomment-1961046718
10:06:57  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1210528217232969758/image.png?ex=65eae341&is=65d86e41&hm=bde24ed28b3fd08e95d1dd8722ab52f88ccb26ee13538f6b0581396adfadf52a&
10:07:11  <peter1138> Nothing on that page says I'm looking at a particular revision 🙂
10:07:26  <LordAro> not as such
10:09:27  <peter1138> Wait, do they have every. single. thing. in a single repo...
10:09:38  <LordAro> yup
10:10:13  <LordAro> Arch used to do it that way too, but with everything in its own branch
10:10:19  <LordAro> looks like they've split it up now
10:12:46  <peter1138> The <math.h> include is probably fine.
10:13:00  <peter1138> System includes in the middle of the include list is a bit poor on our part.
10:21:45  *** Ox7C5 has quit IRC
10:23:43  <xarick> I "plan" to release LuDiAI AfterFix v21 once 14.0 non RC is out
10:25:48  <xarick> ewww the readme needs editing
10:25:57  <xarick> no more random...
10:27:00  <xarick> have to remove all references to settings being randomized from it
10:29:46  *** jinks has quit IRC
10:30:08  *** jinks has joined #openttd
10:30:45  *** Leopold has quit IRC
10:31:16  *** Leopold has joined #openttd
10:42:14  <peter1138> You removed randomness from your AI?
10:45:03  <xarick> random deviation stays, but all the others with CONFIG_RANDOM are now gone
10:46:11  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210538090406354964/image.png?ex=65eaec73&is=65d87773&hm=e669246655f1ece1bd638d8b4fe00b2ad4379e31575ff2b03ae58499f494f4bc&
10:46:11  <xarick> meanwhile...
10:46:24  <xarick> hog is stalling sometimes
10:46:38  <xarick> 10 seconds hiccups
10:54:32  <LordAro> 0.05 frames/s is quite low
10:54:34  <xarick> I'm not sure if I upload Leage Tables GS
10:55:04  <xarick> the periods fiasco and time changes make things complicated
10:55:17  <xarick> last year is not last year
10:55:33  <xarick> last quarter is --- I dunno what now
11:09:59  <peter1138> fiasco.
11:11:05  <peter1138> LordAro: Xarick saves normally have script OpCodes set to max, which is 25x normal.
11:11:22  <peter1138> Maybe it was only 10x last time.
11:11:48  <peter1138> No, 25x 🙂
11:12:52  <merni> there are more than 100 open PRs 😮
11:17:52  <peter1138> AAAHogEx with 250,000 opcodes will make a 64x64 map run slow 🙂
11:18:55  <xarick> I usually set 250000 opcodes because i want to see AIs on their best
11:19:19  <xarick> but yeah, maybe i should try 10000 sometimes
11:20:30  <xarick> at 10k, my AI is a poor performer for example
11:28:38  *** APTX has quit IRC
11:31:07  <LordAro> peter1138: i was checking the stats, and my last set of brake pads only lasted ~2000k
11:31:16  <peter1138> 😮
11:31:24  <LordAro> i think my calipers might have been rubbing rather longer than i thought
11:31:33  <peter1138> Bad weather is harsh on them though.
11:32:13  <peter1138> Heh, yeah, when I last fitted new pads they were a bit tight, probably the caliper is a bit tired and not returning properly.
11:32:25  <peter1138> New bike right?
11:32:52  <LordAro> for sure
11:33:07  <LordAro> i got my other bike back from the menders this morning
11:33:18  <peter1138> Exciting
11:33:22  <LordAro> new chain, cassette, chainring (& also front brake pads)
11:33:37  <peter1138> Uh oh, you left a chain on too long?
11:33:41  <LordAro> the latter 2 had done 20000k though
11:33:51  <LordAro> chain had done ~8000k
11:34:00  <peter1138> Ouch, yeah, that's a bit much 🙂
11:34:16  <LordAro> last time i rode it i was pulling the chain off when setting off from junctions
11:34:19  <peter1138> I replaced my last two at 4k. Been burned by that before.
11:34:21  <LordAro> which made roundabouts a bit fun
11:34:46  <xarick> 30 seconds to advance 1 tick, something's wrong with Hog 😦
11:35:26  <peter1138> Probably wants that list opcodes issue to be fixed.
11:35:50  <xarick> gonna check
11:36:13  <peter1138> AIVehicleList().Count() is lol with lots of vehicles.
11:36:59  <peter1138> Looking at bike sales... nobody lists anything more than XL, which is on the small side for me 😦
11:39:50  <LordAro> have you considered being less tall?
11:41:38  <peter1138> I found one (second hand) that's too big for me!
11:41:39  *** APTX has joined #openttd
11:42:01  <peter1138> <https://i.ebayimg.com/images/g/uCQAAOSwNSdlz4DI/s-l1600.jpg>
11:44:55  *** APTX has joined #openttd
11:47:26  <LordAro> that mudguard is hilarious
11:48:26  <peter1138> Yeah not sure when it's in the wrong place, seems a simple fix.
11:49:16  <peter1138> Brake in the way maybe, but the guard can be adjusted.
11:51:43  <xarick> not sure what Hog is doing, something about Wait for money causing stalls
11:52:23  <peter1138> Eh... something has gone wrong here... <https://i.ebayimg.com/images/g/8ucAAOSwpBZlT8uG/s-l1600.png>
11:53:13  *** pickpacket6 has joined #openttd
11:53:18  <peter1138> Bent forks at least...
11:54:45  <xarick> aha, triggered a big stall now, seems somethings' wrong with FreeUnitIDGenerator instead
11:55:11  *** pickpacket has quit IRC
11:55:11  *** pickpacket6 is now known as pickpacket
11:56:12  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210555707582193704/image.png?ex=65eafcdb&is=65d887db&hm=17775ec675b879a8abfe1f49ec0682f70d871d1577c826999a632273c5d66450&
11:56:18  <xarick> it's cloning a vehicle
11:56:23  *** Leopold has quit IRC
11:56:31  *** Leopold has joined #openttd
12:01:01  <peter1138> Cloning a vehicle or cloning a lot of vehicles?
12:01:13  *** Leopold has quit IRC
12:02:57  *** Leopold_ has joined #openttd
12:12:39  <xarick> hmm not sure, how do I count?
12:13:29  <xarick> the command seems to have failed
12:13:36  <xarick> it tried to clone an aircraft
12:13:43  <xarick> failed somwhere
12:15:35  <xarick> error message 3863
12:15:43  <xarick> StringID 3863 is what?
12:17:07  *** Ox7C5 has joined #openttd
12:18:01  <xarick> static const StringID STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY = 0xF17;
12:18:13  <xarick> okay, maybe he's spamming clone
12:18:17  <xarick> and has no cash
12:18:28  <xarick> and that triggers FreeUnitIDGenerator
12:19:14  <xarick> and this function is expensive if spammed
12:19:18  <xarick> seems to be this
12:19:28  <ajmiles> peter1138: Perfect, I can work with that
12:26:20  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210563292729446472/image.png?ex=65eb03ec&is=65d88eec&hm=80f2522771b10caedeb274a5b2138a0b6309bd086d87c86f3863810bc1c7847a&
12:26:20  <xarick> confirmed
12:26:30  <xarick> he's spamming Clonevehicle
12:26:35  <xarick> and failing
12:27:40  <xarick> probably refiting to mail which costs more than AIEngine.GetPrice
12:28:29  <xarick> the clone command is doing the refit
12:28:39  <xarick> i guess, 90% sure
12:36:12  <_glx_> I remember a similar conversation some time ago here
12:37:00  <_glx_> FreeUnitIDGenerator is optimised for successive calls, but it's rarely used that way
12:37:07  <peter1138> ajmiles: If you wanted to optimise memory for 8bpp sprites, you could completely ignore the RGBA part and go with just the palette index. In which case, index 0 is transparent.
12:37:40  <peter1138> That would reduce GPU memory requirement, probably enough to be worth handling that case.
12:38:13  <peter1138> glx, bitmap of free unit IDs?
12:38:38  <peter1138> Similar to the free pool slot bitmap, I guess.
12:38:54  <_glx_> It's per vehicle type, so should require less bits
12:39:50  <_glx_> (less memory)
12:40:38  <_glx_> Hmm no, because someone may use all the pool for a type
12:40:38  <ajmiles> peter1138: Ah, yes that is worth optimising for!
12:41:20  <peter1138> Optimising for sprite scaling is also very much worth it.
12:43:39  <peter1138> Scaling those 1x sprites up to 4x uses 16x more memory, add on the 8bpp to 40bpp and that's 80x more memory per sprite.
12:44:40  <peter1138> (Approximately 16x, there's a bit of optimisation with continuous transparent columns.
12:44:47  <peter1138> (Or it might be rows)
13:08:20  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler merged pull request #12161: Fix #10490: Allow ships to exit depots if another is not moving at the exit point https://github.com/OpenTTD/OpenTTD/pull/12161
13:08:23  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler closed issue #10490: [Bug]: Ships loading at a dock block ships from leaving a depot on the adjacent tile https://github.com/OpenTTD/OpenTTD/issues/10490
13:10:50  <DorpsGek> [OpenTTD/team] glx22 commented on issue #521: [hu_HU] Translator access request https://github.com/OpenTTD/team/issues/521
13:22:17  *** _rei4122 has joined #openttd
13:22:17  <_rei4122> xarick: When a NOT_ENOUGH_CASH error occurs, he waits for his assets to increase by 10,000 before calling again, so it is unlikely that he would call CloneVehicle without any waiting time.
13:22:17  <_rei4122> What's going on?
13:25:48  <xarick> er, guess I'm not sure then.
13:26:13  <xarick> how much is the refit cost?
13:28:02  <xarick> could WaitForPrice actually not wait?
13:28:27  <xarick> hmm no, it's still going to increase cost next time
13:28:34  <xarick> so im not sure what's happening
13:30:26  <_rei4122> "WaitForPrice called recursively" If this log had appeared, he might not have waited.
13:32:31  *** fairyflossy has quit IRC
13:46:29  <xarick> it's so slow, I can't even manage to switch to company 6 log, to see what's happening
13:46:59  <peter1138> Press pause.
13:47:35  <xarick> company 9 is also triggering them
13:47:42  <xarick> so, yeah, double trouble
13:49:50  <peter1138> > warning: `this' is not accessible (substituting 0). Couldn't load 'this' because its value couldn't be evaluated
13:50:00  <peter1138> Always helpful for debugging when `this` is optimised away :S
13:51:06  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210584622635814992/image.png?ex=65eb17c9&is=65d8a2c9&hm=0e63c3a0c15fbcf9290fa4ecd52ad6dc62cbfa5a9878c724050ddfaeed672cbd&
13:51:15  <xarick> it's spamming it
13:51:29  <xarick> how? that I don't know
13:51:36  <peter1138> 17ms per clone vehicle?
13:52:07  <xarick> yes
13:52:37  <_glx_> I have an idea for FreeUnitIDGenerator
13:53:00  <peter1138> I've built one 🙂
13:53:04  <_glx_> ah
13:53:13  <_glx_> local cache in company ?
13:53:45  <peter1138> <https://github.com/OpenTTD/OpenTTD/compare/master...PeterN:OpenTTD:free-unit-id-bitmap>
13:54:05  <peter1138> xarick: try this
13:54:23  <peter1138> Might have bugs, not fully tested.
13:55:45  <peter1138> 5000 units useds 625 bytes, so it's not exactly a memory hog.
13:57:34  <peter1138> I didn't test the ChangeOwnershipOfCompanyItems path at all either.
13:59:23  *** D-HUND is now known as debdog
14:02:34  <_glx_> not sure about this->first_free management
14:02:46  <_glx_> especially in UseId
14:04:19  <xarick> it's building
14:04:26  <xarick> dang, i need a 16 core cpu, kek
14:04:44  <_glx_> imagine loading a save with RV 1,2,5,7,8 first free will be 9, but should be 3 (if I read the code correctly)
14:05:26  <peter1138> Yes, good point.
14:06:23  <_glx_> ReleaseID seems to be correct on this point
14:07:01  <peter1138> It's correct for UseID, but I didn't take into account loading games.
14:07:38  <_glx_> it's correct if UseID uses NextID
14:08:32  <_glx_> assuming first_free was correct 🙂
14:08:43  <peter1138> first_free might not even be needed tbh.
14:09:12  <peter1138> Even with 5000 units it only has 78 values to check.
14:09:34  <_glx_> just loop over full range of bits should be fast enough yes
14:09:41  <peter1138> The vehicle pool has a lot more entries and is shared across companies and types.
14:09:53  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210589349901639710/image.png?ex=65eb1c30&is=65d8a730&hm=5c4fbf6b7ad76d57d7d59666b5b6508b49aafad7fc3d560fe777252e30b6d831&
14:09:53  <xarick> it's much faster
14:10:07  <xarick> it's company 6
14:10:09  <peter1138> Nice.
14:10:29  <peter1138> How large is the vehicle pool in that game?
14:10:37  <xarick> hmm let me check
14:10:43  <xarick> need to switch to debug build
14:11:06  <peter1138> Nah, pause it then show _vehicle_pool
14:11:16  <_glx_> btw a company reaching 5000 units will be quite rare
14:11:29  <peter1138> Indeed.
14:11:40  <_glx_> I know someone trying to reach it but still didn't 🙂
14:16:47  <xarick> 168744 vehicles
14:17:04  <peter1138> xarick: can you update and try again? I removed the first_free stuff, see how that affects performance.
14:17:11  <xarick> ok
14:17:23  <peter1138> 168744 is... a lot I guess.
14:17:40  <peter1138> Hmm, hope it compiles, didn't test that :p
14:19:33  <_rei4122> xarick: When hogex runs out of money, it tries to make money by selling vehicles. However, for some reason, it tried to make more CloneVehicle when it was short, and it was short, and the infinite recursive loop check seemed to be calling CloneVehicle in succession.
14:21:47  <_rei4122> If he find infinite recursion, Sleep is an easy solution
14:22:20  <_glx_> if I read correctly (old or new) it's actually possible to have more units than the limit when merging companies
14:22:22  <xarick> oh snap, autosave is gone 😦
14:23:21  <_rei4122> The proper solution is to find out why CloneVehicle is trying to make money when there isn't enough money
14:24:15  <_glx_> Sleep won't stop the recursion
14:25:14  <xarick> sorry, can't reproduce this
14:25:19  <xarick> autosave was overwritten
14:25:19  <_rei4122> If he save money while Sleep, he gets out of the loop.
14:25:24  <_glx_> and you can't Sleep in the middle of a C++ call
14:25:48  <xarick> and now HogEx seems to be unstuck
14:25:57  <xarick> gonna wait for the next time it happens again
14:26:54  <_rei4122> AIController::Sleep
14:27:44  <_glx_> I know the function, but it can't be used on C++ side
14:28:12  <_glx_> that's why it's disabled inside Valuate
14:29:04  <_rei4122> Oh, I'm talking about if you were to fix the AAAHogEx code, not OpenTTD itself.
14:29:24  <xarick> https://discord.com/channels/142724111502802944/1008473233844097104/1210563292938895431
14:29:35  <xarick> I think we're talking about this
14:29:47  <_rei4122> Oops
14:30:52  <xarick> there's no Valuate here, I think
14:31:05  <_glx_> ah yes sleeping in a while(true) can be a good idea
14:33:16  <_glx_> but I imagine WaitForPrice would really wait (with some sleeping)
14:35:35  <_rei4122> Since there appear to be several other heavy APIs, I believe a fundamental solution to prevent AI from overloading OpenTTD would require methods beyond just making it lighter.
14:36:06  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210595948216979476/image.png?ex=65eb2255&is=65d8ad55&hm=89c57965e7a7d314d62486bf1bab8d466cd4fea188d00a86648e5341f96d56a7&
14:36:06  <xarick> peter1138: only got 1 instance so far
14:36:12  <xarick> seems slower
14:36:30  <peter1138> Expected.
14:36:36  <peter1138> Although not THAT much.
14:37:01  <xarick> this is probably not acounting
14:37:06  <xarick> for the failing
14:37:14  <xarick> so, not apples to apples
14:39:35  <_rei4122> For instance, calling AITileList.AddRectangle in succession over a large area can easily be halted. To prevent this, the only solution might be to actually measure the CPU load caused and impose penalties on the AI accordingly.
14:41:04  <_glx_> oh we can add a cost for every AddItem()
14:41:36  <peter1138> The issue with the evaluate filter at the moment is it penalises AIs for doing the right thing 😦
14:41:43  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210597362507063356/image.png?ex=65eb23a7&is=65d8aea7&hm=8b25ac068ebe57ad41925cd5117008728f81ab4b8cbafcf23fe2031c69bee187&
14:41:43  <xarick> company 6 is still... waiting for money, but doesn't stall for 10 seconds anymore
14:41:55  <xarick> only a few thousands
14:42:24  <xarick> hundreds*
14:42:38  <_glx_> Valuate global cost can be increased
14:43:28  <_rei4122> Therefore, how about imposing penalties based on the time measured?
14:44:14  <_rei4122> But then, it might vary depending on the environment
14:44:28  <_glx_> you can't use anything hardware dependant
14:45:50  <_glx_> (and it's not because MP because scripts only run on server, but fairness for scripts run on different systems)
14:45:53  <peter1138> op codes = pool size.
14:46:23  <peter1138> Ah, CloneVehicle still uses 50ms for me, but that's when it's successful.
14:47:17  <peter1138> (There's a lot of vehicles in this save :))
14:47:32  <peter1138> I shall have to time NextID by itself.
14:47:57  <_glx_> so first_free could actually help, but must be done the right way 😉
14:48:20  <peter1138> I don't think so, it's the rest of cloning that is taking time.
14:48:31  <_glx_> oh yeah cloning does a lot
14:49:33  <_glx_> but timing clone and NextID will tell
14:51:01  <peter1138> [2024-02-23 14:50:41] dbg: [misc:0] [GetFreeUnitNumber] 0 us [avg: 0.0 us]
14:51:04  <peter1138> Basically free...
14:51:21  <peter1138> This needs _rdtsc 🙂
14:51:51  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1210599912010547200/image.png?ex=65eb2606&is=65d8b106&hm=7b13328d0954f7658330ea276d10a969b5167829ef99fa7ca82033dc75668083&
14:51:52  <_glx_> so way better than the 2 Vehicle::Iterate loops 🙂
14:51:53  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #12164: Add: Highlight in white all pieces of company owned infrastructure in the viewport https://github.com/OpenTTD/OpenTTD/pull/12164#pullrequestreview-1898238991
14:52:43  <peter1138> I didn't time master though... doing that now.
14:52:55  <_glx_> should be horrible
14:53:29  <_glx_> a loop to find biggest id, then a loop to fill the bool array
14:54:06  <_glx_> because it's not only NextID time, but object creation + NextID
14:54:55  <xarick> and then it fails because not enough money for refit 😛
14:55:00  <xarick> and sells
14:55:01  <_glx_> the cache mecanism is only used during company merge in master
14:55:24  <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #12164: Add: Highlight in white all pieces of company owned infrastructure in the viewport https://github.com/OpenTTD/OpenTTD/pull/12164#pullrequestreview-1898306010
14:55:45  <_glx_> every other use have to do the double Vehicle:Iterate
14:56:23  <peter1138> And that bool array is larger than my bitmap 🙂
14:56:39  <peter1138> [2024-02-23 14:56:35] dbg: [misc:0] [GetFreeUnitNumber] 172720 us [avg: 17272.0 us]
14:56:40  <peter1138> Yes.
14:56:43  <_glx_> shorter life span 🙂
14:57:15  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #12163: Add: Basic autocompletion on tab for console commands https://github.com/OpenTTD/OpenTTD/pull/12163#issuecomment-1961480987
14:57:27  <_glx_> but super expensive
14:57:30  <peter1138> 17ms is close to Xarick's failure mode.
14:58:27  <_glx_> and it can be worse if more vehicles
14:59:34  <peter1138> print _vehicle_pool.items
14:59:34  <peter1138> (size_t) 673167
14:59:37  <peter1138> This is pretty large.
15:04:08  <peter1138> And doesn't affect just cloning.
15:04:50  <peter1138> As building any vehicle except wagons will allocate a new unit number.
15:10:31  <peter1138> Where do these commands appear in the framerate UI anyway...
15:10:49  <peter1138> You can issue while paused, in which case the gameloop isn't being updated.
15:24:33  <ajmiles> peter1138: Is the upscaling performed essentially just "point filtered", or does it anti-alias like bilinear?
15:24:53  <peter1138> It's always nearest neighbour.
15:25:23  <peter1138> There's some special algorithm for scaling down but I wouldn't worry about that for now 🙂
15:25:52  <_rei4122> I was able to identify the issue on the AAAHogEx side and make corrections to prevent CloneVehicle from being called consecutively.
15:25:52  <_rei4122> Thank you for finding the problem.
15:26:38  <ajmiles> I know it's too early to read much into the performance, but in-game and on the main menu the GPU render time of the scene at full ultra-wide resolution is about 0.1ms before optimisation
15:27:09  <peter1138> Fully zoomed out is when there's more work to do.
15:27:14  <ajmiles> And that's on the frames where the blitter is asked to repaint most of the screen. On the frames where very little is dirtied, it's a fraction of that
15:28:22  <peter1138> GPUs are a lot faster, and have way more memory, than when I tried doing that with OpenGL 🙂
15:28:40  <ajmiles> The last video I took before bed shows it in a pretty good start compared to where it was at the beginning of the evening, but I need to figure out what's going on when scrolling that I'm not currently handling https://youtu.be/0EN1xgVWYHY
15:28:44  <peter1138> When I did that I had a 512MB 8800GT, which was pretty good at the time.
15:29:07  <ajmiles> I also need to get the mouse cursor working, because playing "guess where the mouse is" isn't fun
15:29:41  <j_n> ajmiles: GPU rendering for OpenTTD sounds cool
15:29:44  <peter1138> Looks like you have no palette remapping at the moment.
15:30:34  <peter1138> (One step at a time)
15:31:04  <ajmiles> Is that something beyond what happens on the GPU in the GL version's final shader? I have the 256x1 palette working (otherwise nothing would be the right colour), but "palette remapping" is something else?
15:31:43  <j_n> question regarding the software renderer, does palette cycling require a dirty block to show up, like other animations?
15:31:46  <j_n> just curious
15:32:07  <peter1138> ajmiles: It happens during blitting, so probably before the GPU in the GL blitter.
15:32:17  <peter1138> j_n: No.
15:32:49  <j_n> interesting
15:34:10  <ajmiles> https://cdn.discordapp.com/attachments/1008473233844097104/1210610561759576094/image.png?ex=65eb2ff1&is=65d8baf1&hm=7b5577897f7e567ac19776ff0b68790b88bbd737725afc265fe6b97d56659c60&
15:34:10  <ajmiles> The sum total of the shader that blits right now is there. I'm sure there's much more to be done - including how I handle alpha. Right now it's just "0 = gone, else opaque"
15:34:46  <peter1138> Alpha should be simple enough, it's just 0-255
15:34:55  <ajmiles> and it alpha blends onto the destination?
15:34:58  <peter1138> Yes.
15:35:15  <ajmiles> Is that the only blend mode? No additive blending anywhere?
15:36:18  <peter1138> There are some old-school bits that read from the framebuffer, apply an remap (or darking) and then put it back to the framebuffer.
15:36:34  <peter1138> But alpha is there, and is always there.
15:37:23  <peter1138> Sprites are never drawn opaque, alpha is always used.
15:37:46  <_glx_> I guess I won't be able to test on my system 🙂
15:37:57  <ajmiles> What is your system?
15:38:03  <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1210611538415722616/image.png?ex=65eb30da&is=65d8bbda&hm=c42ffb2dc5c21afc4750ca1816ad62972e53a686cd9a86900a65147af0144495&
15:38:07  <_glx_> GTS450
15:38:44  <peter1138> And I'm on Linux, so can't either.
15:38:46  <ajmiles> Fermi was right on that generation where NVIDIA just barely supported DX12
15:40:26  <ajmiles> Originally when I started it I assumed that I'd need to issue one draw call for all sprites and use the "bindless" feature of D3D12 (or Vulkan) to be able to have access to all the sprites at once. As I've got further along, and for the purposes of just getting it working correctly, right now every sprite is its own 2 triangle draw call. If the performance of that remains good enough, there's
15:40:26  <ajmiles> nothing about the method right now that would preclude it from working on any graphics API, GL and D3D11 included
15:40:44  <ajmiles> I think the "one draw call for everything" approach might be an optimisation, but not a necessary one
15:40:51  <_glx_> and the integrated ATI is worse (but supports DX12)
15:41:29  <peter1138> Brute forcing it.
15:41:53  <peter1138> For your next step, install some 32bpp content and try that 😉
15:42:08  <_glx_> zbase/abase ?
15:42:19  <peter1138> We have some pretty "fun" blending routines dealing with 32bpp and palette merging.
15:42:19  <_glx_> plus some 32bpp newgrfs
15:42:47  <ajmiles> I don't think I've found an RGB texture at all yet. I do have some NewGRF things installed, but nothing that exercises that you're describing I imagine
15:42:52  <peter1138> Okay "next step" might be a bit mean 🙂
15:43:02  <_glx_> https://bananas.openttd.org/package/newgrf?palette=32bpp
15:43:57  <ajmiles> https://cdn.discordapp.com/attachments/1008473233844097104/1210613022645821560/image.png?ex=65eb323c&is=65d8bd3c&hm=9fd7bd8c5030223bb6438a659596c7c94f98e1c69587e1680a20b708b1fc5c6e&
15:43:57  <ajmiles> This is all I run with right now
15:44:06  <_glx_> https://bananas.openttd.org/package/newgrf?palette=32bpp&hasHighRes=yes for 32bpp+EZ
15:44:50  <_glx_> (would be nice to have these filters in the GUI, but works required)
15:45:07  <peter1138> You can type "32bpp"
15:46:44  <peter1138> As you don't support 8bpp palette remapping yet, 32bpp palette remapping is a step beyond that.
15:47:33  <ajmiles> I'm a bit scared of the idea of having to read the frame buffer to blend. That sounds like a job beyond what the blending unit's blend modes will allow and might require a Rasterizer Ordered View
15:47:42  <_glx_> yeah 32bpp and CC mask
15:50:33  <peter1138> Just to scare you, there is a bit of code that reads the RGB pixel value from the framebuffer, converts from 32bpp to nearest palette 8bpp index, applies a palette remap on the 8bpp index, and then outputs a new RGB pixel.
15:51:01  <_glx_> there's also a shader for palette animation IIRC
15:51:16  <ajmiles> Yeah - something complex like that is going to require an ROV
15:51:40  <ajmiles> They were a feature of D3D11 at least
15:51:46  <peter1138> Oh the best bit about that feature is... only one graphics author has used it, and that was for something made nearly 20 years ago, when everything was 8bpp.
15:52:15  <peter1138> So it's probably not worrying about that particular thign 🙂
15:53:25  <peter1138> Hmm, I guess AI-issued commands get accounted for in the script's performance measurer.
15:54:01  <_glx_> the best part with opengl is when intel integrated GPU lies and randomely crashes 🙂
15:54:05  <peter1138> There are some other things which darken the framebuffer, but that's basically just alpha-blending black pixels.
15:55:19  <_glx_> peter1138: AI can't build while pause I think
15:55:32  <peter1138> No but I can.
15:55:42  <_glx_> GS can, because GS never pause
15:56:13  <_glx_> and GS can impersonate AI
15:56:30  <peter1138> That would still be accounted under the GS performance measurer.
15:56:40  <_glx_> yup
15:59:43  <peter1138> Yeah, I'm pretty sure player-issued commands are not accounted for in the performance measurer.
15:59:55  <peter1138> They are executed in the input loop.
16:00:14  <peter1138> So if cloning a vehicle takes 50ms, it's going going to show up.
16:26:30  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210623732050296882/image.png?ex=65eb3c36&is=65d8c736&hm=6e4b010f238cf383e684c1f6fcd02292af7700ebfb712081e61e942b9b849ae2&
16:26:30  <xarick> I was unable to get any more huge stalls
16:26:40  <xarick> this is the biggest I get now
16:27:49  <xarick> can I stop the test?
16:27:55  <xarick> v65 was just released
16:31:19  <xarick> I'm going to test with 10k opcodes 🙂
16:36:30  <peter1138> Hmm, company takeover seems to work actually.
16:39:00  <xarick> or should I stick to 250k opcodes? that's how I usually find these kind of buggers
16:41:35  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210627530412007464/image.png?ex=65eb3fbf&is=65d8cabf&hm=c67cf9876e1fa60fa464271eeab90caa333a915f84277404d106ca183fd68397&
16:41:35  <xarick> owww... _rei4122 just started a new game, they all crashed in ~2 months with the same kind of error
16:42:16  <peter1138> Ah, you can't buy a company if it would exceed max vehicle counts.
16:42:51  <_rei4122> I forgot to fix one thing
16:44:28  <_rei4122> I had only tested Infinite money. Crash when it wasn't.
16:57:45  <_rei4122> I have published the fixed version as v66 on Bananas
17:08:37  <andythenorth> Did anyone refactor my Horse name callbacks yet?
17:13:15  <_glx_> peter1138: ah there's a precheck, I only looked at ownership transfer which didn't check the limit
17:16:34  *** HerzogDeXtEr has joined #openttd
17:20:45  <DorpsGek> [OpenTTD/OpenTTD] Fefer-Ivan updated pull request #12163: Add: Basic autocompletion on tab for console commands https://github.com/OpenTTD/OpenTTD/pull/12163
17:21:11  <DorpsGek> [OpenTTD/OpenTTD] Fefer-Ivan updated pull request #12163: Add: Basic autocompletion on tab for console commands https://github.com/OpenTTD/OpenTTD/pull/12163
17:28:53  <DorpsGek> [OpenTTD/OpenTTD] Fefer-Ivan commented on pull request #12163: Add: Basic autocompletion on tab for console commands https://github.com/OpenTTD/OpenTTD/pull/12163#issuecomment-1961721004
17:34:41  *** gelignite has joined #openttd
17:35:01  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210640975035109496/image.png?ex=65eb4c45&is=65d8d745&hm=e362b22c1f2b316fd943193561bc414b6612e4bd5e6fe1b49a3d3be339ebaca5&
17:35:01  <xarick> I want more cores, more rams, more screens
17:52:25  *** kuhnovic has joined #openttd
17:52:25  <kuhnovic> MOAH POWAH!
17:58:32  <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #12163: Add: Basic autocompletion on tab for console commands https://github.com/OpenTTD/OpenTTD/pull/12163#issuecomment-1961761508
18:24:29  <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #12165: Change: Use bitmap for free unit ID generation. https://github.com/OpenTTD/OpenTTD/pull/12165
18:24:42  <peter1138> Okay, that performance comparison is lolulous.
18:25:05  <LordAro> :D
18:32:52  <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened issue #12166: [Crash]: When opening tram bus/lorry build window when NewGRF road stops are present https://github.com/OpenTTD/OpenTTD/issues/12166
18:35:37  <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/7135330819254f5317885c8f29161dfe5ad9dc3f
18:35:38  <DorpsGek>   - Update: Translations from eints (by translators)
18:44:27  <DorpsGek> [OpenTTD/OpenTTD] zephyris opened pull request #12167: Fix: Make link graph node borders scale with GUI https://github.com/OpenTTD/OpenTTD/pull/12167
18:50:47  <xarick> more performance, nice!
18:56:16  <_glx_> ah yes of course pleasing newgrf devs broke things 🙂
18:59:12  <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened pull request #12168: Fix #12166: Crash when opening tram road stop build window https://github.com/OpenTTD/OpenTTD/pull/12168
19:03:45  <peter1138> Trams? Who even uses trams!?
19:06:02  <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #12168: Fix #12166: Crash when opening tram road stop build window https://github.com/OpenTTD/OpenTTD/pull/12168#pullrequestreview-1898761986
19:08:00  <peter1138> Hmm, so after I restarted my playthrough of Eviternity II (due to updates making my savegame incompatible) it seems I have put it on a harder difficulty 😒
19:11:57  <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #12165: Change: Use bitmap for free unit ID generation. https://github.com/OpenTTD/OpenTTD/pull/12165#issuecomment-1961854256
19:17:48  <peter1138> I guess for most people this is unnoticable.
19:18:28  <LordAro> we don't have a "performance improvement" prefix really
19:28:09  <peter1138> Hmm, not sure about that random ReleaseID.
19:28:49  <peter1138> Ah, it is needed.
19:29:48  *** Wolf01 has joined #openttd
19:31:46  <peter1138> Hmm, "freeunits" is a bad name.
19:32:45  <peter1138> But I guess it matches the class name.
19:56:07  <pickpacket> I've asked this before but I've forgotten. I have a server running and want to send a message in the server chat automatically. How do I do that?
20:03:03  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler merged pull request #12168: Fix #12166: Crash when opening tram road stop build window https://github.com/OpenTTD/OpenTTD/pull/12168
20:03:06  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler closed issue #12166: [Crash]: When opening tram bus/lorry build window when NewGRF road stops are present https://github.com/OpenTTD/OpenTTD/issues/12166
20:03:39  <peter1138> Me here ruining the game.
20:03:41  <peter1138> Very plague.
20:05:27  <andythenorth> plagues
20:06:19  <peter1138> So that cargo icon 'test' in the purchase list that was obviously too much.
20:07:29  <peter1138> I haven't deleted it just yet...
20:09:16  <andythenorth> plague of plauges
20:09:31  <andythenorth> you'll ruin the plague itself next 😛
20:35:09  <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #12167: Fix: Make link graph node borders scale with GUI https://github.com/OpenTTD/OpenTTD/pull/12167#pullrequestreview-1898890092
21:04:57  *** ufo-piloot_ has joined #openttd
21:06:18  <DorpsGek> [OpenTTD/OpenTTD] Fefer-Ivan updated pull request #12163: Add: Basic autocompletion on tab for console commands https://github.com/OpenTTD/OpenTTD/pull/12163
21:07:10  *** ufo-piloot has quit IRC
21:20:33  <DorpsGek> [OpenTTD/OpenTTD] Fefer-Ivan updated pull request #12163: Add: Basic autocompletion on tab for console commands https://github.com/OpenTTD/OpenTTD/pull/12163
21:26:20  <DorpsGek> [OpenTTD/OpenTTD] zephyris updated pull request #12167: Fix: Make link graph node borders scale with GUI https://github.com/OpenTTD/OpenTTD/pull/12167
21:35:18  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1210701446518149170/image.png?ex=65eb8496&is=65d90f96&hm=afd5b131b231696bb0787d23f70fa5fcede6a07fdf50a24aea7d715d1b7c0478&
21:35:19  <peter1138> Such farm
21:43:23  <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1210703480185159700/image.png?ex=65eb867b&is=65d9117b&hm=0f65002814e70602e177341203e9b2a9c889b6060154726b99fdd2647538107b&
21:43:23  <peter1138> TTD window colours are so boring.
21:44:39  <j_n> hm, some of these tile graphics look ever so slightly different
21:44:50  <j_n> I thought the only TTD changes were UI and gameplay related
21:45:05  *** tabytac has joined #openttd
21:45:05  <tabytac> no openGFX had to be made
21:45:13  <j_n> I meant between TT and TTD
21:45:18  <tabytac> ahh
21:45:26  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210703995967111208/image.png?ex=65eb86f6&is=65d911f6&hm=11201c091dbe68baffb8b2c808ca5baebd9a3bed1ccfc166e91186c8ee4a0935&
21:45:26  <xarick> _rei4122: got a crash
21:46:09  <xarick> multiple crashes, all of them crashed in the same manner
21:46:15  <xarick> ~5 years into the game
21:47:38  <xarick> oh, version 67 already out, probably addresses this?
21:47:42  <xarick> gonna try
21:52:20  <andythenorth> peter1138: needs rgba
21:54:20  <peter1138> > In online games: Risk of players choosing colors almost identical to their opponents.
21:54:26  <peter1138> > Chaos of excess colors
21:57:39  <andythenorth> such risks
21:57:42  <andythenorth> give them icons
21:57:45  <andythenorth> oooo
21:57:52  <andythenorth> textured window backgrounds? 🙂
22:01:12  <peter1138> Skinnable with CSS?
22:02:32  <_zephyris> j_n: Grass, rough ground and rocks are the biggest changes - you can still see the TT grass on small airport, oil wells, possibly a couple of other things, in TTD.
22:02:59  <_zephyris> peter1138: The font is so weird...
22:03:43  <j_n> reminds me of RuneScape
22:04:14  <_zephyris> On a totally different topic, are blue and flashing red the only recolours for the tile selection outlines?
22:04:52  <peter1138> https://github.com/RuneStar/fonts> Seems different.
22:05:43  <peter1138> There are three, red, blue and animated red.
22:06:06  <_zephyris> Oh yeah, forgot red.
22:06:32  <peter1138> These are the 16-index palette remaps.
22:06:42  <andythenorth> oops, ran out of strings
22:06:45  <andythenorth> wonder why
22:06:59  <_zephyris> It'd be pretty trivial to add more recolour sprites to the ottd gui block to use, right? Seems like it'd be useful for things like that new infrastructure ownership highlight, town zone highlight, things like that.
22:07:13  <peter1138> Yeah.
22:08:08  <peter1138> Or you can totally redesign how recolours work and use a magical 32bpp LUT...
22:11:51  <peter1138> Nice, 10 savegame bumps since I last pushed RGB CC.
22:18:42  *** Flygon has quit IRC
22:32:36  <andythenorth> is storing to a temp register particularly slow or expensive?
22:32:54  *** kale91 has quit IRC
22:33:37  *** Wormnest has joined #openttd
22:37:03  <peter1138> Oops, bad variant access.
22:37:39  <andythenorth> Bad Access Feature
22:37:58  <_jgr_> andythenorth: No, it's not a problem
22:42:41  <andythenorth> thanks
22:43:11  <peter1138> Of course, storing to temp registers of vehicles is particularly pointless.
22:49:18  <andythenorth> text stack crap 😛
22:49:20  *** keikoz has quit IRC
23:03:12  <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11634: Feature: Custom company colours. https://github.com/OpenTTD/OpenTTD/pull/11634
23:03:18  <peter1138> 🤷
23:03:45  <peter1138> If you're happy and you know it
23:07:13  <_zephyris> `Extending Recolour Sprites to support both 8bpp and 32bpp values.`
23:07:56  <peter1138> Impossible.
23:08:04  <peter1138> Nobody wants that.
23:08:47  <peter1138> A plague of chaos.
23:09:39  <peter1138> And, no, it doesn't do 32bpp LUTs.
23:10:30  <_zephyris> A dangerous step in that direction 🙂
23:12:03  <andythenorth> building painter next?
23:12:05  <peter1138> Not really, it just maps palette index directly to RGB instead of to another palette index which maps to RGB.
23:12:14  <andythenorth> railtype palette chooser!
23:12:47  *** Wolf01 has quit IRC
23:19:37  <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #12169: Codechange: Use functions to access colour gradients and replace magic numbers. https://github.com/OpenTTD/OpenTTD/pull/12169
23:20:33  <peter1138> Hmm, if PC_BLACK is 1, what colour is 0? 😄
23:22:17  <_glx_> transparent ?
23:28:24  <peter1138> Well, I just deleted the wrong directory testing bootstrap, so, uh... I have no saves any more :p
23:30:35  <peter1138> Hmm, that deleted my MP3 version of sample.cat too. Balls.
23:32:55  <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12169: Codechange: Use functions to access colour gradients and replace magic numbers. https://github.com/OpenTTD/OpenTTD/pull/12169
23:33:33  <peter1138> Oh there was a red cross too. Hmm.
23:36:37  <xarick> AAAHogEx still crashes with same error on v67 😦
23:37:06  <peter1138> I no longer have my Xarick 4kx4k test save 😦
23:37:27  <peter1138> Might be in my downloads
23:40:34  <DorpsGek> [OpenTTD/OpenTTD] github-advanced-security[bot] commented on pull request #11634: Feature: Custom company colours. https://github.com/OpenTTD/OpenTTD/pull/11634#pullrequestreview-1899095311
23:41:42  <xarick> 4 issues
23:41:44  <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1210733264659292260/image.png?ex=65eba238&is=65d92d38&hm=7b5062c51331e3fa323fd9145b1b6dfb2af572f8f6b7b2ad7bd1f44e286fc385&
23:42:59  <xarick> 2nd has a PR
23:43:42  <xarick> 3rd is something I don't want to deal with,...
23:43:58  <xarick> 4th... Kuhnovic!
23:44:27  *** tokai has joined #openttd
23:44:27  *** ChanServ sets mode: +v tokai
23:44:47  <xarick> 1st is a meh issue, not too critical in my view
23:46:16  <peter1138> 5th: Your github is in light mode.
23:46:55  <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #12169: Codechange: Use functions to access colour gradients and replace magic numbers. https://github.com/OpenTTD/OpenTTD/pull/12169
23:48:52  <DorpsGek> [OpenTTD/OpenTTD] jcteotonio updated pull request #12108: Add: Portuguese Escudo currency https://github.com/OpenTTD/OpenTTD/pull/12108
23:49:44  <xarick> everytime i see #10156... my anger... rises !
23:49:52  <xarick> well, cyas good night, bed now
23:50:28  *** HerzogDeXtEr has quit IRC
23:51:06  *** tokai|noir has quit IRC
23:58:08  <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #12167: Fix: Make link graph node borders scale with GUI https://github.com/OpenTTD/OpenTTD/pull/12167#pullrequestreview-1899112199

Powered by YARRSTE version: svn-trunk