Minetest logo

IRC log for #minetest-dev, 2023-03-29

| Channels | #minetest-dev index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:35 Guest54 joined #minetest-dev
00:36 kilbith__ joined #minetest-dev
00:50 tekakutli joined #minetest-dev
00:52 ShadowBot joined #minetest-dev
01:55 tekakutli joined #minetest-dev
03:09 tekakutli joined #minetest-dev
04:00 MTDiscord joined #minetest-dev
04:58 calcul0n joined #minetest-dev
06:07 tekakutli joined #minetest-dev
07:35 Desour joined #minetest-dev
07:35 numzero joined #minetest-dev
08:00 appguru joined #minetest-dev
08:17 proller joined #minetest-dev
08:20 hmmmmm joined #minetest-dev
08:20 appguru joined #minetest-dev
08:25 appguru joined #minetest-dev
09:06 celeron55 i'm pretty sure they do. and yes, nice hack, that could solve more problems than it creates
09:33 appguru joined #minetest-dev
10:58 appguru joined #minetest-dev
11:22 appguru1 joined #minetest-dev
11:29 appguru joined #minetest-dev
11:34 appguru1 joined #minetest-dev
12:15 kilbith joined #minetest-dev
12:22 calcul0n joined #minetest-dev
13:51 kilbith joined #minetest-dev
14:10 qur joined #minetest-dev
14:17 proller joined #minetest-dev
14:30 Desour joined #minetest-dev
15:21 jonadab joined #minetest-dev
16:04 MTDiscord1 joined #minetest-dev
16:11 MTDiscord2 joined #minetest-dev
17:31 tekakutli joined #minetest-dev
18:29 tekakutli joined #minetest-dev
18:31 numzero joined #minetest-dev
18:36 kilbith joined #minetest-dev
18:45 Desour joined #minetest-dev
19:29 cafblx joined #minetest-dev
19:36 cafblx I know some of you aren't on Discord, and I'm having issues with reading map blocks, so I'm cross-posting here: https://dpaste.com/8HWRDZ3NA
20:12 BuckarooBanzai cafblx: i have an implementation in `go` if that helps: https://github.com/minetest-go/mapparser/blob/master/parse.go (used in various other projects)
20:19 calcul0n joined #minetest-dev
20:26 sfan5 cafblx: and here's one in python https://gist.github.com/sfan5/52917a0e1338bcda2176edbc416dae60
20:54 numzero joined #minetest-dev
21:04 sfan5 can we get reviews on #13200
21:04 ShadowBot https://github.com/minetest/minetest/issues/13200 -- Fix missing particlespawner values by velartrill
21:04 sfan5 maybe I should set up a macro for this
21:07 sfan5 merging #13356, #13330 in 10m
21:07 ShadowBot https://github.com/minetest/minetest/issues/13356 -- Bump protocol version by sfan5
21:07 ShadowBot https://github.com/minetest/minetest/issues/13330 -- Update credits for 5.7.0 by sfan5
21:14 Guest54 joined #minetest-dev
21:18 Guest54 celeron55 the waterlogged drawtype hack does not work perfectly right now though, i can't get the corners to align perfectly if param2 is not updated with regards to the surrounding liquid. i am still thinking about how to best handle this – ideally, i'd want it to work for every fluid without having a separate node definition e.g. for water and
21:18 Guest54 river water and lava “waterlogging”.
21:29 Guest54 celeron55 i'll experiment a bit with the approach, but if you have any ideas regarding it, please tell. so far i got a few that i have not yet done, but might: 1. steal the special tiles and maybe other things from the highest level surrounding liquid (or something like that). 2. somehow propagate water flow through waterlogged nodes somehow. 3.
21:29 Guest54 figure out the complete state machine for a hypothetical 5-state automaton rule with air, flowing liquid, source liquid, waterlogged flowing liquid, waterlogged flowing source. 4. make sure a param2 waterlogged nodebox or rails node copies the param2 from placement in a liquid automatically (no reflow necessary after placement).
21:34 Desour Guest54: afaik, your hacky thing did just use the liquid corner heights of the neighbors when rendering, right? (it's probably quite ugly watching how liquid then flows down on a node and immediately jumps into the node below)
21:37 Desour iirc, liquid param2 just stores the liquid height. so, using the few remaining bits of some paramtype2s might work. i.e. you have 1/16th nodes instead of 1/256th nodes
21:38 Guest54 Desour i basically just render the liquid stuff into a node if f->param_type_2 == CPT2_WATERLOGGED
21:39 Desour oh, so you the information from the last node? eww
21:40 Guest54 and no, it does not look ugly actually, as you can see from the picture. what i have done in the picture is fiddled with param2 of the waterlogged nodes manually (basically that adjusts the height of the water level)
21:40 Guest54 well, i can show you how primitive it is, wait
21:41 Guest54 i really was just playing around
21:41 Guest54 and it is horrible i know
21:41 Guest54 i am not using the correct values
21:41 Desour what I described as ugly was the liquid flowing into it, a picture can't show this
21:42 Guest54 Desour ignore the blatant cheating please ;) https://mister-muffin.de/p/W88j.diff
21:43 Guest54 you see it was only a quick idea i had that i sketched in like 20 min or so yesterday, on a train
21:43 Desour ehem, checkPrivilege 👀
21:45 Guest54 well i'm only using that it on anarchy servers obv (also, a more practical reason is i hate to input “/grantme all” in every fresh singleplayer world)
21:47 Desour there's a setting for default privs
21:47 Guest54 oh
21:47 Guest54 anyways, you can see the waterlogging hack is very primitive, but if you play around with it, you might agree that probably the only thing needed to make it look good at this level of complexity is to actually update the level of the waterlogged nodes properly and have it propagate to surrounding liquid
21:48 Desour (I'm seeing now that you're not reusing the liquid stuff from the last node (as I earlier thought), but hard-coded it for the waterlogged node)
21:48 Guest54 i'd like to claim i'm not that dumb, but once during testing i filled my devtest world with self-replicating waterlogged source nodes, so i doubt you'd buy such a claim :P
21:49 Desour it wouldn't be dumb, just more hacky
21:50 Guest54 anyways, as with a lot of other things i'd might to reiterate that there is an easy and obviously wrong way to develop this thing further and it results in having to define a waterlogged node for each fluid type
21:50 Guest54 like to
21:50 Guest54 (i sleepy)
21:50 Guest54 have you dealt with fluid flow in the past desour?
21:50 Desour no
21:54 Desour hm, the liquid types could be stored in a sparse mapping, for example a unique_ptr<array<unique_ptr<array<content_t, 8>>, 16*16>>
21:55 Guest54 uh what
21:55 Guest54 why
21:56 Desour aka content_t (*(*)[16*16])[16] (outer parens might be wrong)
21:56 Desour for less mem usage
21:56 Desour or how would you map to the liquid type?
21:58 Guest54 btw, i actually wanted to auto-update the levels in the waterlogged nodes from adjacent fluids in my hack properly and do some more stuff, but two things made me not do that, first “dear passengers, in a few minutes we'll be reaching [redacted] main station” and second because i got frustrated with how minetest rebuilds a lot of stuff when you
21:58 Guest54 even change the timestamp on nodedef.h
21:59 Guest54 or when you switch branches in git
22:00 Guest54 Desour i don't understand why you are talkign about liquid type mapping at all
22:00 Desour use ccache, then such recompiles are fast
22:01 Desour because having a separate nodedef for each pair in waterlog-nodes x liquids would be meh
22:06 Guest54 look, i have investigated build issues in the past and i know how to do do fast and reliable incremental rebuilds of minetest fast (use a recursive top down build system that checks file hashes when timestamps mismatch instead of the make-style toposort timestamp mess). i just did not have the necessary files with me.
22:07 Guest54 back to liquids, why do you think about this in terms of nodedefs at all?
22:07 Guest54 i mean, i just want a stateless rendering hack that gets turned on by paramtype2 = waterlogged
22:08 Guest54 everything relevant – liquid type, liquid level, special tiles etc. pp. should ideally be inferred from the surroundings
22:08 Guest54 so you can just plop rails in swamp water or river water or lava and have them do the thing
22:09 MTDiscord <x2048> Merging #13352 now
22:09 ShadowBot https://github.com/minetest/minetest/issues/13352 -- Return 'loops' occlusion culler under a setting by x2048
22:10 Guest54 Desour i definitely don't want the waterlogged node to “decide” anything besides it's param2 (which should be updated from surroundings). i am thinking about this from the POV of “how can i make it so that any idiot could use it”.
22:10 Desour >everything relevant [...] should ideally be inferred from the surroundings   <- and how do you want to do this fast and reliably?
22:11 Guest54 and my answer to it is that “any idiot” probably would only want to change the param2 type to waterlogged and be done with it
22:11 Guest54 like make a chest or rails waterlogged and it should ”just work”
22:12 MTDiscord <x2048> ...merged
22:12 Guest54 Desour what's slow about treating waterlogged as adjacent liquid from the POV of any liquid and stealing special tiles from adjacent nodedefs (e.g. the liquid node right above a node)
22:13 Desour the problem comes if you want to flow through more than one node
22:14 Desour (if you don't want flow-through, you don't even need a param2 value)
22:15 Guest54 oh, so the issue is that because you need to figure out where the fluid comes from you actually want the waterlogged node to adopt a fluid type
22:16 Desour yes
22:16 Guest54 Desour so i would guess you might be a bit unhappy with my “every liquid treats waterlogged node as the same liquid for purposes of liquid level updates” idea as it is on a level of HAHA STUPID
22:18 epoch would it work to have liquids treat water-loggable blocks as air for purposes of liquid movement?
22:19 epoch might be interesting to have waterlogged sand and gravel
22:19 Guest54 no that would not work, because the liquid replaces air
22:20 Desour there aren't just liquid updates, but also draw. and liquid can maybe flow out of waterlogged nodes. so treating all liquids in waterlogged nodes the same wouldn't be perfect
22:20 Guest54 Desour obviously i need to figure out some smoke and mirrors so not more state is necessary
22:20 Guest54 epoch waterlogged sand and gravel would be just … sand and gravel? i don't get it
22:21 Guest54 i mean the main thing i wanted to have is rails leading into the sea and fences underwater not making these ugly air pockets
22:21 epoch it is like the difference between hoe'd dirt and waterlogged hoe'd dirt
22:21 epoch visually they'd be the same, but they'd leak water through I guess
22:21 Guest54 the way i have implemented it you can even have waterlogged water hehe
22:21 Desour water++
22:23 epoch probably wouldn't want water logged stairs to leak water from all sides, just the sides with holes. >_>
22:23 Guest54 2 wet 2 flowy
22:24 Guest54 oh yeah that was the one point i did not bring up so far i want a solution that shuts up everyone who worries about waterlogged stairs
22:24 Guest54 i thought it just seemed petty to mention it, but the waterlogged stairs thing comes up every time and i'm tired of it.
22:25 epoch this is more worry than I want atm, so do whatever
22:25 Guest54 nah, i am fishing for ideas
22:25 Guest54 i mean you could feasibly figure out if the entire side of a nodebox is blocked, but it would complicate things beyond “solution fits in head”
22:34 Guest54 just in case i might have missed it, did anything happen in the “let's make obby glass invisible and break optionally framed glasslikes in various ways for non-16×16 texture packs“ saga? haven't seen anything and i just want to know if the issue is disregarded or not and if it is disregarded what the reason is. (in before: “glass textures
22:34 Guest54 that do not have at least 1/16 of frame were never guaranteed to work, it's the fault of people making 7×7 or 512×512 texture packs lol”.)
22:34 Guest54 Desour if not through a param2, how would you handle the non-flow-through visual-only hack?
22:35 Guest54 Desour i thought using a param2 kinda makes it possible to add some neat stuff later
22:35 Guest54 i am of sleep. good night everyone!
22:35 epoch g'night
22:36 Guest54 Desour and if you come up with some interesting variation on my thing, show and tell pls.
22:40 Desour if you have no flow-through, you can just take the neighboring param2 and use the param2 that would be at the waterlogged pos if the liquid had already flown into it (i.e. just subtract something from the neighbor with max param2)
22:41 Guest54 well, it looks pretty ugly tbh
22:42 Guest54 because then every liquid ends in the waterlogged node
22:42 Desour if there are different liquid types, just don't flow in
22:42 Guest54 e.g. stacking fences underwater makes useless extra water-flows-into-this-thing faces
22:42 Guest54 unless i am mistaken
22:43 Desour if you have water above, you don't draw the top face
22:44 Guest54 well, if you have water above a waterlogged nodebox and no flow-through, then a waterlogged nodebox below will only be flown into from the sides
22:44 Desour for stacking fences you could maybe check the node above the liquid neighbor
22:47 Guest54 just save liquid type in node meta, problem solved hahahaha
22:47 Guest54 (it does not work, don't do it)
22:48 Guest54 Desour could you point me to a document that explains the sparse map trick you were alluding to?
22:49 Desour there is no document
22:49 Desour it was just an idea
22:49 Guest54 well, as far as i see it you only need to save one value for liquid type per waterlogged node, so where does the sparse anything come in? is it because not everything is waterlogged usually?
22:50 Desour it's for flowing more than one node far, and flowing out of waterlogged
22:50 Guest54 so what would be stored in the map
22:51 Desour it's one value per node, but not one value for every node in the block, hence sparse
22:51 Desour content_ts
22:53 Guest54 ok i see where you want to go with this i think, but i am somewhat sceptical of if it is worth it at all. like what is the worst that could happen with the “treat waterlogged as adjacent liquid of the same type and just update from there” trick? having a bunch of waterlogged nodes where water flows in and lava flows out?
22:55 Desour do you now want to make flow?
22:56 Guest54 probably not until i have a proper model of it
22:57 Guest54 which is why i am asking what's the worst that you can imagine
22:57 Desour when making the mapblock mesh, you need to find out the node where it came from
22:58 Desour s/it/the liquid/
22:58 Guest54 yeah but obviously that might not be solvable for the general case, even without flow-through
22:58 Guest54 consider the case W - N - L, where W is water source, N is waterlogged nodebox, L is lava source
22:59 Guest54 where does the liquid come from eh?
22:59 Desour I'd not draw any liquid in that case
22:59 Desour or just choose one based on a hash of the nodepos
23:00 Guest54 in any case, i just wanted to point out that these kind of problems occur without flow-through
23:01 Guest54 and i am really not sure what to do in this case anyway lol
23:01 lhofhansl joined #minetest-dev
23:02 lhofhansl I think #13352 wasn't quite done when it got merged. I left two comments.
23:02 ShadowBot https://github.com/minetest/minetest/issues/13352 -- Return 'loops' occlusion culler under a setting by x2048
23:02 Desour with flow-through you have harder issues. if one node is somewhere inside a big cube filled with waterlogged nodes, how do you find the liquid?
23:03 Desour and note that such a cube can be multiple mapblocks large
23:04 Desour the meshmaker doesn't have any nodedata out of the mesh chunk
23:06 Guest54 increasingly makes it seem like flow-through might not be worth it hehe
23:08 Guest54 i mean maybe just like just let mods deal with it like they deal with the stuff where water nodes randomly tp themselves through sand and gravel or so
23:10 Guest54 or maybe just handle flow-through “properly” for the ”from above” case, as then you have no conflicts regarding which liquid it could be? anyway, nighty nighty
23:25 proller joined #minetest-dev
23:25 kilbith joined #minetest-dev
23:44 Thresher joined #minetest-dev
23:45 Thresher how do i force an area around an entity to stay loaded?
23:45 Thresher im having a problem where an entity despawns when its too far away from somebody
23:46 Thresher ive tried using `minetest.load_area` in a 20-block radius around it
23:46 Thresher i also tried `emerge_area` with the same radius
23:46 Thresher but no luck

| Channels | #minetest-dev index | Today | | Google Search | Plaintext