IRC logs for #openttd on OFTC at 2022-12-07
โด go to previous day
00:38:52 <petern> I wonder if it can make a good OpenTTD AI.
00:53:09 <TallTyler> petern: can you open an issue about the rivers and assign it to me? Iโm currently driving 1,700 miles across the country for a move but can work on it next week.
01:01:55 <glx[d]> I think there's already an issue (the one about graphics)
01:07:43 <glx[d]> TallTyler: I assigned you to that one, title says graphic bug but it's the same issue
01:09:09 <reldred> at the very least it probably needs to not generate coast tiles
01:15:01 *** Elouin8 has joined #openttd
01:20:25 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:20:54 *** Elouin has quit IRC (Ping timeout: 480 seconds)
01:20:54 *** Elouin8 is now known as Elouin
01:57:30 *** Wormnest has joined #openttd
02:09:50 <CplBurdenR3294> petern: Minecraft dodgy water physics when? ๐
02:37:43 *** Wormnest has quit IRC (Quit: Leaving)
03:57:13 *** _aD has quit IRC (Quit: leaving)
04:03:52 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:36:44 *** D-HUND is now known as debdog
07:32:10 *** sla_ro|master has joined #openttd
07:33:50 <iddi> petern: I suppose that if you make rivers get wider much slower, it won't be "weird" anymore
07:59:27 <petern> No that's not the reason
08:20:49 <andythenorth> imagine 1 million unique vehicles
08:20:56 <andythenorth> I'll need a better generator
08:21:42 <petern> Use an AI to munge them all
08:22:19 <andythenorth> I was thinking Dall-E for the sprites
08:22:24 <andythenorth> and GPT3 to manage the IDs
08:27:40 <petern> Remember when I did OpenGL? I loaded each sprite into a separate texture. Such lols
08:42:36 <petern> Nobody wants 3CC do they?
09:10:40 <andythenorth> what would we use it for though?
09:12:38 <andythenorth> I could add 3CC here ๐
09:18:18 <petern> There's only so many palette indices ๐
09:19:41 <petern> I forget I'm about 1km away from a railway line. Occasionally hear train horns, but infrequently enough to 'surprise' me.
09:27:15 <andythenorth> why was 3 company colours a thing?
09:27:25 <andythenorth> or something about wagon colours in groups?
09:39:09 <petern> Just somebody wanted it.
09:39:26 <petern> Probably before variants.
09:39:26 <andythenorth> I think it was those unused pinks that give the idea ๐
09:39:36 <andythenorth> we need the pinks for water anyway
09:39:45 <andythenorth> at least until someone thinks of magic
09:40:02 <andythenorth> we know the slope of each tile? ๐
09:40:20 <petern> Well you can layer sprites I believe.
09:40:39 <andythenorth> 32bpp sprites with alpha
09:41:29 <petern> Have a second part that overlays the first with a different 2CC map. "4CC for free"
09:42:05 <andythenorth> how about colour blending?
09:42:27 <andythenorth> might be exciting
09:42:44 <andythenorth> I've forgotten what a brightness map is called in CGI
09:43:07 <andythenorth> there used to be 3 layers: the texture(s), the bump map, and the brightness map
09:43:09 <petern> UV is mapping texture coordinates.
09:43:38 <andythenorth> I haven't touched CGI since about 2002
09:43:40 <petern> bump mapping is just a texture on top.
09:43:55 <EmperorJake> 3cc would be nice but the entire 2cc set would need to be redrawn ๐
09:43:57 <petern> And normals are where all the lighting happens.
09:44:20 <andythenorth> in 2002, there was a lot more emphasis on e.g. fake lighting etc
09:44:26 <andythenorth> pre-creating shadow effects etc
09:44:38 <andythenorth> to keep polys low and render times plausible
09:44:44 <petern> Yes but you do that by baking it into the texture.
09:45:00 <andythenorth> yeah so the tools I used had a specific texture designer tool
09:45:10 <andythenorth> where you stacked up textures and shadow maps
09:45:20 <andythenorth> so you could have a texture of brick with a window
09:45:26 <andythenorth> and then make the window lit or not
09:45:40 <andythenorth> instead of modelling a window properly ๐
09:47:15 <petern> 4096 mostly unused palette remaps is fine right?
09:47:39 <andythenorth> the generated ones?
09:47:45 <andythenorth> oh probably fine
09:48:10 <andythenorth> our Acorn A3000 had 2MB
09:48:24 <andythenorth> people probably have more RAM these days?
09:50:08 <petern> RGB CC generated remaps as needed, so that's also possible, although it the spritecache injection would need to be fixed.
09:51:34 <petern> There's also a bit in RGB CC that creates a reverse map, but I can't remember what it's for.
09:51:45 <petern> Where 1st and 2nd CCs are swapped.
09:52:31 <andythenorth> is it for swapping 1 CC and 2 CC?
09:58:24 <petern> Ah the code detects when callback 2D is used to reverse the colour scheme.
10:00:16 <petern> Fun, so the NewGRF can use var 43 to get the chosen colour, and then reverse it.
10:00:29 <petern> I'm not sure why I handled this case.
10:01:25 <petern> If the 2 colours match the underlying non-RGB colours, then RGB CC will substitute with the RGB map, either normal or reversed.
11:42:23 *** WormnestAndroid has quit IRC (Remote host closed the connection)
11:46:47 <Samu> something changed related to rivers that is now doing weird results on it
11:48:07 <LordAro> Samu: possibly related to #10218 ?
11:51:01 <Samu> i saw those graphical issues too
11:51:35 <petern> Those are not graphical issues ๐
11:52:14 <Samu> but my problem is the debug version of #8492 is now marking some more tiles than intended, and they're all near the wide rivers
11:52:30 <Samu> so now I'm investigating
12:07:03 <Samu> need to see how rivers are now created
12:07:29 <Samu> the debug is marking those tiles that get flooded with a "c", meaning it's flooding MP_CLEAR tiles
12:07:46 <Samu> I have no detection against that
12:16:41 <petern> I'm not sure what your focus is on in that changeset.
12:17:56 <petern> Seems to be you check if a tile can possibly flood and prevent the command from executing if so.
12:18:46 <petern> Isn't it more logical to check if terraform will actually flood, and then not terraform if so? I suppose there's a cascade effect with terraforming that might be tricky
12:24:16 <Samu> what was the PR that made rivers wide, need to see something there
12:27:11 <TallTyler> Just search Wide Rivers ๐
12:27:19 <TallTyler> Thatโs what itโs called
12:28:13 <TallTyler> It was originally a JGRPP feature that I upstreamed but I added a bunch of slope terraforming. It needs a bit more to fix the current wide rivers issue, which Iโll add next week
12:29:45 <TallTyler> It just traverses the river path after making the river, and as it goes along makes it wider up to a radius of 3 tiles
12:30:44 <Samu> i think it needs more instances of RunTileLoop()
12:31:00 <Samu> or just water them instantly, i think there's a command for that
12:43:25 <TallTyler> It waters them instantly IIRC
12:43:52 <TallTyler> If youโre seeing extra ocean flooding calls it might be from the terraforming
12:44:20 <TallTyler> I donโt know exactly what your PR does ๐
12:44:48 <TallTyler> And Iโm driving across Kansas and Missouri today with no cell service so I wonโt be consistently able to respond to anything
12:45:34 <TallTyler> (Well, my partner is driving, I donโt Discord and Drive)
12:56:08 <petern> Hmm, in my Explorer windows files are grouped by date, even when sorting by name.
12:56:22 <petern> I know I turned that on for someone a long time ago, so I can't remember how to turn it off ๐ฆ
12:56:39 <petern> Thanks, writing that helped, I found it ๐
13:05:05 <Pruple> that's funny.... if a vehicle's only order is a "service at", it will drive around with a blank info bar ๐
13:06:46 <Pruple> I suppose technically it doesn't have "no orders", it just doesn't have a current one. ๐
14:07:49 <petern> Maybe it increases ground density.
14:09:44 <Samu> i see it was to get desert land on grass, due to rivers in the proximity
14:10:57 <Samu> get grass on desert land
14:15:52 <Samu> i wonder if it's really required?
14:16:00 <Samu> seems that code can be deleted
14:19:17 <Samu> okay, it is required for something, there are differences
14:25:13 <petern> You know an article is old when it contains "benchmark consisting of 1 million lines on standard Pentium III machines."
15:11:16 *** WormnestAndroid has joined #openttd
15:19:14 <petern> Every single variable I try to look at is optimized away ๐ฆ
15:28:56 *** sla_ro|master has quit IRC ()
15:29:05 <glx[d]> Strange, after the assert it should show the crash window
15:42:14 *** supermop_toil has joined #openttd
16:41:20 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
16:44:33 *** HerzogDeXtEr has joined #openttd
17:14:27 <andythenorth> hurrah I didn't have to file that
17:14:38 <andythenorth> now I can just link the issue every time I complain
17:34:39 <TallTyler> Thatโs up to you, I think ๐ค
17:35:04 <Samu> i detected an Object tile being flooded somehow
17:35:05 <TallTyler> Iโd love to see it though ๐
17:35:26 <Samu> and now i can't reproduce it, :( should have saved generation seed
17:37:24 <Samu> btw i find many tunnels to the sea
17:43:05 <Samu> i have a question, is it possible to place a tower object or lighthouse on tile height 0? it's the only way I can see it being flooded
17:48:06 <LordAro> if not those, then some newgrf object
17:51:25 <Samu> just tested using scenario editor, i placed lighthouses and transmiters on clear land height 0, then the sea came and flooded it
17:51:45 <Samu> so yes, it happened, i wasn't hallucinating
17:51:47 <petern> Answered your own question ๐
17:53:14 <Samu> trying to make it happen again, i've been through 25 newgames
17:56:11 <Samu> it's very rare it seems! it needs a river to be widened, using terraform command, leaving bareland tiles that don't get watered during the tileloop in CreateRivers, and then an object is placed there, before the final tileloop happens
18:09:54 <petern> Hmm, I guess docks are more useful than rgb cc
18:12:14 <andythenorth> what is more fun though? ๐
18:13:09 *** sla_ro|master has joined #openttd
18:55:14 <petern> You can do that anyway
19:06:16 <supermop_toil> no i mean adjust the face with rgb sliders
19:06:40 <supermop_toil> what if i want 16 different shades of purple ceo
19:10:04 <Eddi|zuHause> you mean like skin colour, eye colour, earring colour?
19:12:06 *** Wormnest has joined #openttd
19:32:20 <petern> Why is nearly bed time already.
19:36:00 <Eddi|zuHause> it's always bedtime somewhere
19:48:46 <supermop_toil> Eddi|zuHause: suit color, tie color
19:49:37 <supermop_toil> oddly the sprites i spent the most work on in my Hale base set I think never got noticed...
20:02:01 <petern> Well, docks does not compile. Hmm.
20:14:54 <supermop_toil> no one seemed to ever find the aloha shirts
20:27:09 <reldred> supermop_toil: Oh I did, I love those
20:58:03 <Samu> chronological order: the tile was flattened to accomodate for a sloped river in front, leaving bareland. the tile wasn't flooded in time and town growth algorithm placed a road there. In the end, the road is flooded
20:58:19 <Samu> my code doesn't detect that
21:00:41 <Samu> an ez fix is to insta-water right after wide rivers doing terraforming, with ConvertGroundTilesIntoWaterTiles()
21:01:21 <Samu> a more localized fix is to fix wide rivers so they don't leave bareland behind
21:06:22 <Samu> a harder fix is me trying to figure out how to detect that so i can fix it on my side of the code
21:06:58 <TallTyler> The first sounds cleaner assuming Iโm understanding the code correctly on my phone
21:07:44 <TallTyler> Samu: Does this run on the entire map?
21:08:03 <TallTyler> And is called from the main genworld function?
21:08:54 <petern> So anyone notice/care that some NewGRF data is in memory twice?
21:08:58 <Samu> my fixes are called from town growth algorithm
21:09:20 <Samu> happens after rivers are generated
21:09:54 <petern> Samu: This actually looks more like the bug caused by wide rivers, not really a bug in your stuff.
21:10:02 <TallTyler> Right, could you just call that conversion function between generating rivers and generating towns?
21:10:43 <TallTyler> The wide rivers bug as I understand is insufficient checks for if rivers should flow down a slope
21:10:57 <TallTyler> Based on whatโs at the bottom of said slope
21:11:53 <glx[d]> yeah based on the picture I'd say it's the same bug as #10218
21:12:23 <petern> andythenorth: goes it rewrite docks?
21:13:47 <TallTyler> The fix for wide rivers will be more terraforming to flatten those slope tiles when they shouldnโt flow downwards yet
21:14:04 <TallTyler> (Flatten by raising two corners)
21:15:17 <glx[d]> I think you don't need to try to handle that in #8492 samu, as it's really something that should be prevented even without your PR
21:17:30 <TallTyler> If anything my river fix will terraform land the other way - I believe the tile in question that samu found originally had one corner raised, which was lowered for the river slope on the tile to its northwest. With my change, it will end up with two corners raised so that the tile to its northwest is a flat river tile.
21:20:01 <TallTyler> Because we donโt have river tiles at sea level, my fix wonโt result in any more tiles be lowered to flat sea level, although itโs possible that existing terraforming may still cause this if it happens to a tile adjacent to where the river should flow downhill
21:26:29 <Samu> TallTyler> Right, could you just call that conversion function between generating rivers and generating towns?
21:27:01 <Samu> i tried it after all rivers are generated, before the tileloop in CreateRivers
21:27:34 <Samu> but it iterates the whole map
21:28:15 <petern> Samu, don't bother trying to fix anything until #10218 is fixed.
21:28:24 <petern> Or at least, not that particular issue ๐
21:28:53 <petern> Ah yes, of course, Gnome 3 does not run over xrdp in Debian ๐ฆ
21:30:46 <supermop_toil> i always kinda wished river at level 0 = shallow water (beach/tidal flat etc)
21:32:59 <Samu> I questioned the tileloop's purpose at CreateRivers, turns out it's for setting grass density after switching from desert to grass. Somehow it requires a loop to run, otherwise it would still be detect as desert.
21:33:24 <Samu> it wasn't meant for flooding tiles after all
21:34:03 <Samu> but now, it kinda is, and does an incomplete job at it
21:34:50 <Samu> ConvertGroundTilesIntoWaterTiles() does it better
21:35:01 <petern> Are you even understanding?
21:37:50 <Samu> not sure I understand the fixes TallTyler is coming up with would solve leaving bareland behind that is flooded after.
21:39:32 <Samu> im gonna just submit the suggested changes posted in the pr
21:39:57 <Samu> and then wait for wide rivers fixes
21:40:33 <petern> TallTyler: It's a bit like being Zorged.
21:49:13 <TallTyler> I actually think my changes wonโt solve it entirely, although they would make it even more rare than it already is
21:50:08 <andythenorth> petern: :gui_boats:
22:39:13 <Pruple> moon river, wider than a tile...
23:05:34 *** Samu has quit IRC (Quit: Leaving)
23:34:21 *** sla_ro|master has quit IRC ()
23:38:58 <petern> Urgh, C++ initializers ๐ฆ
23:42:30 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:49:14 <petern> Unhandled exception at 0x00007FFD24F61400 (vcruntime140.dll) in openttd.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
23:52:30 *** nielsm has quit IRC (Ping timeout: 480 seconds)
23:57:36 <TallTyler> Chunky docks are that low-level?
continue to next day โต