Minetest logo

IRC log for #minetest-dev, 2013-06-29

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

All times shown according to UTC.

Time Nick Message
00:22 mrtux joined #minetest-dev
00:24 random_esrdxctfg joined #minetest-dev
00:41 kaeza joined #minetest-dev
00:53 random_esrdxctfg joined #minetest-dev
01:13 ch98 joined #minetest-dev
02:05 dexter0 joined #minetest-dev
02:08 hmmmm hmmmm
02:09 hmmmm I just tried screwing around with a bucket near an ocean with the old lighting algorithm.. and guess what.... still has the same problem
02:09 hmmmm if it's not a problem with calcLighting(), i don't think i should worry about it too much
02:10 hmmmm simply not interested in such a subtle thing that doesn't hurt gameplay in any form whatsoever
02:10 hmmmm i will make the shade of water a color darker though, to match up with the older version.  that won't stop the light from being noticably different when you scoop water out with a bucket
02:11 VanessaE um...fix the lighting first?
02:19 blaaaaargh joined #minetest-dev
02:23 sweetbomber joined #minetest-dev
02:30 arsdragonfly joined #minetest-dev
02:31 kahrl kahrl
02:31 kahrl re the latest commit: can it never be the case that light == 0?
02:32 kahrl oh, it's in if(light)
02:32 kahrl nevermind
02:41 hmmmm erh
02:41 hmmmm print("contains: " .. (if a:contains(5, 6, 6) then "true" else "false" end))  is invalid
02:42 hmmmm ohh
02:42 hmmmm that's not real syntax, that's just what someone wants a lua ternary operator to be like
02:44 hmmmm so basically... you can't concatenate "true" or "false" strings?  :( using lua is suffering
02:45 hmmmm "contains: " .. "true" is invalid
02:46 kahrl works for me
02:46 sweetbomber joined #minetest-dev
02:47 VanessaE I'd do something like print("contains:"..dump(expression))
02:47 kahrl print("contains: " .. tostring(a:contains(5, 6, 6)))
02:47 kahrl or what VanessaE said
02:47 VanessaE that works too
02:47 hmmmm tostring, ah
02:47 ShadowNinja hmmmm: That looks like C ?:. You can't do that in Lua.
02:48 hmmmm kahrl, does print("contains: " .. a:contains(5, 6, 6) and "true" or "false") work for you?  it didn't for me
02:48 diemartin joined #minetest-dev
02:49 hmmmm i think i tried it with the parentheses too, can't remember, can't care enough to try again
02:50 hmmmm shadowninja, a ? b : c is equivalent to a and b or c
02:51 ShadowNinja hmmmm: Good to know.
02:52 kahrl print("contains: " .. true and "true" or "false") <-- fails
02:52 kahrl print("contains: " .. (true and "true" or "false")) <-- works
02:52 hmmmm i figured that must've been the problem
02:53 hmmmm but for 30 seconds, i actually believed that lua implicitly converts "true' or "false" strings into booleans.... it's not behavior that i would put past lua.
02:54 kahrl containsp, a lisp-inspired name :D
02:54 hmmmm makes enough sense, no annoying underscores to slow your typing down, etc.
02:55 arsdragonfly hmmmm, IIRC , a?b:c = a and b or c only when b is not false
02:55 hmmmm the official lua site disagrees with you
02:58 arsdragonfly ?
02:58 hmmmm http://lua-users.org/wiki/TernaryOperator
02:58 hmmmm > A frequently used and highly recommend solution is to combine the and and or binary operators in a way that closely approximates the ternary operator:
03:04 kaeza hmmmm, actually, arsdragonfly is right
03:05 kaeza print(true and false or "0") > 0
03:05 hmmmm if he's right, that means that website is wrong and it can't be used as a ternary operator
03:05 ssieb joined #minetest-dev
03:05 arsdragonfly "closely approximate" ~= exactly equivalent
03:05 arsdragonfly see the following lines
03:06 arsdragonfly it has a caveat
03:06 hmmmm oh, but that's for the nested version
03:07 kaeza for most cases it shouldn't matter
03:09 arsdragonfly in unnested cases that problem also exists
03:17 salamanderrake joined #minetest-dev
03:19 darkrose joined #minetest-dev
03:22 ssieb joined #minetest-dev
03:26 diemartin joined #minetest-dev
06:11 diemartin this is pretty: https://dl.dropboxusercontent.com/u/100008207/Captura%20de%20pantalla%20de%202013-06-29%2003%3A08%3A41.jpg
06:13 diemartin ^ that is the first commit in the commit log
06:50 VanessaE joined #minetest-dev
06:51 diemartin joined #minetest-dev
07:15 hmmmmm joined #minetest-dev
07:16 neko259 joined #minetest-dev
08:19 kaeza joined #minetest-dev
09:02 iqualfragile joined #minetest-dev
09:40 kaeza joined #minetest-dev
09:42 ImQ009 joined #minetest-dev
09:45 Calinou joined #minetest-dev
10:24 jin_xi joined #minetest-dev
10:25 Jordach joined #minetest-dev
10:58 PilzAdam joined #minetest-dev
11:01 iqualfragile joined #minetest-dev
11:20 salamanderrake joined #minetest-dev
11:25 kaeza joined #minetest-dev
11:56 Taoki ugh... what was the function to bound values in Minetest? g: bound(-90, angle, 90);
11:59 Zeg9 joined #minetest-dev
12:02 mrtux joined #minetest-dev
12:06 Guest41157 joined #minetest-dev
12:34 PilzAdam Taoki, rangelim()?
12:35 Taoki Right... thanks
12:43 Zeg9 joined #minetest-dev
12:44 Zeg9 joined #minetest-dev
12:45 Zeg9 joined #minetest-dev
13:00 Zeg9 joined #minetest-dev
13:04 neko259 joined #minetest-dev
13:11 Exio joined #minetest-dev
13:14 PilzAdam joined #minetest-dev
13:28 salamanderrake joined #minetest-dev
13:32 arsdragonfly joined #minetest-dev
13:37 salamanderrake joined #minetest-dev
14:07 salamanderrake joined #minetest-dev
14:21 PilzAdam joined #minetest-dev
14:21 salamanderrake joined #minetest-dev
14:46 serengeor joined #minetest-dev
15:19 zorceta joined #minetest-dev
15:57 Lyrositor joined #minetest-dev
16:08 sweetbomber joined #minetest-dev
16:53 sweetbomber joined #minetest-dev
17:09 hmmmm joined #minetest-dev
17:15 Calinou joined #minetest-dev
17:15 iqualfragile_ joined #minetest-dev
18:09 PilzAdam joined #minetest-dev
18:21 iqualfragile joined #minetest-dev
18:26 EdB joined #minetest-dev
19:18 Calinou joined #minetest-dev
19:18 jin_xi joined #minetest-dev
19:50 Anchakor_ joined #minetest-dev
20:08 PilzAdam hmmmm, any reason why the lighting functions of the Lua vmanip needs the positions passed to the function and the others dont?
20:11 hmmmm "the others"???
20:11 PilzAdam like update_liquids()
20:12 hmmmm pretty sure update_liquids takes two positions
20:12 PilzAdam lua-api.txt says it doesnt
20:12 hmmmm hmm or not
20:12 PilzAdam thats seems not consistenz
20:12 hmmmm it's an inconsistency, sure
20:12 PilzAdam *consistent
20:12 hmmmm oh well
20:19 PilzAdam hmmmm, would you mind looking at this code: https://gist.github.com/PilzAdam/5892511 ?
20:19 PilzAdam it sets everything to fire
20:20 hmmmm sets everything to fire?
20:21 hmmmm well first off you're doing it wrong
20:21 PilzAdam yes, every single node is fire:basic_flame
20:21 hmmmm get_mapgen_object doesn't return the vm and basic
20:21 hmmmm and data rather
20:21 hmmmm where did i even see the word basic...
20:21 PilzAdam oh, it says so in the docs
20:21 hmmmm oh you said it
20:21 hmmmm erm, hold on.
20:22 hmmmm ah
20:22 hmmmm forgot to update that piece of documentation, but even then you didn't do it right
20:22 PilzAdam does it return a table?
20:22 hmmmm no
20:23 hmmmm local vm, emin, emax = minetest.get_mapgen_object(...
20:23 hmmmm local data = vm:get_data()
20:23 PilzAdam you should update the docs then
20:24 hmmmm there
20:26 hmmmm lua doesn't have the equivalent to a switch statement?
20:26 hmmmm christ, that's awful..
20:26 PilzAdam nope
20:26 PilzAdam only elseif
20:27 hmmmm i was thinking, maybe the nether and what not should be a mod rather than in the mapgen itself
20:27 PilzAdam what exactly does update_liquids() do? enqueue the liquids to the update queue?
20:27 hmmmm just an idea
20:27 hmmmm yes, that's what it does
20:27 sokomine lua's not a very convenient language for more complex algorithms. but it does well as a modding language that can be easily understood and used by people with limited experience. most mods are very simple. even adding a few nodes can add a lot of fun to the game (if the textures for said nodes are good)
20:28 hmmmm you only really need it if you're placing liquids
20:28 PilzAdam ok, I have rewritten the nether mod to use the vmanip
20:29 hmmmm works a lot better, huh :)
20:30 hmmmm instead of using caves you ought do add some 3d noise to the mix, just my recommendation
20:30 PilzAdam like a billion times faster :D
20:30 Exio only a billion? i'd have said a bit more!
20:31 hmmmm well, it can't be more than 45x faster anyway
20:31 PilzAdam do I need to call calc_lighting() and update_liquids() before calling write_to_map()?
20:31 hmmmm in your case, no you don't
20:31 Exio hmmmm: 8 generate_ore calls vs vmapip?
20:31 hmmmm update_liquids only really needs to be called if you're placing a liquid, and calc_lighting() only needs to be called if you're adding or removing a significant amount of nodes
20:32 hmmmm in your case you're only changing things in place from one node to another
20:32 hmmmm exio, 8 generate_ore calls with a scarcity of 1.. that's pretty slow and definitely an abuse of ore
20:33 hmmmm using schematic api for this stuff is bad still but nowhere nearly as bad as that
20:33 hmmmm using voxelmanip is the ideal solution for the majority of cases
20:33 PilzAdam hmmmm, I place lava and glowstone, so I guess I have to call both
20:33 hmmmm oh, yes.
20:34 PilzAdam for some reasons caves are not pitch black anymore :-/
20:34 Exio hmmmm: 8 generate ore calls per node replacement, (8 * 13)
20:34 Exio 104 generate_ore calls
20:36 hmmmm PilzAdam, maybe it'd be a good idea to clear all the lights first?
20:36 PilzAdam forcing a light update by growing a sapling makes the cave black again
20:37 Exio did you try with calc_lighting?
20:37 PilzAdam vm:set_lighting(minp, maxp, 0); vm:calc_lighting(minp, maxp)
20:37 PilzAdam doesnt help
20:37 hmmmm umm
20:37 hmmmm set_lighting doesn't take an integer as the third parameter
20:37 hmmmm it's clearly documented.
20:38 PilzAdam oops, my fault
20:38 PilzAdam now some places of the cave are black, others are not
20:38 hmmmm and i found a bug
20:38 hmmmm it's not related to that though
20:39 hmmmm PilzAdam, how are you calling vm:set_lighting now?
20:39 PilzAdam vm:set_lighting(minp, maxp, {0,0})
20:39 PilzAdam vm:calc_lighting(minp, maxp)
20:39 hmmmm :/
20:39 hmmmm still wrong
20:40 PilzAdam is it {day=0, night=0}?
20:40 hmmmm it's supposed to be vm:set_lighting(minp, maxp, {day=0, night=0}
20:40 hmmmm but that won't change anything here
20:40 PilzAdam you really should use lua tables in lua-api.txt
20:40 hmmmm i clearly described it in the api...
20:40 hmmmm documentation
20:41 PilzAdam s/day and night/"day" and "night"/ <- would be better
20:41 hmmmm alright sure
20:41 hmmmm anyway, try including the X and Z borders for both
20:41 PilzAdam {day=<0...15>, night=<0...15>} <- even better
20:43 PilzAdam I used the minp and maxp that are passed to on_generated(); now I switched to the once returned by get_mapage_object() and it works
20:43 hmmmm that's only by chance..
20:44 hmmmm alright anyway
20:44 hmmmm i'm not really sure why you have to include the borders there
20:44 PilzAdam hm?
20:45 hmmmm for now, change it to {x=emin.x, y=minp.y, z=emin.z}, {x=emax.x, y=maxp.y, z=emax.z} for both set lighting and calc lighting
20:45 hmmmm you're actually doing an out of bounds memory access
20:45 PilzAdam seems like a bug?
20:46 hmmmm not really... it's just that i didn't make this safe enough for lua use
20:46 PilzAdam whats the difference between the points passed to on_generated() and get_mapge_object()?
20:46 hmmmm 16
20:51 sokomine that get_content_id will give me a number for each node-name in that region (=area voxelmanip is used on), will it not? so e.g. it will give me 3 for default:grass, 2 for default:dirt and so on (always depending on the region selected)
21:12 proller faster! https://github.com/proller/minetest/commit/ecd3c24e44b1e640afa68b5648044428fdbe2f08
21:13 proller is any objections?
21:13 hmmmm uh yes...
21:13 hmmmm why are you doing that to my updateLiquid
21:15 proller because when liquid_finite enabled - it no need to add every liquid in queue
21:15 PilzAdam proller, you keep throwing small patches in, but you dont really the fix the whole thing
21:15 proller PilzAdam, i cant fix whole in one time
21:16 PilzAdam there are major issues with finite_liquids that mak them pretty much unplayable
21:16 PilzAdam +e
21:16 proller finite_liquids now is only other liquid distribution algorythm
21:17 hmmmm why every 36?
21:17 proller and it cant fix in one time all liquid problems
21:17 hmmmm 36 is kind of arbitrary
21:17 proller 100 too rare
21:17 hmmmm so you just tried different values?
21:18 proller 10 too frequent
21:18 proller yes
21:18 proller maybe 50 ok
21:18 proller but it can works with 10000 8)
21:18 proller abm helps
21:18 hmmmm hmmmmm
21:19 proller and abm make it more smooth and lower cpu usage
21:19 hmmmm yeah i guess it's fine, but why do you have random spaces everywhere?
21:19 hmmmm if (   map->getNodeNoEx(p - v3s16(0,  1, 0 )).getContent() != CONTENT_AIR
21:19 proller oops
21:19 proller editor hide tabs
21:19 proller will fix it
21:19 hmmmm np
21:20 hmmmm what editor do you use?
21:21 proller you dont know it
21:21 proller 8)
21:21 proller mcedit 8)
21:21 PilzAdam MS notepad? :-p
21:21 proller s/know/want know/
21:22 hmmmm what, geany or something?
21:22 proller 90% work i do in ssh
21:23 hmmmm sounds painful
21:23 Exio what about vim proller?
21:23 proller and im vim-uncompatible
21:23 PilzAdam MCEdit is a world editor for Minecraft...
21:23 Exio emacs?
21:24 Exio PilzAdam: uh?
21:24 Exio mc edit
21:24 proller emacs too big
21:24 proller mcedit i use
21:25 hmmmm it could just be a not-so popular text editor we never heard of
21:26 darkrose joined #minetest-dev
21:26 darkrose joined #minetest-dev
21:28 Exio proller: use nano!
21:28 Exio ;P
21:28 proller mc is not only editor
21:28 Exio i know
21:28 PilzAdam its also a voxel based game
21:29 proller text-mode voxel
21:29 Exio PilzAdam: https://en.wikipedia.org/wiki/Midnight_Commander
21:30 PilzAdam Exio, https://en.wikipedia.org/wiki/Minecraft
21:30 hmmmm > Midnight Commander also includes an editor called mcedit, which can be executed as standalone program or from Midnight Commander using the F4 key.
21:31 PilzAdam random: in my former school I used the Midnight commander to access the USB sticks of other people (there was no protection or anything)
21:31 proller commited, next stop - disable updateLiquid for finite*
21:32 proller PilzAdam, and old liquids is not liquids and totally unplayable
21:33 proller but its from minecraft
21:46 proller no more bubbles in sea
21:46 proller * after 1-2 min
21:47 proller hmmmm, maybe stop cave generation, if it hit water?
21:47 PilzAdam proller, maybe the old liquids dont behave like RL liquids, but they work perfectly fine
21:48 proller PilzAdam, work how? be blue?
22:20 Exio hm
22:21 Exio proller: https://github.com/EXio4/minetest/commit/08cd5809f4e8bd6ef253fbde0e5122440d507812 ?
22:23 Exio threw a pull request (#796) in case anyone wants to check later
22:23 proller maybe break?
22:24 proller continue-> break
22:24 Exio hm, why?
22:24 proller and no problem with lava - nobody see it 8)
22:24 Exio haha
22:25 proller continue make air bubble
22:25 salamanderrake joined #minetest-dev
22:25 Exio does it?
22:25 proller yes
22:26 Exio did you actually try with break?
22:26 proller no
22:26 proller but it must help
22:27 Taoki Almost finished code for fog transitioning. Looking pretty good... will post it tomorrow most likely
22:27 Taoki Just need to tweak the colors and formula a bit
22:28 proller Exio, and no problem with dungeons, its rare and makes intresting structures with liquids
22:29 Taoki PilzAdam: Y U POST NO NEWS ON THE VBO CODE!
22:32 Taoki I kept insisting precisely cuz I predicted this would happen: The code would be ready, fixed after so much hard work, but suddenly left there without any more news right after it's done.
22:36 Exio proller: did you actually try the changes?
22:37 proller now trying..
22:38 PilzAdam Taoki, http://irc.minetest.ru/minetest-dev/2013-06-27#i_3166150
22:38 Taoki PilzAdam: I remember you later tried and that didn't work, and I think c55 said to leave it as is
22:39 Exio are you suggest adding a "forever temporal" way to do something?
22:39 PilzAdam nobody said to leave it as it is
22:39 Exio s/suggest/&ing/
22:39 proller Exio, much less cave bubbles
22:39 PilzAdam we need to find a proper way to fix it
22:40 Taoki :x
22:40 Taoki Which will probably be many months for now. So a huge improvement still goes away for the time being, like I feared it would :/
22:41 PilzAdam who said that it takes several months? it could be fixed in 5 minutes if someone comes up with a good idea
22:41 Taoki And if no one will, the improvement is lost
22:42 Exio if it goes now into upstream
22:42 Exio nobody will ever try to fix it until it bothers something he is doing
22:48 proller Exio, lot of caves with return
22:48 Exio wut?
22:49 Taoki Exio: Even with not including it at all it's unlikely anyone will. So the most likely thing is the improvement will get lost :/
22:49 Taoki I seen enough in me'ol development days to know how it tends to go :P
22:53 * Taoki sighs
22:54 Taoki I have no knowledge of how Irrlicht works with memory items and how on earth I'd store a mesh in a local cache, otherwise I'd do it myself after I'm ready with the fog colors
22:54 PilzAdam I dont know about that either
22:55 Taoki So unless someone does, the only choice is for the improvement to get lost...
22:57 Taoki When we could merge it as it is and wait until it can be fixed. I don't see why not...
22:58 PilzAdam throwing leaking code in is bad habit
22:58 Exio hmmmm: ping?
22:59 Taoki PilzAdam: It's not really a leak any more... I think. It's just Minetest keeping data in the ram more frequently when the client doesn't remove it quickly enough. So more like "costly functionality"
23:02 Taoki I guess acceptable with the minetest.conf comment
23:06 Taoki But really... this isn't an improvement I can watch going to waste. It's very needed. But I've no idea how to fix it either. So really... I dunno
23:08 Taoki celeron55: Can you give your approval on that with just the warning about setting the client keep limit lower? Until there's someone who can fix caching stuff in the client?
23:31 ch98 joined #minetest-dev
23:42 jin_xi joined #minetest-dev
23:43 hmmmm exio, no can do, that patch is bad
23:43 hmmmm you'll wall off caves that way
23:43 Exio hmmmm: wut, how?
23:43 Exio oh
23:43 hmmmm besides, it doesn't really do anything
23:43 Exio the content_ignore?
23:44 hmmmm yup
23:44 Exio that is just removing, 4 words?
23:44 Exio hmmmm: and how is it doing "anything"?
23:44 hmmmm huh?
23:45 hmmmm that patch doesn't do anything because caves will never encounter a lava source, any time they hit a water source they would've already written a water source instead of an air node, if it's air, that doesn't really matter either because you're replacing it with air, and content ignore you need to be able to write to
23:46 hmmmm so, sorry, i'm not even sure what your intent was with that patch
23:47 Exio ehm
23:47 Exio are you sure?
23:48 Exio if yes, then there is :247-250 / :512-514 are actually useless
23:49 hmmmm no, they need to stay for small caves.
23:50 hmmmm in other words, that code is perfectly fine the way it already was, no need to change it
23:51 salamanderrake joined #minetest-dev
23:59 Exio well, i actually don't get it
23:59 Exio but nvm

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