Minetest logo

IRC log for #minetest-dev, 2017-09-01

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

All times shown according to UTC.

Time Nick Message
00:26 proller joined #minetest-dev
01:23 DI3HARD139 joined #minetest-dev
01:47 Tmanyo joined #minetest-dev
03:50 paramat joined #minetest-dev
04:16 paramat #6352 is ready, feel free to merge if approved
04:16 ShadowBot https://github.com/minetest/minetest/issues/6352 -- Ores: Add stratum ore by paramat
04:55 proller joined #minetest-dev
05:09 Hunterz joined #minetest-dev
05:43 nerzhul joined #minetest-dev
06:07 Hijiri migrate to C++17
06:08 Hijiri btw I'm ready to rebase my PRs when someone is willing to review them
06:08 Hijiri not this instant though I'm about to get ready to sleep
06:09 nerzhul C++17 is pretty useless for MT, only fielsystem part can be useful
06:54 lisac joined #minetest-dev
07:55 YuGiOhJCJ joined #minetest-dev
07:55 nerzhul joined #minetest-dev
08:55 nerzhul hello
08:55 nerzhul merging  #6357 in ~5 mins
08:55 ShadowBot https://github.com/minetest/minetest/issues/6357 -- Fix animation frame_speed and blend loosing precision due to incorrec… by sapier
09:19 Hunterz joined #minetest-dev
09:31 Megaf joined #minetest-dev
09:59 troller joined #minetest-dev
10:06 Krock joined #minetest-dev
10:08 Fixer joined #minetest-dev
10:29 troller joined #minetest-dev
10:31 Wuzzy joined #minetest-dev
10:32 Wuzzy Please somebody look at this: https://github.com/minetest/minetest/pull/5795
10:36 nerzhul no i don't want
10:36 nerzhul :D
10:37 Wuzzy How do I convert mapblock coordinates back to normal coordinates?
10:38 nerzhul * BS ?
10:38 nerzhul intToFloat and floatToInt({x,y,z}, BS);
10:40 celeron55 define mapblock coordinates and normal coordinates, neither means anything
10:40 celeron55 and nerzhul's answer is most definitely wrong
10:41 Wuzzy mapblock coordinates: the thing you get in error messages lke this:
10:41 Wuzzy "ServerEnvironment::deactivateFarObjects(): id=3984 m_static_exists=true but static data doesn't actually exist in (36,-3,332)"
10:41 Wuzzy normal coornates: what you see in debug screen
10:41 Krock * MAP_BLOCKSIZE or similar
10:42 Wuzzy i.e. 80?
10:42 sfan5 *16
10:42 celeron55 yeah, if you multiply by MAP_BLOCKSIZE, you get the lowest corner of the mapblock in node coordinates
10:42 Krock no, 80 is the mapgen size (chunks?)
10:43 celeron55 the rest of the nodes of the mapblock are +0...(MAP_BLOCKSIZE-1) from there in each coordinate
10:43 celeron55 and MAP_BLOCKSIZE is 16
10:43 Wuzzy hmmm ok let me try
10:45 Krock in C++, we have operator overloading for v3s16/s32, so  my_vector * MAP_BLOCKSIZE is valid btw
10:45 Wuzzy so (36, -3, 332) translates to the bounding box between (576, -48, 5312) .. (591, -63, 5297)?
10:45 celeron55 no
10:45 celeron55 -48 + 15 = -33
10:45 Wuzzy lol
10:45 celeron55 and 5312 + 15 = 5327
10:46 Wuzzy oops i went the wrong way
10:46 Wuzzy but ok I see how it works now, thank
10:47 Wuzzy so its really just *16 for each coorinate and I have the lower bound
10:47 celeron55 0,0,0 is the lower bound of a mapblock, and the rest just stack in a 3D grid from there
10:48 celeron55 the lower bound of the 0,0,0 mapblock :P
10:54 Wuzzy How were all schematics in Minetest Game created? did you use tools or something?
10:56 sfan5 i think paramat uses some thing that turns .mts into lua tables and vice versa
10:56 est31 joined #minetest-dev
10:56 Krock there's also minetest.create_schematic
10:56 Wuzzy that doesn't help me if I also need node probabilities and yslice_prob
10:57 Wuzzy do you know paramat's "thing", by any chance?
10:57 Wuzzy is it WorldEdit?
11:07 sfan5 nah i think it's an utility/mod he wrote himself
11:08 Wuzzy ah, found it!
11:08 Wuzzy https://forum.minetest.net/viewtopic.php​?f=9&t=12011&view=unread#unread
11:15 Wuzzy Do you know of any other useful development tools (like saveschems, luacmd, NodeBoxEditor, etc.)?
11:22 proller joined #minetest-dev
11:31 nerzhul celeron55, i missed MAP_BLOCKSIZE like a noob in my calcul :(
11:32 nerzhul merging #6358 in ~ 5 mins
11:32 ShadowBot https://github.com/minetest/minetest/issues/6358 -- Remove nodeupdate completely by Rui-Minetest
11:35 CalebDavis joined #minetest-dev
11:38 ThomasMonroe joined #minetest-dev
11:44 cx384 joined #minetest-dev
11:46 Fixer get biome info
11:56 quater joined #minetest-dev
12:08 DS-minetest joined #minetest-dev
12:12 tenplus1 joined #minetest-dev
12:12 tenplus1 fixed - https://github.com/minetes​t/minetest_game/pull/1884
12:12 tenplus1 left #minetest-dev
12:16 troller joined #minetest-dev
12:19 nerzhul Krock, there is no sense to re-send the message to the sender
12:19 nerzhul (passing by the server)
12:20 Krock how come? two CSM mods might listen to the same channel
12:20 nerzhul but if there is a need (i don't see why) we can broadcast to the local instance (SSM to SSM) and CSM to CSM in the same client
12:20 nerzhul then it's a RPC like between mods permitting to standardize inter mod communication in the sandbox
12:20 nerzhul exact ?
12:21 nerzhul i can change the algorithm to add a callback on message sending in clients to handle that case, and send message to server when server sent the message, the problem is the sender will always receive it's message as a callback, and should handle it
12:21 Krock they might would conflict each other when sending on the same channel :/
12:22 nerzhul i'm not afraid about the conflict
12:22 nerzhul my main concern is the loopback on the same consumer/provider mod, it means each mod developer should handle its own sent message return
12:23 nerzhul we don't have a mean to find we are sending message to the same mod :(
12:23 Krock indeed, they'd have to do so
12:23 Krock but if this feature is requested later, the risk of a loopback is much higher when mods started using it
12:24 nerzhul yes
12:24 nerzhul if someone find a real good usecase we can remove the return-back security later
12:24 nerzhul as mods are on the same sandbox they can talk lua to lua directly instead of translating to core C++ and re translate to lua :)
12:27 nerzhul the only thing i wanted to tune but our registration model doesn't permit it now is remove the channel param from lua callback registration and register to a table with channel name as a key
12:27 nerzhul it prevent any mod to receive non listening channels messages
12:28 Krock indeed
12:28 nerzhul if a good builtin developper can help me to achieve this task it can be nice and prevent copying every event to every listener
12:28 Krock but for now we need a base to build on. improvements can also happen later
12:29 nerzhul yes, this just needs a API break in the same dev,  but if it's tolerate in this cycle i can wait
12:29 nerzhul it just needs to be fixed before release
12:29 nerzhul Krock, did you tested it enablind CSM preview and playing on minimal ?
12:32 Fritigern joined #minetest-dev
12:35 troller joined #minetest-dev
12:43 Krock tested it in an own mod to check whether it works like I expected - and it does.
12:47 nerzhul heh
12:47 nerzhul you have a real use case ?
12:50 Krock not yet. just some ping/pong tests
12:51 nerzhul without the HUD CSM pr it's less useful because you cannot have readable real time informations between clients
12:51 nerzhul i should review it asap to make it merged asap, both are very linked in a real case usage
12:52 troller joined #minetest-dev
13:10 est31 left #minetest-dev
13:22 nerzhul a question about the message content
13:22 nerzhul is this core engine responsibility to serialize a lua object or lua mod owner to use core.serialize call ?
13:30 RobbieF joined #minetest-dev
13:30 nerzhul joined #minetest-dev
13:37 RobbieF left #minetest-dev
13:47 antims joined #minetest-dev
13:47 celeron55 i'd say make the engine do it
13:47 celeron55 modders would have to do it anyway in the majority if cases and the api is supposed to make things easy
13:47 celeron55 of*
13:49 Hunterz joined #minetest-dev
13:54 nerzhul celeron55, okay i add it in the todo list, do we have any other API doing a similar thing ?
13:55 celeron55 possibly none
13:55 nerzhul erf :(
13:55 nerzhul i hope minetest.serialize code is easily transposable heh
13:55 celeron55 call it from C++ 8)
13:56 celeron55 and let someone optimize it later
13:56 celeron55 always a good plan!
13:56 nerzhul lol, i don't like to be crazy like this, i'm not a NodeJS dev :p
13:57 ThomasMonroe joined #minetest-dev
13:59 celeron55 what the eff, minetest.deserialize has a "safe" parameter which is set to unsafe by default
13:59 nerzhul lol
14:04 proller joined #minetest-dev
14:08 DS-minetest joined #minetest-dev
14:31 YuGiOhJCJ joined #minetest-dev
14:33 Player_2 joined #minetest-dev
14:51 proller joined #minetest-dev
15:31 proller joined #minetest-dev
16:06 proller joined #minetest-dev
16:22 rubenwardy !tell nerzhul why not JSON instead of (de)serialize?
16:22 ShadowBot rubenwardy: O.K.
16:31 quater joined #minetest-dev
16:31 paramat joined #minetest-dev
16:32 paramat Wuzzy use https://github.com/minetest-mods/saveschems instead, that's the latest version
16:33 Wuzzy I am currently writing a small python script to parse and later manipulate schematics more easily. i plan to do enable common tasks like "replace all dirt with stone", etc.
16:33 Wuzzy but thanks
16:34 Wuzzy this lua-to-MTS and back is very tedious... :/
16:36 Wuzzy btw paramat, I added your mod to the Developer Wiki on the Developer Tools page: http://dev.minetest.net/Development_Tools
16:41 Wuzzy Who is maintaining the Developer Wiki btw?
16:41 Wuzzy I mean who's the admin?
16:42 rubenwardy CalebDavis,
16:42 rubenwardy oops
16:42 rubenwardy Calinou,
16:42 rubenwardy well
16:42 rubenwardy c55 hosts it
16:44 Calinou I don't have access to the hosting, I'm only a wiki admin
16:46 paramat Wuzzy better to link directly to the minetest-mods repo, my forum topic may have some misleading or out of date explanation
16:47 RobbieF joined #minetest-dev
16:47 Wuzzy but it links to https://github.com/minetest-mods/saveschems
16:48 Wuzzy i mean your post
16:48 Wuzzy it already links to correct repo
16:48 Wuzzy last commit was in December 2016 and that was by you. xD
16:49 sofar I made him do it :P
16:49 Wuzzy also, the readme is not really useful. forum post seems more complete
17:02 paramat ok i'll update the forum post if there is any wrong information
17:03 paramat maybe the readme too
17:24 Megaf joined #minetest-dev
17:41 proller joined #minetest-dev
17:42 Wuzzy thx
17:42 Wuzzy i noticed something strange in MTS files
17:45 Wuzzy apparently many schematics in MTG have a y-slice probability of 127 (0x7F) for all slices instead of 255 (0xFF). WTF? The docs clearly say that 255 is equivalent to 100%.
17:59 sofar interesting, for which ones did you see that?
18:02 sofar yeah, I see it too (aspen tree, for one)
18:03 sofar looks like during saving that ff -> 7f and 7f -> 3f
18:05 sofar Wuzzy: https://github.com/minetest/minete​st/blob/master/src/mg_schematic.h
18:05 sofar #define MTSCHEM_PROB_ALWAYS 0x7F
18:05 Wuzzy wtf
18:05 Wuzzy so the docs are wrong.
18:06 sofar 1 bit was reserved for force placement of nodes, so the available mask for probabilities was reduced to omit that range
18:06 Wuzzy but i was talking about y-slices which do not have that force placement bit
18:06 sofar well the thing is that the save code accounts for it
18:07 Wuzzy so... probabilities are actually from 0-127?
18:07 sofar serialize_schematic() handles it
18:08 sofar they're 0-255 if you use serialize_schematic()
18:08 sofar and they're 0-127 from a binary storage perspective
18:08 Wuzzy O_O
18:08 Wuzzy whyyyyy
18:08 Wuzzy this does not make sense
18:08 sofar whoever added force_place flag obviously wanted to make the code consistent
18:09 Wuzzy why allowing 0-255 in lua but only 0-127 in mts? this is not consistent at all
18:09 Darcidride joined #minetest-dev
18:10 sofar it keeps old code working the same way, so
18:10 Wuzzy but the docs are still lying, right?
18:10 sofar what docs?
18:11 Megaf joined #minetest-dev
18:11 Wuzzy lua_api.txt, "Schematic specifier"
18:11 Wuzzy nowhere says it anything about 127
18:12 Wuzzy It looks like the Lua API is pretending you can have values between 0 and 255 while they are actually between 0 and 127
18:12 sofar it looks correct, it just omits stating the format of the bits in the mts binary format
18:13 Wuzzy well why pretending you have a precision of 0-255 when you actually lose 1 bit of precision
18:14 Wuzzy so... y-slice probability is also between 0-127. does this mean that y-slice prob of 128-255 is invalid?
18:14 sofar https://github.com/minetest/minetes​t/blob/master/doc/lua_api.txt#L2979
18:15 Wuzzy but also:
18:15 Wuzzy 1118 * The `yslice_prob` field is a table of {ypos, prob} which sets the `ypos`th vertical slice
18:15 Wuzzy 1119   of the schematic to have a `prob / 256 * 100` chance of occuring. (default: 255)
18:16 Wuzzy ^ this is wrong
18:16 sofar off-by-one error, sure
18:16 paramat the per-node force-place encoding is confusing but the docs are correct, i had this conversation with octacian
18:16 Wuzzy no. off-by-a-factor-of-two error.
18:16 sofar not if you talk about lua table probabilities
18:16 Wuzzy the correct formula should be prob / 128 * 100, right?
18:16 sofar the internal format of MTS is not discussed here
18:17 sofar so, you can't claim it's incorrect, since it does not exist in this document
18:17 Wuzzy hmm strange
18:17 sofar all this tries to explain is the lua table side of the equation
18:17 Wuzzy does this mean a value of 255 (Lua) actually is divided by 2?
18:17 sofar at least, that is how I read it
18:18 Wuzzy i.e. 1 bit of precision is ismply thrown away
18:19 Wuzzy okay.  i think i understand it now. its actually the MTS docs (*.h) which needs clarification, then
18:20 paramat hm i didn't realise y-slice used the same encoding although it doesn't need to
18:20 sofar it's certainly not pretty, lol
18:20 Wuzzy and the Lua docs should at least hint at the fact that the probability is internally divided by 2
18:21 Wuzzy its very awkward by the way to "fake" a probability range of 0-255. just my opinion
18:21 Wuzzy by the same logic we could do a 0-100 range in Lua (percentage)
18:21 Wuzzy (not that I would suggest that)
18:22 Wuzzy but ok. its not really important.
18:22 Wuzzy esp. because the "error" is very small
18:22 paramat probability list appears confusing because it has not yet been updated to take per-node force-place into account, so you need to encode manually, that was the source of octacian's confusion
18:23 paramat that's why i added the docs at L2979 to show how to manually encode
18:25 paramat this was discussed here https://github.com/octacian/advschem/issues/1
18:26 paramat there are 128 levels of prob, but it's consistent to present that as 0-255 to modders, because before 'per-node force-place' was added prob really was 256 levels presented as 0-255
18:27 paramat hmmmm's doing
18:27 Wuzzy "'but better for consistency that you ask the mod user to enter 0-255, then divide that by 2 to get 0-127'
18:27 Wuzzy That should be done to avoid much confusion."
18:27 Wuzzy has this been done?
18:29 paramat anyway #6352 is ready, added ore density parameter, see pretty screenshots. Krock rubenwardy sfan5 sofar . ideally i'd like to merge later tonight
18:29 ShadowBot https://github.com/minetest/minetest/issues/6352 -- Ores: Add stratum ore by paramat
18:29 paramat no octacian hasn't updated yet afaik
18:29 Megaf joined #minetest-dev
18:30 Wuzzy awesome. Mese biomes, here we come!! :D
18:31 Wuzzy paramat: In GitHub posts, you can create a pretty line segment by writing "---". add more dashes to make thicker
18:40 MillersMan joined #minetest-dev
18:45 paramat ah ok
18:48 lisac joined #minetest-dev
18:59 ThomasMonroe joined #minetest-dev
19:11 quater joined #minetest-dev
19:46 Megaf_ joined #minetest-dev
20:01 RobbieF left #minetest-dev
20:17 Fixer joined #minetest-dev
20:36 RobbieF joined #minetest-dev
20:37 RobbieF left #minetest-dev
20:57 Lunatrius` joined #minetest-dev
21:00 paramat joined #minetest-dev
21:43 SilverLuke joined #minetest-dev
21:58 paramat i just discovered ore param2 can be set, but this was never documented, will add doc to PR
22:07 Lunatrius joined #minetest-dev
22:12 Xio joined #minetest-dev
22:26 paramat done
22:44 fwhcat joined #minetest-dev
23:00 paramat #6360 if anyone wants to test
23:00 ShadowBot https://github.com/minetest/minetest/issues/6360 -- Mapgen Carpathian: Reduce influence of 3D noise on mountains by vlapsley
23:18 Megaf joined #minetest-dev
23:28 paramat hm worlds start just a little too early, just a little too dark, i would be ok with the next step in brightness (1 step before full brightness)
23:34 Megaf joined #minetest-dev
23:55 YuGiOhJCJ joined #minetest-dev
23:59 basicer is there anyway to make a full screen formspec?

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