Time Nick Message 00:00 PilzAdam maybe print something to infostream? 00:00 kahrl yeah 00:00 kahrl I checked the #minetest-dev talk on the day the black magic was added, there was nothing 00:03 PilzAdam btw, push that run_test() fix 00:05 PilzAdam ok, got a case where black magic is used: I have 1 clay block in my inventory; then I move a dirt block into the creative inventory 00:05 PilzAdam if I move it on clay in the creative inventory, it selects the clay in my players inventory 00:05 kahrl found something in #minetest: http://irc.minetest.ru/minetest/2012-09-02#i_2476281 00:06 kahrl which run_test() fix? the one doubling a delay to 100ms? 00:06 PilzAdam yes 00:10 sweetbomber how can i access a table within a table in luaapi? 00:10 PilzAdam Lua or c++? 00:10 sweetbomber i tried with lua_getfield, but i probably did something wrong since i do not understood this system fully 00:11 sweetbomber c++ 00:11 sweetbomber ill show my code 00:11 sweetbomber http://pastebin.com/973aPurP 00:12 PilzAdam maybe look at l_craft.cpp readCraftRecipeShaped() 00:14 PilzAdam sweetbomber, in c_converter.cpp are some methods to push and read vectors 00:18 sweetbomber how do i use for instance read3f? I need to use lua_getfield first? 00:18 sweetbomber and when should i use lua_pop? 00:18 sweetbomber s/when/ / 00:20 khonkhortisan Thanks kahrl! 00:21 kahrl you're welcome :D 00:21 kahrl for what specifically? 00:23 khonkhortisan the run test delay 00:24 kahrl yeah, it kept bugging me too 00:25 kahrl sweetbomber: if the table you want to read (with indices "x","y","z") is at position "index" on the lua stack, you call read_v3f(L, index) 00:26 kahrl or checkFloatPos(L, index) if you want it to be multiplied with BS 00:34 sweetbomber im still trying to understand how does this stack works, and what it contains 00:34 kahrl I recommend reading "Programming in Lua" 00:34 kahrl it has a part about the C API 00:35 kahrl and some edition(s) of it are available online 00:35 sweetbomber ty, ill give it a try 00:35 sweetbomber i really feel lost 00:36 PilzAdam kahrl, your black magic fix definitely works better than the previous code 00:38 kahrl it should be tested with mods that do inventory-related black magic of their own 00:38 PilzAdam VanessaE, can you test it with UI? 00:38 VanessaE sure I guess 00:43 VanessaE and this is for that issue where part of the stack gets left behind when you swap stacks? 00:43 Exio rename "Minetest" to "Magictest" 00:44 PilzAdam VanessaE, for this: https://github.com/minetest/minetest/issues/332 00:44 VanessaE ah 00:44 PilzAdam to reproduce: have 2 exact same stacks in the invenory, then put an item on the second one 00:44 PilzAdam (exact same == same item and same count) 00:45 VanessaE seems to work fine. exactly as expected. 00:46 VanessaE if A and A are in the inventory and I pick up B, and place it on the second A, B is placed and the second A is in my hand. that's what I'd expect it to do. 00:46 PilzAdam with the patch? 00:46 VanessaE yes 00:46 PilzAdam then it works 00:46 PilzAdam try moving stuff to different lists 00:47 VanessaE seems fine e.g. with bags and crafting grid 00:47 VanessaE lemme check with a chest. 00:48 VanessaE there's some jumping back and forth as items are moved around 00:49 VanessaE but the final behavior of each action is as I'd expect. 00:49 VanessaE wait 00:50 VanessaE yeah, seems okay, but server lag makes it confusing (and this is *singleplayer mode*) 00:50 VanessaE (re: kahrl's comment earlier) 00:50 VanessaE oop 00:50 VanessaE nope, there was one 00:50 PilzAdam yea, there is a bug with chests: two same dirt stacks are in a chest; I move a cobble on the second one and the first one teleports to the position of the cobble in the player inv 00:50 VanessaE the bug still exists. 00:51 VanessaE with the player inventory it seems right, but moving stuff back and forth inside a chest still triggers it 00:51 PilzAdam kahrl, seems like the bug still exists in chests 00:52 VanessaE the bug exists in furnaces too 00:52 VanessaE when swapping between the input slot and your inventory. 00:52 VanessaE pretty reliably in fact. 00:56 kahrl I know, but I don't know why 00:58 kahrl I suppose having prediction would fix it 00:58 kahrl Ah, I can see why 00:59 VanessaE s/the bug/the B replaces A1 instead of A2 bug/ 00:59 kahrl since there is no prediction the verifySelectedItem call clears m_selected_item, so the black magic happens and chooses the first item 01:02 sweetbomber kahrl: ty. Its working now :D 01:05 PilzAdam unrelated: another formspec glitch: https://github.com/minetest/minetest/issues/779 01:07 kahrl PilzAdam: && m_selected_item->i == i; <-- second i should be item_i 01:08 PilzAdam awesome! 01:09 * PilzAdam hands kahrl an award for fastest bug fixing in Minetest history 01:09 Exio haha 01:10 * kahrl noms the award 01:11 kahrl it's made of marble (with some mushrooms atop). I have tough teeth. 01:12 VanessaE (marble? pilzadam runs technic? ;) ) 01:13 PilzAdam *insert Darth Vader "NOOO!" here* 03:08 VanessaE that funky, intermittent "ABMs just simply stop running" bug just struck my server. This has been known since at least 0.4.4 03:34 kaeza VanessaE, what bug? 03:34 VanessaE that's all I have, kaeza . 03:34 VanessaE just that ABMs simply stop executing entirely every so often, without otherwise disrupting the server. 03:35 kaeza in a local map, I have an underground lava lake that fails to update no matter what I do 03:35 kaeza could this be related? 03:35 VanessaE dunno, but I have such a thing on my server also. 05:42 hmmmm anyway 05:42 hmmmm here's the finalized version i'd commit to upstream: https://github.com/kwolekr/minetest/commit/341badab4a2fe2afcc1b2c4c0816ca4f0c058ff3 05:43 hmmmm comments or complaints anybody? 05:46 ShadowNinja hmmmm: I block or one node radius? 05:46 hmmmm mmmmmm 05:47 hmmmm fixed 06:50 kahrl hmmmm: iirc we had portability problems with strcasecmp before, use str_equal(..., ..., true) instead 06:50 hmmmm i aliased stricmp() to strcasecmp() for windows 06:50 hmmmm a while ago 06:51 kahrl ah ok 06:51 hmmmm first i've heard of str_equal though, where is it defined? 06:51 kahrl util/string.h 06:52 celeron55 why is there a separate decoration and decoration_list? 06:52 celeron55 generally in other parts the API will accept a single value or a list in the same field 06:52 hmmmm because decoration wouldn't sound right if it were a list 06:53 celeron55 also, why deco_type and not just type? 06:53 hmmmm to follow suit with ore_type and some other things 06:54 kahrl class Decoration needs a virtual dtor 06:54 hmmmm right 06:54 celeron55 i think the "wouldn't sound like" isn't a valid reason 06:54 celeron55 right* (ehm... i'm just waking up) 06:55 hmmmm i'll change that then 06:58 celeron55 (actually, now that i think of it, i can't remember anything that actually does that...) 06:59 celeron55 there's something for sure, but it's not nearly as common as i thought 07:01 kahrl read_aabb3f_vector does 07:01 kahrl (used for node_box etc.) 07:01 celeron55 a more common thing is when a field accepts either a string or a table with named fields 07:01 celeron55 (register_privilege, sound_play) 07:07 kahrl would it be useful to allow group: notation for the node names? 07:07 hmmmm perhaps, but that's an enhancement to be added later on 07:08 hmmmm i just want to get this big part out of the way 07:08 celeron55 kahrl: i think it would become meaninglessly random 07:08 kahrl celeron55, that's a danger 07:08 hmmmm i think he was referring more to spawn_by 07:09 hmmmm perfectly valid 07:09 celeron55 there's not really any use case where you want a flat distribution of something 07:09 celeron55 oh spawn_by 07:09 celeron55 well that makes sense 8) 07:10 celeron55 (it does have the same danger if used wrongly though) 07:10 hmmmm if there's demand.. 07:10 celeron55 (but we shouldn't care that much about the effects of being used wrongly) 07:11 hmmmm anyway, what's right here would be enough to replace the rest of generate_ore in mapgen.lua, reducing it to..... nyancat generation. 07:11 hmmmm also it'd replace vanessa's flower mod 07:11 hmmmm but what i really want to get to is the structure deco type 07:16 hmmmm also, i'm considering changing divlen to sidelen as the configurable parameter. with divlen, the amount of decorations produced is unpredictable, since you don't know the chunk size 07:17 hmmmm but i'm trying to make this as close to the original as possible 07:21 VanessaE jeez, that mod barely got a chance :) 07:22 celeron55 hmmmm: yes, thange divlen to sidelen 07:22 celeron55 change* 07:22 celeron55 if possible 07:22 celeron55 or umm... what does that really even do? 07:23 hmmmm chunksize = pmax.X - pmin.X + 1, chunksize / divlen = sidelen 07:24 hmmmm oh you're asking for an edge case if it doesn't evenly divide 07:24 celeron55 no i am not 07:24 celeron55 but anyway, replace that divlen already with something sane 07:24 celeron55 it's ridiculously bad regarding any future changes to the map generator 13:46 Taoki http://forum.minetest.net/viewtopic.php?pid=95214#p95214 I'd like to hear what everyone thinks of this idea 13:47 Taoki If the devs are ok with doing it un Lua, I should be able to at least start it myself 13:50 proller from me about it: http://forum.minetest.net/viewtopic.php?id=4618 13:50 proller but lua - too slow for it 13:54 Taoki Trying to think of a system that would allow int in Lua. Finding any that could be fast enough for the thousands of loaded nodes however would be very hard 13:55 Taoki Typically, when there's only one to a few players on a server with the default view distance, how many nodes are active at once? 13:57 proller where to store temperature ? 13:59 Taoki proller: Either as each node's property (as a meta value), either have a Lua table of the form {x_pos, y_pos, z_pos, temperature} for every existing node (which might be huge) 14:00 proller i think one temp and humidity for 16x16x16 block is enough 14:00 Taoki Wouldn't do what I was thinking of still 14:01 Taoki Like realistic and correct heat transfer 14:01 Taoki We could however give a "lower resolution" to the heat transfer pattern itself... not sure 14:02 Taoki And only do a call when heat really changes 14:03 Taoki My idea was having a register_abm on every single node (even air nodes), which of course would be horrible. This would chack the temperature value of neighbor nodes, and absorb it by 1 unit each time 14:03 Taoki In case it's not equal... if it is avoid the checks altogether if possible 14:08 Taoki So the main question is, how hurtful would it be to hav a register_abm on every single node loaded in the world, which goes a get_meta on 6 nodes each time (the neighbors), and possibly a set_meta on 7 nodes (neighbors + self) if necessary. 14:08 Taoki **which does 14:09 proller its like finite liquid 14:11 Taoki Still, has anyone tried running register_abm on every single block including air nodes? I'm curious how much performance that by itself takes 14:11 proller its depends on content of abm 14:12 Taoki Ah... actually it would only need to be done every 1 or 2 nodes. Since a node checks its neighbor's temperature and transfers it, so there's no need for that neighbor to do the same 14:13 proller maybe make complex every node abm 14:13 Taoki yeah 14:14 proller and move liquid move in it 14:14 proller and make something like steam with it 14:14 proller staem moving up 14:14 proller and temp+humidity transfer 14:15 rubenwardy I have replied 14:15 rubenwardy Instead of per X/Z you could do it per mapblock 14:15 rubenwardy but per node would be the most realistic 14:16 Taoki yeah, per node is that I'm wanting 14:16 proller look not on every node like in openttd 14:17 proller but in 3d 14:18 proller like diagonal 1,1,1;2,2,2;3,3,3;....;2,1,1;3,2,2;... 14:18 rubenwardy The problem with making the temperature spread is that eventually everywhere will be the same temp 14:18 rubenwardy the world does not work like that 14:18 rubenwardy how would we get around that? 14:19 proller spread only if neer temp < my-1 14:20 rubenwardy So only is the near block's temp is more than one smaller 14:20 proller yes 14:20 proller or higher 14:21 proller its work on finite liquid now, but must be fixed 14:21 rubenwardy not realistic in real life, but the player will not notice, it should give same effect 14:21 PilzAdam Taoki, this is unrelated to Minetest core development -> #minetest-mods 14:21 Taoki PilzAdam: I actually wanted to add it to core :P 14:22 proller PilzAdam, its must be in core 14:22 rubenwardy In v9 map gen 14:22 Taoki But ti can be a mod first for testing 14:22 rubenwardy *7 14:22 Taoki *it 14:22 rubenwardy just like how finite liquid was 14:22 PilzAdam I dont think this its a useful feature 14:22 proller mod is spreading time, make in branch 14:22 PilzAdam -this 14:23 rubenwardy It would be usefull for mapgen 14:23 Taoki I think it would be really awesome. But that would be for the dev team to decide 14:23 Taoki Yeah, I'll likely make it as a mod first 14:23 PilzAdam rubenwardy, mg v7 already has some heat calcultations 14:23 rubenwardy you could have static temperature, with the temperature and humidity being set on map gen 14:23 rubenwardy oh 14:23 rubenwardy and dynamic where it spreads and changes 14:24 rubenwardy It would be useful if we were going for a DayZ type of survival experience 14:24 rubenwardy (need a fire to keep warm) 14:25 PilzAdam what Taoki wants is a Lua interface "get_temperature(pos)", and that can be done in a mod 14:25 PilzAdam (if I get it right what you aimed at) 14:25 Taoki PilzAdam: I'm thinking of doing the whole thing in Lua 14:26 PilzAdam you can just grab the heat perlin noise from mg v7 and get your initial values based on that 14:26 proller Taoki, no no no! 14:26 Taoki As a mod means putting it in the mods folder. I was thinking of developing it as part of minetest_games if that was wanted 14:26 Taoki ok :P 14:26 proller its eat 101% of cpu 14:26 PilzAdam proller, why do you think so? 14:26 PilzAdam in the easies implementation its just some perlin noise calls from the API 14:26 proller PilzAdam, because lua slow 14:27 PilzAdam you cant generally say that 14:27 Taoki proller: It's possible it might not... don't know. Depends on how register_abm would behave when set every 2 x 2 nodes 14:27 proller calc every node on lua - very slow 14:27 proller firt try of finite liquid was on lua with rubenwardy 14:28 proller its 10-100 slower than current 14:28 PilzAdam finite liquids used ABMs 14:28 proller and impossible to play 14:28 PilzAdam the temperature calculations can be done with on_place() and on_dig() 14:28 proller temperature transfer - no 14:29 Taoki PilzAdam: They can change dynamically, so the checks need to be done constantly 14:29 PilzAdam I think of starting with the perlin noise from mg v7 and only modify values in meta if a player places ice or lava 14:29 PilzAdam everything else would be too complex, even in the core 14:29 Taoki One example of how it would work: When night falls, air touched by the sunlight is no longer heated. So every node surrounding the air would slowly get colder 14:30 PilzAdam oO 14:30 PilzAdam it would never run if you want it like this 14:30 Taoki I did think of something realistic after all :P 14:30 Taoki ok 14:31 Taoki I even wanted to make fires / furnaces heat up closed rooms 14:31 proller PilzAdam, why ? 14:31 Taoki There is one advantage however: If I give a node low heat transfer, I can set the register_abm to even run once every 30 seconds 14:31 PilzAdam Taoki, the close room heatup would work in the way I imagine it to be too 14:32 Taoki So for example: Air which transfers heat quickly runs every 5 seconds. Stone however could run every 60 seconds 14:32 PilzAdam you cant run an ABM on air, even in core 14:32 PilzAdam it immediatly explodes 14:32 Taoki PilzAdam: True. It would be instant then but could be calculated. I assume my sun idea would also work, since I can only trigger the change a few times based on time of day 14:33 Taoki I did sort of want to make it dynamic and slow 14:33 Taoki Ah 14:33 Taoki Thought you could... 14:33 Taoki Is there a strict Lua limitation that doesn't allow it? 14:34 PilzAdam well, minetest crashs after a second or so 14:34 Taoki Sounds like a bug 14:34 PilzAdam no 14:34 PilzAdam just server overload 14:34 Taoki Anyway, I could specify a temperature tendency (eg: based on biome) and add influences to that instead. That way it can be done without abm checks 14:34 proller туув ещ ашч ше 14:34 proller need to fix it 14:35 Taoki I can only add an abm to the onode generating heat. As for environment temperature, I can figure out other ways 14:35 rubenwardy Why do you need to do air abm? 14:35 Taoki *node 14:35 Taoki rubenwardy: For heat transfer 14:35 rubenwardy just do solid stuff abms 14:35 rubenwardy dont allow to do that 14:35 rubenwardy just do it on nodes, and radiation 14:36 Taoki Yeah. Especially if it is to be done in a cheap way 14:37 Taoki Radiation... yes 14:37 Taoki Anyway, BBL. Will think more about it 14:38 Taoki I think I can figure out an easier system 15:11 PilzAdam is the minetest.register_decoration() intended to not work yet? 15:14 hmmmm it works fine 15:15 PilzAdam what am I doing wrong here: https://gist.github.com/PilzAdam/5797689 15:15 hmmmm probably using the wrong mapgen 15:16 PilzAdam does it only work with v7? 15:16 hmmmm it works with any mapgen that utilizes it 15:16 hmmmm so far, only v7 does 15:16 PilzAdam is it planned to be added to v6 and the others? 15:16 hmmmm i'll update v6 to use it later on 15:25 BlockMen hi, i have noticed, that particles are drawn behind the water -> http://i.imgur.com/z6MJOwW.png 15:25 PilzAdam known 15:25 BlockMen fixable? 15:25 PilzAdam they are also drawn behind selectionboxes 15:26 PilzAdam fun fact: MC draws them behind water too 15:26 BlockMen and another thing: they dont have the same light value like nodes 15:27 PilzAdam objects have the same bug 15:28 BlockMen soo...its and irrlicht thing? 15:28 BlockMen *-d 15:28 VanessaE everything that's not a cube has lighting bugs 15:29 PilzAdam AFAIK its not an Irrlicht bug 15:30 Jordach youre forgetting minetest was not made for odd shapes 15:31 BlockMen the effect isnt that strong without smooth lighting 15:31 VanessaE but very jarring with. 16:55 sapier temperatures ... funny :-) what about creating a climate simulation? *gg* 16:57 proller sapier, simple is possible 16:57 proller winter/summer, snow, etc 16:57 sapier including heat spread? forget about it 16:58 proller maybe without spread, using chunk heat/humidity 16:58 sapier biome granular temperatures changed light rain yes that'd be possible 16:58 proller change in time, rain-snow from clouds,... 17:00 sapier yes but I guess that'd require biomes to be identifyable after generation (not only biome type) 17:08 hmmmm it *can* be done 17:09 hmmmm hmmm, how do you gradually change a perlin noise map into something different gradually.... that's the big question 17:10 hmmmm incrementing or decrementing the noise lattice values before interpolation would have the desired affect 17:10 hmmmm s/affect/effect/ 17:12 hmmmm in order to do this, the right way would be to add a new method to Noise, given a set of previous lattice points, transform them, and then interpolate 17:13 hmmmm as for other octaves, i guess it'd make it more interesting if you kept it the same or changed those values more gradually than the larger octaves 17:21 sapier hmmmm my concern is not the theoretical possibility but the cpu performance required for dynamic heat spread ;-) 17:37 hmmmm clearly, you'd only want to modify the active range surrounding a player 17:39 hmmmm i'd say it'd be quick enough, updateHeightmap only takes around 1-2ms for an 80x80 area, regenerating the perlin noise is only a couple of ms as well, and modifying blocks with a voxelmanipulator is fast as well 17:39 hmmmm well, 2d perlin noise for an 80x80 area is less than a ms 17:40 hmmmm i'd vary the noise lattice point values by 1d perlin noise 17:42 hmmmm or, probably better, by noise1d(t) 17:42 sapier ms?? 17:42 hmmmm millisecond?? 17:42 sapier you're kidding ms are ages 17:43 hmmmm for comparison, generating a chunk takes around 100ms 17:43 sapier which are aons ;-) 17:43 hmmmm how often do you think this would be run, precisely 17:44 hmmmm i'm thinking once every minute or whatever, incrementally (so a whole bunch of crap doesn't happen at the same time) 17:44 sapier don't know depends on precision you want to do ... if you do it only every 1000 steps or something like that most likely won't be an issue ... if it needs to be done each step it is 17:45 hmmmm recalculating temperatures every step is pretty useless 17:45 hmmmm nevermind 1000 steps, let's try a minute of actual time 17:45 hmmmm that would be more reasonable 17:45 sapier still when hearing incremental heat spread I think of climate models which do exectly this calculate heat and their transmission between cubic atomospheric elements 17:46 hmmmm if you want to simulate actual seasons, thne maybe a lot longer than a minute 17:46 sapier ok they do a lot of thins more of course ... but they have a lot more cpu power too ;) 17:46 hmmmm also, the way to do this i just proposed wouldn't be simulating heat spread, but just incrementally morphing a 2d noise map 17:47 sapier can you tell me the benefits we are hoping to get from it? 17:47 hmmmm we?? you mean you, you came up with the idea 17:48 sapier no no I just read from logs 17:48 hmmmm i assume this is for having real seasons and some more dynamicism in biomes 17:48 hmmmm like for a snow biome, when the temperature changes, some of the snow would melt away 17:48 hmmmm or something 17:49 hmmmm anyway this would be a cool idea for a *mod* 17:49 sapier if biomes where some sort of entities (not mt entities) a biome could simulate its temperature changes independent of other biomes but I don't see a way to achieve this 17:50 sapier I leave this mod for someone else ;-) atm I've got enough work with asking about formspec mainmenu beeing included every day ;-) 17:50 hmmmm if you wanted to do it that way, you can vary the heat/humidity points for the biomes and recalc the biome map for some area 17:52 sapier sounds like lot of cpu power 17:52 proller why independent of other biomes ? 17:53 proller if show "biome" slowly transforms to desert - its more intresting 17:53 proller in 10+ game years 17:54 proller with yearly season changes 17:54 sapier now we really reach climate model levels ;-) 17:54 hmmmm well actually, modifying a single biome climate point would change all the other biomes as well 17:54 hmmmm you can't really prevent that 17:54 sapier I guess this should be tested in some experimental branch first 17:55 proller change season temp in -(10-30)..tempcenter..+(10-30) where tempcenter is biome defined and can change 17:55 hmmmm calculating a biome map isn't absolutely terrifying, but it's not something you'd want to keep doing 17:55 hmmmm hence biome map cache 17:56 hmmmm and plus it'd only be every once in a long while in game time 17:56 Taoki hmmmm: I posted a thread about a temperature system earlier (for weather and such). PilzAdam mentioned mapgen v7 will have a perlin heat map however, which sounds even better and renders my idea mostly pointless. I'm curious about it... what is the perlin heat in v7? 17:56 sapier I've tried swamp mod if biome calculations are a tenth as expensive it's still way to much 17:56 Taoki Does it contain a heat level at each node location? 17:56 hmmmm taoki, yes, each node has a certain temperature and a certain level of humidity 17:57 hmmmm this, along with elevation of the terrain, are the factors that define what the biome is at that point 17:57 Taoki hmmmm: Really awesome. Yeah, better than my idea then. And a very good addition 17:58 Taoki hmmmm: Only issue is that making fire in a house inside a snow biome can't change that heat map. Maybe I can make a mod that does, if each part of the prelin noise can be modified from Lua 17:58 proller if make heat map perlin 3d and use Y as time (slow) - we get random biomes transform 17:58 Taoki So you can warm up houses 17:58 Taoki (since I'd plan to use this heat map for things like materials reacting differently to various temperatures) 17:58 hmmmm taoki, the heat map is really just for map generation. if you'd like to use it for other things, that's pretty much mod territory 17:59 Taoki sure 17:59 hmmmm i.e. keep your own version of it to be modified 17:59 Taoki But will there be a lua function to change heat and humidity at a certain node? 17:59 hmmmm proller, that's true, i didn't think of using 3d noise here but that is completely valid 18:00 hmmmm taoki, that wouldn't be technically possible 18:00 Taoki makes sense. Still sounds awesome and useful for many features 18:00 hmmmm see, when biome map cache gets added, i guess you'd be able to write the heat value to *that*, but when a biome map needs to be generated, it's generated by perlin noise 18:01 Taoki So for instance, if you place water in a cold snowy area in mapgen v7, it will always turn to ice, regardless whether it's snowing or not 18:01 hmmmm it's possible, then, if you somehow maintain a list of points where there's a heat source 18:01 hmmmm (hey, like light sources ...) 18:01 Taoki yeah :) 18:01 hmmmm building a heat map should never rely on what's already on the map though 18:01 * Taoki really wishes I could try v7 out. But the biome definitions in Lua don't seem to work yet and give errors :( 18:02 hmmmm weird 18:02 proller Taoki, water->ice now possible with seasons mod, bit it buggy and need to remake 18:02 hmmmm you're not missing out on much anyway 18:02 Taoki proller: Nice 18:02 Taoki hmmmm: It does sound like it has some awesome features 18:04 Taoki hmmmm: What determines heat and humidity however? I know each biome has a certain amount of each. But like, does that depend on valleys and caves, height, and other factors at each spot? 18:04 hmmmm no, it's just perlin noise 18:04 hmmmm you should check out BiomeDefManager::calcBiomes 18:04 Taoki ok. Sounds like they still match she shapes of valleys / hills and such 18:05 Taoki Or is the noise of heat / humidity unrelated to the shape of the generated terrain, and a separate random perlin map? 18:05 hmmmm heat, humidity, and terrain elevation are three separate variables 18:06 Taoki nice. Sounds about right then 18:06 hmmmm just read the code and it'll answer all of your questions 18:06 Taoki Cuz if it wasn't and heat / humidity had to match the terrain, digging or covering a hill would mismatch what the map generated 18:06 Taoki ok 18:11 rubenwardy You could use pilzAdam's method and just store a modifier (ie: if the wanted temp is 5, and it was 10 originally, the modifier would be -5) 18:11 hmmmm [02:01 PM] it's possible, then, if you somehow maintain a list of points where there's a heat source 18:32 proller i think temp(x,y,z) must be like t=gametime (get_noise3d_value(x,ft(t),z))*fy(y)*(biomepoints()) fy like: 30000: -50, 0:0, -30000:+200 ft is like sin(period year)*20 18:47 Taoki proller: Temperature should probably be something of the form (heatmap_at_pos(pos) + sunlight_if_any(pos)) 18:47 Taoki Since maximum sunlight would add a lot of heat too 18:48 proller and sunlight depends on clouds, clouds depend on humidity 18:48 proller and height 18:48 Taoki Even better and more accurate then 18:49 Taoki Also, the 3D clouds and sunlight depend on area humidity too? Didn't know that, sounds great 18:49 proller but no sunlight underground 18:49 Taoki proller: Yeah, ungerground it's just the biome temp 18:50 Taoki eg: considering we'd give tesert biomes an average of 30*C, and sunlight always has an addition of 5*C. Nodes in that biome touched by the sun at maximum day time (and when it's not cloudy) would have 35*C 18:50 Taoki **desert 18:51 Taoki Underground there would still be 30... but up to a certain height only (since deep underhround you'll always have very cold temperatures regardless of biome) 18:51 sapier that's not accurate as below some depth temperature should rise again 18:52 sapier but I'm not sure how this might fit to 32k blocks height 18:52 Taoki That's what my temperature function will probably do when I make it. At ground level, temperature is humidity + X amount if touched by sunlight. Once you go below water level (y < 0), it gets colder. Also as you go above cloud level. 18:52 Taoki erm, heat + X amount 18:53 Taoki Humidity can play a role too. It can be used to exagerrate any temperature by a small amount 18:54 Taoki Since humid hit areas feel even more hot, and humid cold areas feel even colder. At least to living beings... not sure if that affects objects as much 18:54 sapier you know lava is overheated wet stone? 18:55 Taoki yeah 19:42 hmmmm taoki, in case i'm getting your hopes up, i'd just like to repeat this is a good *mod* idea 19:42 hmmmm i have no plans to put something this complicated into the engine 19:42 Taoki hmmmm: I know. It wouldn't even be mapgen related 20:10 Taoki meh. That moment when you're bored and click the 'git pull' button every few minutes hoping to see something new :p 20:12 kaeza uhh... click? what is that? :P 20:13 Taoki The command to update GIT 20:13 PilzAdam -> #minetest 21:05 hmmmm hmm 21:06 hmmmm in the interests of simplifying code, sidelen must be a power of two 21:06 sapier whats a sidelen? 21:06 hmmmm for the decorations 21:06 hmmmm there's divlen and sidelen 21:07 sapier ohhh side len :-) 21:07 hmmmm i wanted to make it as close to the original decoration placement from lua which had divlen as a parameter, the number of divisions a chunk is split up into 21:07 hmmmm so chunklen / divlen = sidelen, which is the size of the area being placed 21:08 hmmmm obviously this would make scarcity vary based on the person's chunk size 21:09 sapier I rememer calls to lua mapgen result in quite ugly divs as the number supplied are very small 21:09 hmmmm the limitations for sidelen are: it must be a power of 2, and it must be less than or equal to the chunk size 21:09 hmmmm actually forget about the power of 2 requirement 21:10 hmmmm i'll make it simply that it must evenly divide the chunk size 21:10 sapier don't know what this exactly results in 21:10 hmmmm sounds reasonable, right? 21:10 sapier yes 21:10 sapier at least if chunk size is a known value 21:11 hmmmm it is known at run time 21:11 hmmmm the mods don't know it though 21:11 hmmmm basically, i'm relying on mods not setting ridiculous values for sidelen 21:12 sapier I guess that's not a good idea 21:12 hmmmm it shouldn't be a problem because the majority of modders just copy and paste code snippets from other things like the default mod, and then modify it as needed, leaving things they don't fully understand alone 21:12 PilzAdam ^ 21:14 sapier believe me if there's a way to do it wrong modders will find at least 10 ways to do it even more wrong 21:14 hmmmm really, i could restrict sidelen to be <= the size of a block 21:14 hmmmm it's a tradeoff 21:14 sapier make it foolsafe :-) 21:14 hmmmm make assumptions that have a small chance of breaking the mod on some peoples' wacky configurations 21:15 hmmmm or keep it <= 16 and be sure it works everywhere 21:15 hmmmm I guess i could just write that 21:15 sapier "works everywhere" sounds good 21:15 hmmmm orrrrr 21:15 hmmmm i could fix their value up for them 21:16 sapier NO 21:16 hmmmm so if chunksize is a single block 21:16 hmmmm but the sidelen is something like.... 32.... 21:16 hmmmm i set sidelen to 16, and divide the distribution by 2 21:16 sapier very very very bad style to ignore a parameter and use a different one without letting anyone know it was ignored 21:16 hmmmm could just have a warning 21:17 sapier it's a lua error am I correct? 21:17 hmmmm errorstream or infostream 21:17 hmmmm doesn't need to bring lua to a grinding halt 21:17 sapier imho if a bad parameter is specified it's perfectly ok to throw a lua error 21:18 hmmmm "hey what you wanted doesn't work because there's a combination of the mod being stupid and you setting a stupid chunk size, so i fixed it for you, i made it %d" 21:18 sapier won't be realized 21:18 sapier that's error hiding 21:19 sapier if I call a function with invalid parameters I want to know it 21:19 PilzAdam if you document that its min(chunksize, sidelen) in the lua-api.txt then its ok 21:19 hmmmm but it's not really an invalid parameter 21:19 hmmmm yeah, good idea pilz 21:19 hmmmm could do that too 21:19 PilzAdam *Adam 21:20 sapier no it's not ok ... ariane5 was destroyed because of invalid input parameters ... and those where documented 21:20 hmmmm adam should be the first half of your name 21:20 hmmmm because it'd come naturally then 21:21 hmmmm sapier, this is a video game, not a mission critical control system for a satellite 21:21 sapier if the ariane 5 software did correct range checks for input parameters that bug would have been found before 21:21 sapier good style isn't a matter of what you program 21:22 sapier there's nothing good in ignoring modders parameters ... you won't do what he tells you and he'll have to search some time why it's not working as intended 21:22 hmmmm it'd work just as intended 21:22 PilzAdam ehm, what exactly is the problem sapier? 21:22 sapier not as intended by him 21:23 hmmmm but 21:23 hmmmm it's documented 21:23 sapier hmmm wants to silently ignore invalid input parameters replacing them by more correct ones 21:23 hmmmm if someone expects something to work a certain naive way, and doesn't read the documentation... 21:23 sapier no one reads documentation 21:23 PilzAdam sapier, not silently, documentent in lua-api.txt 21:23 sapier unless something bad happens 21:23 PilzAdam no one reads documentation <- wrong; argument invalid 21:23 sapier if you throw a lua error documentation will be read 21:24 PilzAdam anything else? 21:24 sapier i don't understand you guys on the one hand you are that pedantic with any code I submit on the other hand you just du plain wrong things and tell "but it's documented" 21:26 sapier if a input parameter is wrong TELL modder 21:27 hmmmm yes sapier, i'll also be sure to write things such as: char foo[64]; if (strlcpy(foo, "bar", sizeof(foo)) > sizeof("bar")) { fprintf(stderr,"AWOOGA AWOOGA! COULD NOT COPY OVER STRING, ABORTING RIGHT NOW!"); abort(1); } 21:27 PilzAdam who tells you that its wrong? the setting in minetest.conf can be wrong 21:28 sapier doesn't matter for the current setting in minetest.conf this parameter is wron 21:29 PilzAdam we need to define "wrong"; for me a "wrong parameter" is something that the engine cant handle; if we add some check that makes it handleable in all cases, it cant be wrong by definition 21:29 hmmmm but seriously 21:30 hmmmm by that logic, all of the lua api that use getstringfield_default is wrong 21:30 PilzAdam this discussion is rediculous 21:30 hmmmm s/is/are/ 21:30 PilzAdam -e +i 21:30 sapier pilzadam if we can find a way to handle on our own why even give an option to set a parameter? 21:31 sapier getstringfield_default returns default if NO parameter is set, thats completely differend 21:31 PilzAdam because there are still cases where the setting is used as is? 21:31 hmmmm sapier, or if it's not a string 21:32 hmmmm so nodename = 534, <--- this might not be what the modder wanted, let's abort and put the entire computer under lockdown until the situation is corrected 21:32 sapier try accessing a std::vector with an out of range value ... I strong guess this won't result in last valid element beeing returned 21:33 hmmmm it depends on how you try to access it 21:33 PilzAdam sapier, if we document that it does so then its fie 21:33 PilzAdam *fine 21:33 sapier I'm listening to your magic hmmmm how you get a value with an out of range index 21:34 hmmmm er, i didn't mean that 21:34 sapier you said that hmmmm 21:35 hmmmm i was reading that sentence as "it's going to explode with an exception" 21:36 sapier it will ... unless the one calling put a catch around it ... in any case the caller WILL be warned by error handling not by silently correcting his actions 21:36 hmmmm aren't there compiler options to ignore C++ exceptions that might be enabled? 21:36 sapier I don't know about any 21:37 sapier as far as I know an uncought exception will result in application to be terminated 21:37 sapier you can catch it at very high level but that'll result in all following code not beeing executed 21:38 hmmmm oh actually 21:38 hmmmm you're thinking of std::vector::at 21:38 hmmmm vector::at is bound checked, operator[] isn't 21:38 sapier but I don't want to continue this discussion imho its stupid to ignore out of range errors and silently fix them you won't persuade me from anything different 21:39 PilzAdam sapier, again, we do not fix them silently, its documented 21:39 hmmmm because we'd have to handle some people complaining about how a mod they downloaded doesn't work because we chose to have intentionally stubborn behavior 21:39 sapier that's even more stupid pilzadam 21:39 PilzAdam it just prevents users from crashing their server by a setting 21:40 PilzAdam sapier, how so? 21:40 sapier fixing bugs by documentation .... 21:40 PilzAdam what is stupid about that? 21:41 sapier if you've time to write it to docs you have time to fix it 21:41 sapier if a user sets his resolution to strange values minetest will fail to 21:41 sapier or enables shaders while none present 21:41 PilzAdam we are talking about the API, "fix it" means changing other peoples' mods 21:41 sapier or trys to run windows version on linux .. or or or 21:41 PilzAdam I dont plan to do that 21:42 PilzAdam many settings in minetest.conf have rangelims 21:42 hmmmm indeed^ 21:42 sapier we're not talking about minetest.conf settings 21:42 PilzAdam we try to prevent people from crashing minetest with settings 21:42 PilzAdam sapier, we are 21:43 sapier no we aren't we're talking about a lua api parameter 21:43 hmmmm ...and lua api parameters are never bounded 21:43 PilzAdam but it crashes if the setting is set wrong 21:43 PilzAdam so the setting is the root cause of the crash 21:43 sapier so let it crash 21:44 sapier post an additional error message above crash in lua done 21:44 PilzAdam and add a new setting "crash = "? 21:44 sapier do what you want it's still wrong 21:45 PilzAdam we should have the official goal that minetest.conf settings should be crash safe 21:45 sapier that's completely unrelated 21:46 sapier if a modder doesn't have a chance to set this parameter to a CORRECT value remove it 21:46 PilzAdam thus mods that rely on minetest.conf settings should be crash safe too 21:46 sapier obviously it's not required at all as you're able to guess a valid value 21:47 sapier so either you give a modder the opportunity to specify a value or not but don't fool him about what is set 21:48 sapier good night 21:48 hmmmm 'fooling people' is 'having it clearly marked in the documentation' 21:48 hmmmm hehe, we're sneaky, we'll hide it in lua_api.txt 21:49 PilzAdam ragequit? 21:49 hmmmm maybe he has to go to sleep 21:49 hmmmm isn't it like 11 pm in germany? 21:49 PilzAdam 23:50 21:51 hmmmm not to mention all of the getintfield uses 21:52 hmmmm if they pass a value larger than 2^31 - 1, it's going to wrap around when assigned to an s16 (which is used instead of int for lots of things) 21:53 hmmmm it's understood that if you pass along something insane, you're going to get insane results, or it's going to be fixed, so you should avoid dumb things or be sure what the behavior is if you're trying it 21:54 hmmmm sapier ought to be worried about all the integer overflows, not something as minor as *this* 22:23 hmmmm well whatever 22:24 hmmmm https://github.com/minetest/minetest/commit/56093b6614a47b181bbce6d4e35d213a4e04120c 22:43 PilzAdam hmmmm, should I push this commit that makes clay use register_ore()? 22:49 hmmmm sure 22:49 hmmmm that'll definitely fix the clay problem 22:49 PilzAdam "the clay problem"? 22:50 hmmmm yeah, not enough clay to work with 22:51 hmmmm https://github.com/minetest/minetest/commit/0b20768a242851364ba645a99c24a85c23544f86 22:52 PilzAdam https://github.com/minetest/minetest_game/commit/b0ab4fb4ab83dac9300f93a54a042023aba824be 23:03 Exio what about removing an useless call in mapblock_mesh.cpp? 23:03 Exio it added +5fps here (not much, but it may be a lot in other hardware?) 23:03 Exio https://github.com/EXio4/minetest/commit/f8c8aedfcd01236257e865d26bf6f5f02a4df979 23:05 Exio VanessaE: try it 23:08 kahrl Exio, should be a fine change 23:08 kahrl I don't know why I left that call in 23:08 kahrl (commit 807a0d31) 23:09 PilzAdam kahrl, if thats really a useles call then merge it 23:13 kahrl yeah, translateMesh does the thing that recalculateBoundingBox does within the loop 23:13 kahrl (it might be more efficient to just translate the bounding box, but meh) 23:16 kahrl PilzAdam, should I push the fix for https://github.com/minetest/minetest/issues/779? 23:16 kahrl have you tested it? 23:16 PilzAdam yes, of course 23:28 kahrl should I push the black magic change? 23:28 PilzAdam I would say so 23:28 PilzAdam we can find a fix for chests later on 23:28 kahrl adding node metadata prediction would be a fix for chests 23:29 kahrl and the black magic change will work with that 23:29 PilzAdam ok, then push it 23:31 PilzAdam if there is a large number of objects in a world that cause an FPS drop, how would I see that in the F6 output? 23:35 Exio "don't do black magic" 23:36 Exio the best commit, ever :P 23:36 kahrl :D 23:39 kahrl PilzAdam: SEnv: num of objects 23:39 PilzAdam I only have a client on a public server 23:39 PilzAdam where this happens: https://www.dropbox.com/s/08c6wwsmtoo2bvo/DuplicationBug.png 23:39 kahrl hmm 23:39 PilzAdam and the FPS constantly go down 23:40 PilzAdam compared the F6 output to a "normal" minetest, no differences 23:41 kahrl guess a CEnv: num of objects could be added 23:42 PilzAdam there are several of these "stacks" (wich I guess are caused by the duplication bug) 23:42 PilzAdam one of it got unloaded for a short time and my FPS got up to 60 again 23:43 PilzAdam I guess there are several objects at the same position 23:46 kahrl https://gist.github.com/kahrl/5801519 23:48 kahrl ^ anyone objecting to merging that? 23:48 PilzAdam seems good 23:49 hmmmm wait, why average? 23:49 PilzAdam the one for the server env uses that too 23:49 hmmmm oh, nevermind 23:58 PilzAdam kahrl, ok, the server that has this FPS drops and the sapling "stacks" shows me ~4000 objects in CEnV 23:58 PilzAdam and this number of objects is definitely caused by a duplication bug 23:59 kahrl ouch