Time Nick Message 00:04 paramat hey hmmmm ive looked at your paste of generateBiomeColumn and there are some errors, also last night's discussion uncovered some errors in my original code, so because i wrote the original code and understand it please could i work on this? i would like to first correct my original code, then study and edit your generateBiomeColumn function to be logically identical 00:06 paramat is (u32)-1 just a huge number? 00:11 paramat essentially i feel the task of moving generatebiomes to biomemanager needs to be postponed, i need about a week to sort this out 00:23 hmmmm what errors? 00:24 hmmmm i went through it to make sure that it's logically correct, and i also corrected a couple places where you checked for non-air when in fact you meant to check for solid 00:24 hmmmm thanks for looking at it though 00:30 paramat okay i'll explain the errors.. 00:33 paramat need_biome_recalc is set to true so biome is always calculated at the top of every column. half of a world's chunks have air at column top so there is unnecessary calculation of biome 6400 times per chunk for a half of a world's chunks 00:35 paramat my code only calculates biome if stone or water is detected 00:37 hmmmm that's easily fixable 00:37 hmmmm i was expecting some kind of deep, logic error that I missed out on 00:37 hmmmm you scared me for a bit 00:37 paramat heh 00:38 hmmmm hmmm 00:38 paramat line 13 checks for stone at the base of the chunk above, if the chunk above is already generated the overtop node could be anything, not just stone 00:38 hmmmm for the next-gen biomes, I'm planning on making getBiome only consider heat and humidity so it'd be able to read from a precomputed table 00:39 hmmmm this would make getBiome calls computationaly cheap 00:39 hmmmm for what it's worth 00:39 hmmmm hrm you raise a good point, I didn't think about that 00:39 hmmmm no wonder why you made it check explicitly for water or air 00:40 hmmmm anything else? so far 00:40 paramat yeah.. 00:41 paramat i'm not sure about the logic for triggering recalc of biome, dependant on nplaced != 0 00:41 hmmmm if nplaced is already 0, then that means it hasn't encountered stone yet 00:42 paramat recalculation should only be triggered when there is stone or water below an air node, then that biome is in effect for all nods below until air is placed again 00:43 paramat water below air needs to trigger recalc 00:44 paramat ..then that biome tajes care of the seabed below 00:45 paramat i admit im still trying to get my head around your logic 00:45 paramat i like some of the tricks you've used to reduce redundancy 00:46 hmmmm hrmmm 00:46 hmmmm wait why does water below air need to retrigger 00:46 hmmmm i didn't think of that tbh 00:46 hmmmm i tried to make my logic super simple and understandable 00:46 paramat becaus there's now biome secific water, whereas originally there was only dust-on-water 00:47 paramat (specific) 00:48 paramat so water counts as a new upper surface that triggers recalc 00:48 paramat before it was the seabed that did that 00:49 paramat the biome calculated at water surface then includes the seabed below, so after calculation at sea level no more calculation is needed 00:50 paramat so, next-gen biomes won't consider altitude? 00:51 paramat anyway, back on topic, it may be worth adding in checks for river water as this is now added as the 4th base terrain node 00:52 paramat and will be used in v8 and my own new core mapgen i'm struggling with 00:55 paramat but that could be added later or river mapgens could have their own genbiiomes function 00:55 paramat (struggling with highland pools, very difficult) 01:00 paramat anyway, lets not worry about river mapgens for now, their genbiomes function needs to be quite specialized so perhaps best as a separate function 01:01 paramat in your code i think 'depth filler' should be called 'base filler' to not confuse it with biome->depth_filler which is different 01:03 paramat finally, why nplaced = (u32)-1 is that a huge unsigned number? 01:16 paramat i just realised i was wrong to say water should set have_air to false, that is needed to prepare for the seabed. my mistake is that have_air then triggers biome recalc for every water node 01:17 paramat so don't base your function on my code, it has errors. i think we need a new 'air_above' flag 01:17 paramat i need a few days to understand your code, and fix my own, and since we both seem a little confused =) 01:24 paramat biome calculation should be triggered 'if (c != CONTENT_AIR && (y == node_max.Y || air_above)) .. i think 01:24 paramat anyway i'll work on fixing my current code.. 02:13 hmmmm oh right 02:13 hmmmm alright, three things to adjust 02:14 hmmmm the last one makes the code uglier :/ 02:34 hmmmm paramat, if you read this: (u32)-1 is because we need an nplaced that is guaranteed higher than any possible max filler depth so that it'd go right to placing stone and not top/filler nodes 02:35 hmmmm i'd set it equal to the max filler depth, but in that scenario we don't know what that would be since a biome has not been calculated yet 02:52 paramat thanks, this is what i have so far https://github.com/paramat/minetest/blob/feca5e6c0c048f2fbb9c72b9260d8597c7ebabd4/src/mapgen_v7.cpp#L592 02:53 paramat still needs testing though, and i'll add that (u32)-1 02:53 paramat bbl 03:03 hmmmm I think I might be able to do this without any added booleans still 03:05 hmmmm is 128 the maximum base_filler? 03:06 hmmmm also i wanted to ask you about stone_type 03:07 hmmmm i realize that taking the X+, Z+ corner biome stone type seems to work sufficiently, but what is the absolute correct way of calculating this? 04:05 * paramat reads 04:06 paramat base filler of 128 needs changing to (u32)-1, i just chose a big number 04:09 paramat currently stone type is set to stone by default (for deep underground), then during any calculation of biome if any biome containing desert stone or sandstone is chosen at any point stone type gets changed 04:09 paramat also the default of stone means empty chunks get cobble dungeons 04:11 paramat so sonce it's per-chunk often there will be temples or sandstone dungeons up to 80 nodes away from deserts or sandstone biomes 04:11 paramat perhaps ideally it would be calculated for chunk centre 04:13 paramat so my head cleared. i realised the problem with to your code was the logic controlling the triggering of biome recalculation. it must be independant of nplaced because consider a series of underwater ledges: nplaced will go through several cycles but biome should not be recalculated 04:14 paramat so the air_above bool seems essential 04:15 paramat studying your code and working on mine i know what you mean by 'messy and with redundancies' studying your code has been very helpful and i integrated your improvements into my latest code 04:16 paramat air needs chacking because a chunk does not only contain air, water or stone. there will be bits of overgenerated tree and dungeon too 04:17 paramat so the main 'if elseif' block needs an 'else' at the end to deal with these solid tree and dungeon nodes 04:22 paramat for stone type, the problem is that due to biomes having ymin/ymax if we choose a single point to choose stone type it may miss the biome containing desert stone or sandstone. so i suggest leaving it as it is 04:23 paramat as it is there's no chance of missing the triggering stone 04:34 paramat actually i'm not sure base_filler needs to be set to a big number at the top, perhaps not 04:40 paramat oops my nplaced should be a u32.. 05:25 paramat errors fixed and quickly tested https://github.com/paramat/minetest/blob/874d0e0475e3b3915a88565121135350bcd7035f/src/mapgen_v7.cpp#L592 15:38 kilbith have a dumb question... do only the mapblocks exposed faces or out of camera's view are only rendered ? 16:00 kilbith s/out of/inside 16:01 Calinou we do use view frustrum culling, as well as occlusion culling 16:01 Calinou occlusion culling is never perfect, but we believe it's aggressive enough 16:02 kilbith ok thanks 16:11 RealBadAngel Calinou, you may want to try it: https://github.com/RealBadAngel/minetest/tree/minimap3 16:15 Calinou do you need to use a setting to enable minimap? 16:16 RealBadAngel no i dont need that setting 16:16 RealBadAngel i think i will remove it 16:17 RealBadAngel but on the other hand later on i plan to allow control minimap from lua 16:17 Calinou is there a key binding? I don't see minimap 16:17 RealBadAngel F9 16:17 Calinou F9 already bound to cinematic here… 16:17 Calinou <_< 16:17 RealBadAngel https://github.com/RealBadAngel/minetest/commit/a3dd74534ac56c7598c72cc397b1a621ba2d74f7#diff-3474ba74d8eb9c72a47c6542f51eb4fcR52 16:17 Calinou oh it's changeable in GUI 16:17 Calinou thanks 16:18 Calinou oh no it isn't 16:18 Calinou only cinematic is changeable, not minimap 16:18 Calinou it should be changeable in GUI 16:18 Calinou maybe I want X for that 16:18 rubenwardy F8 is cinematic 16:18 RealBadAngel thats good idea to let user define the key 16:19 Calinou you should make Sneak + Minimap toggle go the other way around 16:19 Calinou ie. zoom out 16:19 Calinou also why is the map not in the top right corner? it's almost at the center of the screen 16:19 RealBadAngel btw, with threaded scanning we can afford 256x256 as zoom x1 16:20 RealBadAngel calinou, hillPlaneMesh has flaws 16:20 RealBadAngel i will use another method for it 16:20 RealBadAngel but it definitely have to be a mesh 16:21 Calinou your fading function is quite bad, when I'm on mountains I barely see stuff on minimap 16:21 RealBadAngel i have already found code which does such thing 16:21 RealBadAngel Calinou, thats the point 16:21 RealBadAngel youre too far away 16:21 Calinou make it optional :/ 16:21 Calinou Rei's minimap had such an option 16:22 RealBadAngel no i cant, otherwise you wont be able to scan for surface on other levels 16:22 RealBadAngel structures in the air, etc 16:22 RealBadAngel theres no fixed surface level 16:22 RealBadAngel and btw, do you know how many nodes it scans to get 256x256 minimap? 16:23 Calinou 256³? 16:23 RealBadAngel 8388608 16:23 RealBadAngel 256x256x128 16:23 Calinou whoa, your minimap goes behind blocks when you're in third person 16:24 RealBadAngel for surface mode, scan height is 128 nodes, for radar 32 16:24 Calinou https://lut.im/TCZnoYid/WAHXhhP6 16:24 RealBadAngel heheh, funny 16:24 RealBadAngel position and size is correct only for 4:3 16:25 RealBadAngel pity that method doesnt work for ohter ratios 16:25 Calinou make position changeable by user :P 16:25 Calinou also, what about making minimap transparent instead of black when it scans nothing? 16:26 RealBadAngel doesnt look good 16:26 RealBadAngel at least imho 16:26 RealBadAngel makes the minimap look like crap 16:27 RealBadAngel ofc when not complete yet 16:27 RealBadAngel about position, texures etc, all will be changeable from lua 16:28 RealBadAngel so games could make minimap a tool, aviable via crafting for example 16:29 RealBadAngel you will be able even to use minimap texture in formspecs 16:30 RealBadAngel 512x512 doesnt take too long to scan 16:31 Calinou scan only once per second or so 16:31 Calinou only when player moves 16:31 Calinou there should be max rate, in case you move very fast 16:31 Calinou 10 scans per second sounds reasonable 16:31 Calinou 20 maybe 16:31 RealBadAngel scannin is done in separate thread 16:31 Calinou definitely not more 16:32 RealBadAngel if you will trigger refresh on player move you will not get loading blocks around you 16:32 RealBadAngel until you move again 16:32 RealBadAngel anyway, scanner itself doesnt slow down fps at all 16:33 RealBadAngel only the code that shows the texture 16:33 Calinou how much times per second do you scan? 16:33 Calinou should be limited in any case 16:33 Calinou especially when user has menu opened 16:33 RealBadAngel what for? 16:33 Calinou to limit CPU usage 16:33 RealBadAngel its in another thread 16:33 Calinou doesn't mean you shouldn't limit it 16:33 RealBadAngel when not scanning it will run in empty loop 16:34 RealBadAngel no point in limiting anything 16:35 RealBadAngel it runs in background, reports to main thread if texture is ready. once grabbed it starts new scan 16:36 Krock ShadowNinja, there's an ugly calculation error somewhere in s_security.cpp. 'num_read' is '1088' when 'size' is '1126' 16:36 Krock Lua fails to open builtin\init.lua 16:36 RealBadAngel Calinou, anyway, just compare FPS with and without minimapper 16:38 RealBadAngel but on the other hand the code can be optimized for sure, like everythin else 16:40 RealBadAngel also, about fading. if i remove it the area out of scanner reach will just disappear 16:41 RealBadAngel and you wont see difference on different planes full of same nodes 16:41 RealBadAngel all will become just flat 17:00 est31 pushing in 5 minutes https://github.com/est31/minetest/commit/36b58964b2b4be37ea667ab263d719f818cc093d 17:01 est31 err 17:01 est31 doesnt build 17:01 est31 will fix that 17:01 est31 then pushing the fixed version 17:02 est31 https://github.com/est31/minetest/commit/9facb40738e7c51c838ad2ccffd96028862160cb 17:06 Krock est31, could you also push a commit to change the "r" to "rb" in https://github.com/minetest/minetest/blob/master/src/script/cpp_api/s_security.cpp#L267 please? 17:07 Krock (fixes windows builds) 17:08 est31 eh, is this \r\n stuff? 17:11 est31 hm, this basically boils down to the question whether we should have \r\n endings on windows, or \n. 17:12 Krock est31, no, it's about windows special features. It needs a 'b' to read every character as how it is 17:12 rubenwardy Isn't rb just read binary 17:12 est31 yes 17:12 Krock rubenwardy, aren't text files just binary files? 17:12 rubenwardy Yeah... 17:12 rubenwardy I wasn't saying they weren't 17:12 Krock however, without that additional 'b' character, it results in a wrong character count on reading 17:13 est31 so, then that should be fixed instead 17:14 est31 yea, quite the error happened forecasted here: http://c-faq.com/stdio/textvsbinary.html 17:15 TeTpaAka Thank you, est31. 17:16 est31 thanks for pointing out :) 17:18 TeTpaAka Is there any Information available for client side scripting? Or is there currently no design for it? 17:19 est31 hmmmm has one, but hasn't yet talked about it. 17:19 rubenwardy It's on the core dev's todo list, but there's been no real design discussion yet 17:19 rubenwardy I'd be interested in a GH issue, wiki page or maillist 17:19 est31 but generally I wouldn't rely on any features while its still in development 17:20 est31 or before implementation has even started 17:20 TeTpaAka Yes, I know. But he pointed out, that features like nametag colors should be done client side. 17:20 est31 yes 17:21 TeTpaAka And so I wondered how it would be done. How does the server tell the client, which function to run? 17:21 TeTpaAka Does the server provide the code or does the client has to download it? 17:21 est31 the server provides the code 17:21 TeTpaAka Ah, ok. 17:22 est31 we won't make it like minecraft, where people have to download stuff only to join servers 17:22 est31 of course, this also opens a security risk 17:22 TeTpaAka Sound reasonable. 17:23 TeTpaAka But would it be possible to install client side scripts that only alter the appearance and don't have any impact on the gameplay? 17:23 est31 how do you mean that? 17:23 TeTpaAka Something like shaders... 17:23 rubenwardy The user should be notified that the server is sending client side scripts, though, and have the option to cancel #2324 17:23 ShadowBot https://github.com/minetest/minetest/issues/2324 -- Dialogs whilst game loading 17:23 rubenwardy It should also display licenses etc 17:23 rubenwardy ie: get out of the JS trap 17:24 est31 why is js a trap? 17:24 est31 this discussion again 17:24 est31 I hate it 17:24 est31 only because it runs on your box, why does it have to be open source 17:24 est31 as long as its inside a sandbox who cares 17:26 est31 already now we have no license for the map 17:26 rubenwardy I don't care, others do 17:27 est31 Calinou mostly 17:28 est31 but yes the sandbox has to be very strong 17:31 Calinou running untrusted client code has implications 17:31 Calinou it's not because browsers did a wrong thing we should do it again 17:32 est31 which implications Calinou ? 17:32 Calinou ethics, security 17:33 est31 is there ethical and unethical javascript? 17:33 RealBadAngel hmm, whats more dangeroes, client side code which user can see and inspect or connecting to server with its mods (able to act client side) which user cannot see at al? 17:33 Calinou the ethical one is free, the unethical one isn't 17:33 Calinou and the unethical one is sometimes even distributed in obfuscated form 17:33 Calinou RealBadAngel, the server-side code can't do harm to your PC 17:34 est31 yes, security is a big point 17:34 rubenwardy That's your version of ethics, though. For the majority of the world non-free is still ethical 17:34 Calinou some server admins might get angry at their userbase and start distributing dangerous code 17:34 Calinou and some other admins will obfuscate it to prevent “theft” 17:34 est31 so what 17:34 RealBadAngel calinou, i bet i could do a littlle mess on client side with servers mods 17:35 est31 the server code is protected from "theft" too 17:35 RealBadAngel like filling up whole clients disk for example ;) 17:35 est31 Calinou, do you want to put minetest into AGPL? 17:36 Calinou no 17:36 RealBadAngel but whatever, we do need client side mods 17:36 est31 I think we should call it client side lua 17:36 RealBadAngel without them we wont get any good mobs, carts etc 17:37 est31 yea carts are shit 17:37 est31 currently 17:37 Calinou add a way to vizualize code from clien 17:37 Calinou like Web browsers do 17:37 Calinou at least we can shame server owners who obfuscate their code :) 17:38 est31 perhaps 17:38 est31 we need some way to debug yes 18:01 jin_xi i like helicopter mod, but it breaks badly when you ride it across camera offset. no matter how buggy the mod, such internals should not interfere with users 18:02 jin_xi anyway i hope that the possibility of future features does not stop people from trying to make current ones better 23:54 paramat thoughts on game#519 ? i realised it would not break existing worlds to enable by default 23:54 ShadowBot https://github.com/minetest/minetest_game/issues/519 -- Should mgv6 snowbiomes be enabled by default? 23:57 est31 why breaking? 23:57 est31 "why does it break"