Minetest logo

IRC log for #minetest-dev, 2014-09-03

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

All times shown according to UTC.

Time Nick Message
00:12 crazyR left #minetest-dev
00:44 Zeno` Is there a plan or "roadmap" for where minetest is heading?
00:48 ShadowNinja Comments?: https://github.com/minetest/minetest/pull/1534
00:52 Zeno` https://github.com/ShadowNinja/minetest/blob/3aa6928387a862a71faa47be232534a55aa66fe8/builtin/common/serialize.lua#L134  <-- should that not np be outside of the loop so that it's not checked for every iteration?
00:53 ShadowNinja Zeno`: How?  And it's just a is_nil_or_false(np) check, so it should be very fast.
00:54 Zeno` How? If np then for ... end en
00:54 Zeno` Anyway it looks fine. I just dislike checking loop invariants (or what should be an invariant)
00:54 ShadowNinja Zeno`: I'd have to duplicate both of those for loops, for maybe a few ns more speed.
00:55 Zeno` np doesn't change inside the loop does it? /me looks again
00:55 ShadowNinja Zeno`: I wish it could be better, but code duplication is worse, and it should be just about as fast as checking for he truth value of a bool.
00:56 ShadowNinja (That is, faster than I care to optimize out if it's going to make the code any less simple)
00:56 Zeno` Yeah that's fair enough. I just don't see how np can change. *shrug*
00:57 Zeno` oh i see now
00:57 Zeno` yep, good call
00:58 ShadowNinja Good.  :-)  Keep looking though.  :-)
00:58 Zeno` Well from a C programmers perspective (not Lua or C++) it looks fine
00:59 ShadowNinja And check https://github.com/minetest/minetest/pull/1503 when you're done.  It's pretty similar. (pun intended :-) )
01:02 Zeno` Speaking of mutually recursive functions, perhaps you could review my is_even() function  http://codepad.org/lbha2sv2
01:02 Zeno` It's not particularly efficient though
01:05 Zeno` dump() looks fine as well
01:05 Zeno` is it a WIP?
01:06 Zeno` If so, the thing that jumps out at me is cleanup_path()   (which you haven't touched yet, I know)
01:10 Zeno` I don't really understand how circular reference can occur
01:11 Zeno` What scope does 'nested' have in Lua?
01:12 Zeno` if it's "function scope" then I can't see how if nested[o] can ever be true because it's passed by the recursive call
01:13 Zeno` But maybe you can explain it to me :)
01:20 zat joined #minetest-dev
01:21 ShadowNinja Zeno`: local a = {"foo"}
01:22 ShadowNinja Er, local a = {"foo"}  local b = {"bar", a}  a[2] = b
01:23 ShadowNinja dumb_dump(a) --> {"foo", {"bar", {"foo", {"bar", ...}}}}
01:23 Zeno` ahh ok
01:27 twoelk Zeno`: like this? https://forum.minetest.net/viewtopic.php?f=7&amp;t=9177
01:28 Zeno` twoelk, how did I miss that? Thanks
01:30 twoelk may be somewhat personal. most users would probably say: less lag, more evil mobs ;-)
01:31 twoelk I'd rather go with c55 though
01:35 twoelk (the views might not differ that much at the end of the day)
01:38 Zeno` It's something at least
01:49 Miner_48er joined #minetest-dev
01:52 Zeno` actually lag doesn't seem too bad
01:52 Zeno` considering the amount of cpu i'm using hehe
01:52 Zeno` oops, sorry wrong channel :/
01:55 twoelk left #minetest-dev
02:38 khonkhortisan joined #minetest-dev
02:44 Sokomine joined #minetest-dev
03:22 Sokomine joined #minetest-dev
03:23 Geppie joined #minetest-dev
03:28 Weedy joined #minetest-dev
03:28 Weedy joined #minetest-dev
03:39 zat joined #minetest-dev
03:42 Hunterz joined #minetest-dev
03:56 sol_invictus joined #minetest-dev
05:05 Geppie joined #minetest-dev
05:10 Taoki[mobile] joined #minetest-dev
05:44 Hunterz joined #minetest-dev
06:03 hmmmm agh
06:04 hmmmm i never realized until just now that it really is not possible to have VoxelManipulators cut into the middle of a block
06:06 hmmmm i also understand the whole point between the MapBlock::copyFrom -> VoxelManipulator::copyTo and vice versa thing.
06:06 hmmmm wonder if i could, or should make it cleaner.
06:52 Zeno` hmmmm, is it worth considering an equivalent of find_nodes_in_area() for vmanips?
06:52 Zeno` Yes, I know it could be done in Lua :)
06:53 hmmmm sure, if you implement it
06:53 Zeno` Yeah, I'll give it a shot
06:59 Zeno` I may have to put some thought into this. I'll yell out when I have a better idea of how it will work nicely
07:00 hmmmm it would probably be a good idea to implement it both as an api and in lua and see how they compare
07:00 Zeno` Ok, good idea
07:01 Zeno` Lua is nice for C++ "pseudocode" anyway
07:01 Zeno` That doesn't make sense... trying out things quickly I should have probably said
07:26 RealBadAngel @copyright 2006-2997 Fabien Fleutot <metalua@gmail.com>
07:26 RealBadAngel lol
07:28 Taoki[mobile]_1 joined #minetest-dev
07:44 Zeno` rofl
07:45 Zeno` I wish there was a pre-processor for Lua
07:45 deltib joined #minetest-dev
08:26 casimir joined #minetest-dev
08:51 Taoki[mobile]_1 joined #minetest-dev
08:55 crazyR joined #minetest-dev
09:20 Megaf joined #minetest-dev
09:26 BlockMen joined #minetest-dev
09:27 BlockMen going to push this in 30 min https://github.com/BlockMen/minetest/commit/9e2f8a7b6a90a4ad03848d54269eba913acfbc3c
09:33 RealBadAngel isnt ERT_FRAME_BUFFER used as default?
09:34 BlockMen yes
09:34 RealBadAngel so what for the change?
09:34 RealBadAngel force rgba format?
09:36 BlockMen force no alpha channel
09:37 BlockMen but you are right, i could remove ERT_FRAME_BUFFER
09:38 RealBadAngel and why you want the alpha to be gone?
09:39 RealBadAngel reducin the size?
09:41 BlockMen because it is a bug, https://github.com/minetest/minetest/issues/1451
09:41 RealBadAngel ah ok
09:42 RealBadAngel so im ok with the change (you may skip ERT_FRAME_BUFFER or not, it doesnt really matters)
09:43 crazyR just a though... how does this affect unix users. havent got much time now or id test it my self
09:44 crazyR sorry i missread the comments lol
10:01 RealBadAngel BlockMen, i have sorted out using of param2 MSB, for plants and other things
10:02 RealBadAngel i will rework the pull for minetest_game today
10:02 RealBadAngel https://github.com/minetest/minetest/pull/1601
10:03 RealBadAngel this reserves MSB for texture switching and removes usage of that bit from other drawtypes
10:03 Zeno` bool(param2 & 64);        ????
10:03 Zeno` is bool a c++ macro or something?
10:03 Zeno` I don't like that
10:04 Zeno` RBA: bool H_merge = ! bool(param2 & 64);
10:04 Zeno` you like that expression?
10:05 RealBadAngel macro?
10:05 Zeno` I don't even understand how that works.... is it like !!(param2 & 64);  ?
10:05 RealBadAngel its boolean
10:05 Zeno` bool(param2 & 64); <---- that's not a cast though
10:05 Zeno` it's an.... a function?
10:05 RealBadAngel param2 & 64 -> 0 or 1
10:06 Zeno` yeah
10:06 RealBadAngel (bool) makes it boolean
10:06 RealBadAngel ! negates
10:06 RealBadAngel whats ur problem then?
10:06 Zeno` you don't have (bool) (i.e. a cast) though
10:07 RealBadAngel you may like it or not, but it works as expected
10:07 Zeno` https://github.com/RealBadAngel/minetest/commit/284b33d16b290a327d42077968926a01c009e25d#diff-c03ca828c6b8a7695f2cd7e52c316a3cR777
10:07 Zeno` I've just never seen it
10:07 Zeno` is it the same as (bool)(param2 & 64) ?
10:08 Zeno` or, rather, !(bool)(param2 & 64)
10:08 Zeno` I'm not criticising you! I've, really, just never seen your syntax before and am intrigued
10:08 RealBadAngel negation is used to not let old mods use the feature
10:09 RealBadAngel or rather mess up anything
10:09 Zeno` I'm not worried about negation (that's obvious)... I'm interested in the method of casting that I've never seen before
10:09 Zeno` It'
10:09 RealBadAngel i can see nothing unusual with it
10:10 Zeno` It's not C compliant, so it must be C++
10:10 RealBadAngel its just conversion from 0-1 to boolean
10:10 RealBadAngel alsot that works for null, something
10:11 Zeno` yeah I can understand what you're saying. I'm a C programmer, not a C++ programmer (necessarily). All I can say is that is not legal C, so it must be a C++ function and I'd like to learn about it
10:11 RealBadAngel and btw, i never was coding in C
10:11 Zeno` I know :)
10:11 RealBadAngel i do code in C++ for over 20 yrs
10:11 Zeno` *I* have never encountered it
10:12 Zeno` I'm saying nothing about you... why do people always misunderstand me? :(
10:12 RealBadAngel nah, im just explainin why thats obvious for me
10:12 Zeno` but bool looks like a function
10:13 RealBadAngel i can just say i learned C++ after asm
10:13 Zeno` how... isn't that confusing?
10:13 RealBadAngel not for me
10:13 Zeno` bool(param2 & 64);            <--- that looks, to me, like a function call (or function-like macro)
10:14 Zeno` it's not a C-sytle cast anyway
10:14 * Zeno` hunts around for his C++ book... I need to know how this works :)
10:15 RealBadAngel this is def of local variable, a bool
10:15 RealBadAngel whatever inside () is casted then
10:16 RealBadAngel calculated, then casted
10:16 Zeno` no no... the entire expression is: bool H_merge = ! bool(param2 & 64);
10:17 Zeno` anyway, testing something
10:17 RealBadAngel just test bool(0) or bool(1)
10:17 RealBadAngel thats the whole point of this notation
10:21 Zeno` http://codepad.org/ifrJsqE1
10:21 Zeno` I've just never seen the notation
10:22 Zeno` so bool is a function as well as a type?
10:23 Zeno` argh
10:23 Zeno` I see... it's a constructor
10:23 Zeno` ok
10:23 Zeno` interesting
10:24 RealBadAngel i never thought bout such things in sense of being interesting, it just works ;)
10:25 Zeno` I guess
10:26 Zeno` What's wrong with the more obvious (for us silly C programmers) http://codepad.org/fhSFeqc4   ?
10:26 Zeno` http://codepad.org/dmyrE2Nx
10:27 Zeno` Anyway, I've learned something today. Not sure I like what I learned but I learned it. Thanks.
10:27 RealBadAngel it works
10:27 RealBadAngel so nothing wrong i guess
10:27 Zeno` So does the err... obvious way. I dunno
10:27 Zeno` it just confused me :( /me cries
10:28 RealBadAngel im using such casting all the time for many conditions
10:28 RealBadAngel this applies mostly to bits and existence of the pointers
10:29 Zeno` that's not casting though
10:29 RealBadAngel it is
10:29 Zeno` the "!" does however do an implicit cast
10:29 RealBadAngel if else works on booleands
10:29 RealBadAngel pointer can be null or an adress
10:30 RealBadAngel so null becomes false, an address true
10:30 Zeno` yep, same as C
10:30 RealBadAngel same goes for bits
10:30 Zeno` it's either 0 or !0
10:31 Zeno` I know how bit masking etc work: https://github.com/Zeno-/snippets/blob/master/Esieve.c
10:31 Zeno` I... it doesn't matter
10:31 Zeno` if that's something that C++ programmer use, then *shrug*
10:33 RealBadAngel hehe
10:33 Zeno` more bit stuff: https://github.com/Zeno-/snippets/blob/master/rand/randmt.c
10:33 Zeno` I really haven't seen that C++ "idiom" before. Thanks for showing me
10:33 Zeno` I still don't like it though hehe
10:34 RealBadAngel every language out there have own ways i think
10:36 Zeno` yeah
10:53 proller joined #minetest-dev
11:04 Zeno` RBA?
11:04 Zeno` Would it be common in C++ to do something like: http://codepad.org/Kr32ePz9
11:07 Zeno` If not, then I humbly suggest your bool version of that int version is confusing
11:10 ImQ009 joined #minetest-dev
11:12 Kray what are you trying to do
11:14 RealBadAngel Zeno`, yes it is common
11:14 Zeno` really? But why? Actually, I don't wanna know :)
11:14 RealBadAngel a type is being effictively casted onto another
11:15 Zeno` that's not a cast though... it's invoking a constructor
11:15 RealBadAngel if you want a rounding at the same time you should add +0.5 inside
11:15 RealBadAngel i treat it as one
11:15 RealBadAngel casting is a wrong word maybe
11:15 Kray you are casting a double to an int
11:15 Kray casting performs no rounding
11:15 RealBadAngel conversion seems better
11:15 Kray it just discards the decimal part
11:16 RealBadAngel but int(value + 0.5) does the rounding
11:16 Zeno` I just don't understand why you just wouldn't do   int a = 4.8;
11:16 Kray why would you do that
11:16 Kray you can't store 4.8 in an integer
11:16 Zeno` or, to be pedantic,   a = (int)4.8
11:16 Zeno` Kray, look at the paste
11:16 Kray i looked
11:17 RealBadAngel (int)4.8 would result with value = 4
11:17 Zeno` It's simplified
11:17 Zeno` yes it would, and should
11:17 Zeno` so why confuse the matter by doing   int a = a(4.8); ?
11:17 RealBadAngel int (4.8 + 0.5) will do the rounding
11:17 RealBadAngel 4.8 is the variable here
11:18 john_minetest joined #minetest-dev
11:18 Zeno` err, sorry... int a = int(4.8)
11:18 Zeno` I don't understand, honestly, how that is useful
11:18 RealBadAngel whatever is inside () have own types
11:18 Kray you are invoking int constructor
11:19 Zeno` but why invoke a constructor?
11:19 Kray in practise that's the same as int a = (int)4.8
11:19 RealBadAngel constructor makes it all converted to desired type
11:19 Zeno` when   a = 4.8 + 0.5 does the exact same thing?
11:19 Kray it doesn't
11:19 Zeno` it does
11:20 Kray int a = 4.8 + 0.5 doesn't do the same thing as int a = int(4.8)
11:20 RealBadAngel 4.8 would become 4, 0.5 0
11:20 Zeno` it does
11:20 Zeno` try it
11:20 RealBadAngel so 4 + 0 = 4
11:20 RealBadAngel not 5
11:21 Zeno` the RHS of the expression is evaluated first, then cast (implicitly) to int by the assignment
11:22 Zeno` http://codepad.org/uxqynG8D
11:22 Zeno` ok, C++ doesn't explicitly convert
11:22 Zeno` I still see no need to invoke the constructor
11:23 Kray the constructor is exact same operation as typecast
11:23 Kray there is no actual constructor for primitive types
11:23 Kray that's just another syntax
11:24 Zeno` true
11:24 RealBadAngel i really dont see here any problem
11:24 Zeno` There is no problem RBA
11:25 Zeno` I'm just saying I was confused by it
11:25 RealBadAngel then get used to it :)
11:25 Zeno` Coming from a C (mostly) background
11:25 Zeno` Yeah, I might
11:25 Zeno` Or I might not
11:25 Zeno` lol
11:25 RealBadAngel c++ is way better
11:25 RealBadAngel it can overload everything
11:26 RealBadAngel its not so strict as c is
11:26 Kray in what way is it a good thing
11:27 RealBadAngel coding language has to be flexible imho
11:27 RealBadAngel and c++ is
11:30 Zeno` I dunno... I like the C way
11:30 Zeno` the rules of promotion (or demotion) are simple
11:30 Zeno` *shrug*
11:31 Zeno` hey don't get me wrong, I LOVE certain parts of C++
11:32 Zeno` and write C in a kind of "object oriented" way anyway
11:33 Zeno` some parts just seem insane (to me) though lol
11:34 Zeno` well, for embedded programming the C-style strings make more sense
11:35 Zeno` And I suppose when C was first defined it made more sense in general as well
11:36 BlockMen sfan5, https://github.com/minetest/minetest_game/pull/309 ?
11:40 sfan5 BlockMen: looks good
11:42 BlockMen sfan5, can you merge then or should i do later?
11:46 Taoki[laptop] joined #minetest-dev
12:20 PilzAdam joined #minetest-dev
12:26 RealBadAngel PilzAdam, i do have a question for ya, are you still active dev?
12:28 Zeno` RealBadAngel, you've never asked *me* that
12:31 kahrl joined #minetest-dev
12:35 kahrl so why is LuaPseudoRandom so much slower than math.random? is it because of the safety checks?
12:40 Zeno` math.random calls libc rand() so I guess it depends on what rand() does. In Linux, last time I checked, it uses hardware intrinsic calls (as well as /dev/random?) so it's much faster than it would first appear. I.e. LuaPseudoRandom() probably does some kind of lagged Fibonacci generator or linear congruential generator so even though it may seem simpler it may not be because it's not a part of cpu microcode
12:40 Zeno` I might actually look at that tomorrow because it's quite interesting
12:41 Zeno` I'll have to download latest glibc as well
12:42 Zeno` last time I checked it's a bit like why memcpy() is much faster than the same O(n) loop implemented as a normal loop
12:43 Zeno` (the CPU intrinsic call is of course O(n) as well, it's just so much faster because it's done via microcode... also memcpy does a small "warmup" to align)
12:43 Zeno` So it's probably similar
12:44 Zeno` I could be wildly wrong of course, but this is my guess
12:44 Zeno` and it's probably right :P
12:47 Zeno` It's also somewhat related to the perhaps counter-intuitive result that on modern processors inserting a value into a vector (array) is faster than inserting into a linked list
12:49 kahrl wait, where does math.random use vectors or lists?
12:49 Zeno` It doesn't
12:50 kahrl (except the lua stack)
12:50 kahrl ahh
12:50 Zeno` but the reasoning is the same... modern processors do things at the cpu-level rather than ... a higher level
12:50 kahrl I think the many branches are not healthy for LuaPseudoRandom's speed, but what you said could play into it too
12:51 Zeno` https://www.youtube.com/watch?v=YQs6IC-vgmo
12:51 kahrl although math.random converts the result of rand() to float... shouldn't that be extra slow?
12:52 Zeno` not sure
12:52 kahrl s/float/double even
12:53 Zeno` depends how it converts to double I suppose... I really don't know
12:54 Zeno` It's worth trying to find out though :)
13:04 BlockMen joined #minetest-dev
13:48 proller joined #minetest-dev
13:59 proller joined #minetest-dev
14:13 hmmmm joined #minetest-dev
14:35 proller joined #minetest-dev
14:41 casimir joined #minetest-dev
14:43 PenguinDad joined #minetest-dev
14:55 Hunterz joined #minetest-dev
15:02 Hunterz1 joined #minetest-dev
15:19 rubenwardy joined #minetest-dev
15:32 Calinou joined #minetest-dev
15:58 zat joined #minetest-dev
16:01 init joined #minetest-dev
16:06 Hunterz joined #minetest-dev
16:09 Gethiox joined #minetest-dev
16:09 Robby joined #minetest-dev
16:10 hax404 joined #minetest-dev
16:19 rubenwardy joined #minetest-dev
16:21 Mikeonline joined #minetest-dev
16:23 Mikeonline is it possible to rename the directory where minetest was compiled after compilation?
16:25 hmmmm it is!
16:27 Mikeonline hmmmm: so this cant be the problem why minetest crashes
16:27 hmmmm I saw your backtrace in #minetest - no, that has absolutely nothing to do with it.  that is a real bug
16:27 hmmmm ...it happens, man.
16:27 hmmmm is it consistently happening for you?
16:28 Mikeonline http://pastebin.com/9ATwR3s2
16:28 Mikeonline thats the debug.txt
16:28 Mikeonline ah yes you saw it
16:28 Mikeonline the server crashed many times while we worked in this earea
16:29 Mikeonline sometimes it crashed while i was setting positions with worldedit. sometimes while digging. i dont know when it happens exactly.
16:29 Mikeonline but i cant reproduce it
16:29 CraigyDavi` There seems to be a new issue...If someone dies and leaves the game without clicking the respawn button when they rejoin and there is a formspec upon join then that will close the death formspec too and they will be left with no health
16:30 CraigyDavi` Maybe I should have phrased that better
16:32 Mikeonline hmmmm: do you have any clue what kind of error this is? there is an assertion checking if something is as desired.
16:32 hmmmm i can see the error, but i can't tell where it's happening and why
16:34 Mikeonline i hoped it would be a bug because i renamed the directory. but so there is no clue whats up
16:34 hmmmm no, this has absolutely nothing to do with that
16:34 Mikeonline and the player was playing alone on this server
16:35 Mikeonline do you know which values this assertions checks?
16:35 Mikeonline do you know if this could be fixed from 0.4.10 to git?
16:36 Mikeonline if i would upgrade from stable to dev
16:40 hmmmm no, it won't be fixed.
16:40 hmmmm Mikeonline, you might want to tell sapier about this once he comes back online.
16:41 sapier joined #minetest-dev
16:41 hmmmm that was quick
16:41 Mikeonline ok
16:42 Mikeonline oops i closed a pull request on github accidently. can i undo this?
16:42 sapier ShadowNinja: I have to read a little bit more about those obb files my first impression is they're not exactly what we need. Your suggestion about using the cache is reasonable I didn't know about that beeing possible.
16:42 Mikeonline ah there is :)
16:42 Krock joined #minetest-dev
16:42 Mikeonline sapier: i should contact you about an minetest server crash
16:42 Mikeonline sapier: http://pastebin.com/9ATwR3s2
16:43 sapier SharedBuffer, aren't thoes the buffers I have been told noone will ever use them from different threads?
16:44 ShadowNinja sapier: It looks like OBB files are really difficult to manage though, unless I'm missing some function it takes about 5 lines of code just to build the path to the main OBB.
16:44 hmmmm sapier, it's related to your connection sending code
16:45 sapier I thought so they make heavy use about them ... a gdb backtrace could bring more light into dark, or a way to reproduce it
16:45 sapier ShadowNinja: I assume you meant obb files to replace our copy of textures & co am I right about that?
16:45 hmmmm you share buffers all the time between ServerThread and ConnectionSendThread
16:46 sapier hmmm not exactly they're serialized through a single queue
16:46 ShadowNinja sapier: Yep, the OBB would contain everything under the Minetest root but things like /bin and /cache.
16:47 ShadowNinja sapier: They might not be mutable though...
16:47 sapier but how to add texturepacks or even download mods if we do it that way?
16:48 ShadowNinja sapier: I don't know.  Dig around for a place where we can store mutable cross-user data.
16:49 Taoki[mobile] joined #minetest-dev
16:49 ShadowNinja sapier: Things like worlds/ ($PATH_USER)will be in getFilesDir or so.
16:49 sapier can you explain to me what you mean with "mutable cross-user data" ?
16:50 ShadowNinja (That is, somewhere like /storage/emulated/0/Android/data/com.minetest.minetest/files)
16:51 ShadowNinja sapier: Hmmm, we can make $PATH_SHARE = getObbDir().
16:51 ShadowNinja share doesn't need to be writable.
16:51 sapier as I said I have to read more about what obb can do and what can't
16:51 sapier in general I'm for using as much of android ecosystem as possible
16:52 sapier and I'm sure I missed a lot of things as this was my first android port ;-)
16:52 ShadowNinja Yes, it might be a little ugly.  Also, splitting cache/ on Android and PC (FHS) would be good.
16:53 sapier As I said cache is the thing I do fully agree with you if we have that option on android we should use it
16:53 ShadowNinja You'll have to pass PATH_{SHARE,USER,CACHE} to Minetest.
16:54 sapier obb ... well I just don't have enough knowledge about what is possible and what ain't
16:54 ShadowNinja sapier: Reading up on OBBs have me a headache, but it seems like they're the *right* way to do this.
16:55 sapier I'm not sure if "the right way" is always the right way for us too, if it was we wouldn't do a c++ app on android but rewrite it in java ;-)
16:55 ShadowNinja When looking for mods/TPs/etc does MT check SHARE and USER?
16:56 sapier I don't know especally that lookup is quite inconsistent
16:56 ShadowNinja sapier: No, pure java isn't the right way, it's far too slow (even MC mobile is written in C++.
16:57 sapier don't tell this to google ;-)
16:58 sapier but that crash is way more important for the moment
16:59 ShadowNinja Google doesn't love Java, they just use it for Android because of portability (or so it seems).  They use C++/C and Python a lot for other things.  What crash?
17:00 sapier that one Mikeonline reported, sadly information isn't very helpfull (at least by now)
17:01 ShadowNinja sapier: Tell me if you find a complete/mostly complete usage example of OBBs, including mounting them.
17:01 sapier I'll do but I have to do some other things first
17:03 ShadowNinja sapier: Once you're done, Android should run init.lua with INIT instead of running mainmenu/init_android.lua (it misses some important things otherwise).
17:21 PilzAdam https://travis-ci.org/minetest/minetest/builds/34272556 <- looks bad, doesn't it?
17:21 BlockMen PilzAdam, already on it
17:21 BlockMen https://github.com/BlockMen/minetest/commit/cf3fce22d7ead202dfb54d1e756254e69693e142
17:22 BlockMen any comments or can i push it?
17:22 sfan5 BlockMen: see comment
17:23 BlockMen sfan5, you mean raw_image
17:23 sfan5 yes
17:23 sfan5 image too
17:23 sfan5 you create it and then just assume it's not NULL
17:24 SoniEx2 joined #minetest-dev
17:25 sapier ShadowNinja: no I will not run init.lua on android because it's crazy enough to always have to fix the broken compiler optimization I don't need another branch for a file to be able to debug the andoid menu on pc version
17:25 sapier that's why we have a setting to specify your own menu
17:26 sapier if you're gonna implement some fancy new stuff again make it work for this usecase too
17:26 sapier I'm not gonna fix it this time
17:34 BlockMen ok, going to push this now https://github.com/BlockMen/minetest/commit/f9742b109f7a0f30378a849f907eb38101b81854
17:35 sapier wait
17:36 sapier snprintf(filename, 256
17:36 sapier use snprintf(filename,sizeof(filename)
17:38 sfan5 sapier: sizeof(char*) is not 256
17:38 sfan5 or irr:c8
17:38 sfan5 BlockMen: looks good
17:39 hmmmm lol
17:39 hmmmm sfan5, did you miss that filename is an array?
17:39 sfan5 does sizeof work that way?
17:40 hmmmm how could you be a developer so long and not know
17:40 sfan5 you are confusing me
17:41 sfan5 hmmmm: a quick google says sizeof(n) is the size of n in bytes
17:41 sfan5 would actually be correct in that case since irr:c8 is a byte
17:41 hmmmm no, it's the size in chars
17:41 sfan5 chars are bytes
17:42 hmmmm that so happens to be the case on common computing platforms
17:42 hmmmm in the general case, however, that is incorrect
17:43 sfan5 umm
17:43 sfan5 what about this? http://stackoverflow.com/a/2215454
17:43 hmmmm in C and C++, a character is defined to be the smallest indidually addressable unit of memory.
17:43 sfan5 IIRC sizeof(char) is guaranteed to be 1
17:43 hmmmm sure, that's true
17:43 hmmmm but what is the meaning of the number returned by sizeof()?
17:44 sfan5 the meaning?
17:44 hmmmm the meaning.
17:44 sfan5 I don't get what you mean.
17:44 hmmmm what does the "sizeof" operator give you
17:45 sfan5 size of the element in chars, bytes
17:45 sfan5 or*
17:45 RealBadAngel http://en.cppreference.com/w/cpp/language/sizeof
17:45 sfan5 (which are practically the same)
17:45 hmmmm not 'or'
17:45 hmmmm and they're not practically the same as I just explained
17:45 sfan5 wat
17:45 sfan5 a byte is the smallest indidually addressable unit of memory
17:46 hmmmm since the 1980s it's been defined as an octet
17:46 sfan5 *sigh*
17:46 hmmmm the times are a changing
17:47 sfan5 I am not the type of person that would say a byte is not strictly 8 bits because some standard defintion says it may be >= 8 bits
17:48 hmmmm the standard definition in C says that chars must be >= 8 bits
17:48 sfan5 I am aware
17:48 hmmmm again, it says "char", it does not use the term "byte"
17:48 hmmmm in fact I don't think the C spec says "byte" anywhere
17:49 RealBadAngel "Both versions return a constant of type std::size_t. "
17:49 RealBadAngel std::size_t can vary
17:50 sfan5 "1) returns size in bytes of the object representation of type."
17:50 hmmmm RealBadAngel:  sizeof is a unary operator, not a function.  it doesn't 'return' a value, the expression with sizeof applied is the result of the operation
17:50 hmmmm sfan5, that is a quote from some scrappy website, not the official C++ spec
17:50 sfan5 i know
17:51 hmmmm so I'm saying although they got the gist of it, it's not technically 100% correct
17:51 sapier sizeof() gives you the exact size in bytes of the object you specify no matter of which type it is
17:51 hmmmm god dammit sapier
17:52 hmmmm it gives you the size in chars!
17:52 Krock What the fuck? current minetest build destroys Luamapgens
17:52 hmmmm not bytes, chars!
17:52 sfan5 I was trying to differentiate between what sizeof(foo) returns (as a type) and what sizeof(foo) returns (as a value)
17:52 sapier well if char is defined to be 8 bit that's identical ;-)
17:52 hmmmm sfan5:  sizeof does not return anything, in the same manner as 5 + 4 doesn't return anything
17:52 hmmmm the expression is the result of an operation with sizeof applied
17:53 sfan5 hmmmm: s/returns/evaluates to/
17:53 hmmmm yes :)
17:53 sfan5 sizeof() looks like a function
17:53 sfan5 for me it returns stuff
17:53 hmmmm it does, doesn't it?
17:53 hmmmm you don't need the parentheses if that makes you feel any better
17:53 hmmmm it's like doing -(x)
17:53 hmmmm sizeof(x)
17:53 hmmmm you can just write -x
17:53 sfan5 I'm aware I don't need that
17:54 hmmmm Krock:  anyway, please elaborate...
17:54 Krock hmmmm, screenshots coming
17:54 sfan5 anyway
17:54 sfan5 what were we doing?
17:54 sfan5 BlockMen: did you merge it yet?
17:54 sapier sizeof is usually evaluated by preprocessor
17:54 BlockMen sfan5, no
17:55 sfan5 sapier: always, you can't evaluate sizeof in runtime
17:55 sfan5 sapier: always, you can't evaluate sizeof in runtime
17:55 sfan5 oops
17:55 hmmmm sfan5, you can have expressions that aren't evaluated by the language preprocessor that aren't evaluated at runtime
17:55 hmmmm such as the result of 5 + 4
17:56 hmmmm preprocessors won't touch that, but you can't modify the value of the expression "5 + 4" on runtime
17:56 sfan5 I'm talking about sizeof not any expression
17:56 sapier I just wanted to be sure there's not someone writing his own "sizeof" function ;)
17:57 sfan5 sizeof is a keyword, you can't create a function with that name
17:57 sfan5 probably not a #define either
17:57 sapier a regular sizeof is evaluated by preprocessor only true, and in this special case it's usage will prevent snprintf from becoming inconsistent to the real buffer size
17:57 hmmmm i'm sure there are compilers out there that will let you #define it
17:57 hmmmm heh
17:57 sapier #define + - ... and have fun ;-)
17:57 Krock hmmmm, http://imgur.com/QdjZ3rl http://imgur.com/zOrcc07
17:58 hmmmm Krock, I'm not sure how they're supposed to look
17:58 Krock hmmmm, they should equal
17:58 Krock older build is how it would look like
17:58 hmmmm ah
17:59 hmmmm well that's very strange
17:59 Krock it's reproduceable
17:59 hmmmm could i see your code?
17:59 Krock hmmmm, https://github.com/SmallJoker/yappy ?
18:00 hmmmm your code would be faster if you had the content ids in local variables and not in a table btw
18:00 Krock hmmmm, but that's not the theme
18:02 sfan5 Krock: s/theme/topic/
18:02 hmmmm hrmm
18:03 Krock sfan5, translate that stuff and you get the same words
18:03 BlockMen im going to push my fix now (with sizeof())
18:03 sfan5 translate.google.com does not replace a dictionary
18:03 hmmmm lemme download and try out your mod
18:04 PenguinDad Krock: which theme do you use?
18:04 Krock PenguinDad, john smith
18:05 Krock hmmmm, reproduceable with any lua mapgen - the chunks get created and disappear one server step later
18:07 hmmmm krock, what other mods do you have activated?
18:07 Krock hmmmm, unified inventory
18:07 Krock nothing else
18:07 hmmmm well that's very strange because it's working for me
18:07 Krock using dummy backend
18:08 hmmmm gosh, that might be the issue
18:08 Krock hmm? I thought it's cross-backend-compatible
18:10 hmmmm i don't know, but it might be
18:11 hmmmm are you using master?
18:11 Krock yup.
18:11 hmmmm well this is a lot harder because i'm not having your issue
18:11 Krock compiled about 20 minutes ago
18:11 PenguinDad hmmmm: it might also be a windows only bug
18:12 Krock All I can say, MGv6 generates well on dummy
18:12 Krock might be a VM problem
18:13 hmmmm can you find the specific commit that caused this?
18:13 Krock hmmmm, it takes me 30 minutes to compile it, so I won't check every single
18:14 hmmmm you can bisect the commits...
18:14 Krock bisect?
18:14 hmmmm start with the last commit you were sure things worked fine
18:15 hmmmm if the problem isn't there as you expect, test the commit in the middle between that commit and the most recent
18:15 sapier does anyone know a way to read the cursor image in irrlicht?
18:15 hmmmm if the problem is there, then look at the middle commit between that one and the least recent one
18:15 hmmmm if the problem isn't there, then look at the middle commit between that one and the most current
18:15 hmmmm repeat ad nauseam
18:16 Krock hmmmm, https://github.com/minetest/minetest/commit/e66bb9b8 and newer
18:17 hmmmm well okay, then try 3fa4f782d90dac0d800251a9ab0f0afb9d32560c
18:18 Krock hmmmm, and compile again? >.<
18:18 hmmmm yes
18:20 Krock I did "git.exe reset --mixed 3fa4f782d90dac0d800251a9ab0f0afb9d32560c", notify if that's wrong
18:21 hmmmm that should be fine
18:22 Krock mhm msbuild doesn't notice the changes :/
18:22 hmmmm *shrug* do --hard then
18:23 khonkhortisan joined #minetest-dev
18:28 Krock grr... can't change it back
18:28 hmmmm then rebase upstream/master
18:29 Krock great. I can't find any git shell *searchs one*
18:34 Krock okay. Test results come in 30 min
18:34 PenguinDad Krock: I can't reproduce it either
18:35 Krock PenguinDad, try windows
18:42 PenguinDad Krock: too expensive
18:43 Krock PenguinDad, ReactOS, then
18:56 Krock hmmmm, it works with the commit 3fa4f782d90dac0d800251a9ab0f0afb9d32560c
18:56 Krock I take it back. It works for ~6 chunks and generates air out there
18:57 Krock screenshot coming
18:58 Krock hmmmm, http://imgur.com/sN1zB2n
18:59 Krock hmmmm, seems like it got worse with the commits after it
19:05 Krock hmmmm, it always happens when stuff is already generated in new areas
19:05 Krock hmmmm, it seems like the mapgen skips modified mapblocks
19:06 Krock exactly. they all have gravel inside
19:07 BlockMen joined #minetest-dev
19:22 alexxs joined #minetest-dev
19:24 hmmmm Krock:  so it works after 3fa4f78?
19:28 NakedFury joined #minetest-dev
19:41 iqualfragile joined #minetest-dev
19:55 proller joined #minetest-dev
20:17 Miner_48er joined #minetest-dev
20:23 proller joined #minetest-dev
20:46 proller joined #minetest-dev
20:48 Amaz joined #minetest-dev
20:49 ImQ009 joined #minetest-dev
21:10 RealBadAngel im suprised how simple things are complicated in code
21:11 RealBadAngel to pass pointed thing pos to mapblock_mesh one have to modify > 10 files
21:11 kahrl huh
21:11 kahrl why would you want to do that
21:12 RealBadAngel i need that pos in animation
21:12 kahrl oh, not on mesh creation, got it
21:12 RealBadAngel same way as crack pos is passed
21:13 kahrl yeah
21:13 RealBadAngel im making highlighting of selected node
21:14 RealBadAngel instead of selection boxes
21:14 sapier can you please ensure this works on 3d mode too ... selectionboxes have been ugly enough ;)
21:14 proller remaking mesh for it - very bad idea
21:14 kahrl how can you do that with just animation?
21:15 RealBadAngel yes, at least i think so
21:15 RealBadAngel i can apply brightness (or contrast) to vertex colors
21:15 proller http://irrlicht.sourceforge.net/forum/viewtopic.php?t=44968
21:15 RealBadAngel so effect will be pulsating node
21:16 kahrl but some vertices will belong to multiple nodes
21:16 RealBadAngel but when i get vertices of the node i can simply copy them
21:16 RealBadAngel i did that for cracks already
21:17 RealBadAngel i do have cracked ones in separate list of vertices
21:18 RealBadAngel so i dont need to overlay cracks on original textures anymore
21:18 RealBadAngel i want the same for selections
21:18 kahrl oh, so you're basically drawing the node twice, with the second time a bit larger than the first so there is no Z-fighting?
21:19 RealBadAngel yes, a slight offset
21:19 kahrl I see
21:19 kahrl I think the other voxel actually draws its cracks the same way (or used to)
21:19 RealBadAngel got one problem with that
21:19 kahrl because they don't have nore's camera repositioning code, sometimes the cracks disappear when you're far away from 0,0,0 ;)
21:19 RealBadAngel cracks are displayed complete
21:20 khonkhortisan joined #minetest-dev
21:20 RealBadAngel this is visible when "cracking" the plants especially
21:20 kahrl other voxel game*
21:20 kahrl RealBadAngel: yeah, I was wondering about that
21:20 RealBadAngel still lookin for solution to that
21:21 RealBadAngel what i can notice, this approach is way faster
21:22 RealBadAngel no extra textures generated on the fly
21:22 RealBadAngel crack, or the halo effect wont need original texture at all
21:23 kahrl I think this problem is actually why all plants in the other voxel game break on punch immediately and don't crack
21:23 RealBadAngel they avoided the problem this way
21:23 RealBadAngel i had another idea
21:24 RealBadAngel drop the cracks completely and use just particles
21:24 RealBadAngel that could be major speed up for meshes
21:24 kahrl no, people want to see how far they progressed in digging a node
21:25 RealBadAngel at least it could be a setting then
21:25 kahrl yeah, could be done
21:25 kahrl makes sense for slow computers
21:26 RealBadAngel if you will read animate section of mesh, its a bottleneck by now
21:26 kahrl really?
21:26 RealBadAngel yes, it still generates textures there
21:26 kahrl when I wrote the first version of that, I was actually surprised that the game ran smoothly even if all meshes were animated on every frame
21:26 RealBadAngel and is causing rising memory usage
21:27 kahrl (that was before the calling code on animated some of the meshes each frame)
21:27 RealBadAngel basically when you dig new node, code has to generate crack textures for that node
21:27 RealBadAngel more you dig, more textures are generated
21:28 RealBadAngel on servers with thousands of nodes....
21:28 RealBadAngel guess what happens ;)
21:29 RealBadAngel if crack animation is 10 frames, for each face you have 60 different textures
21:29 RealBadAngel *each node
21:29 kahrl I suppose one could figure out a way to delete unused crack textures
21:29 kahrl not easily of course
21:30 RealBadAngel creating and deleting on the fly is not a solution
21:30 RealBadAngel to create the texture takes too long
21:30 kahrl not on the machines I tested it on
21:30 RealBadAngel even VanessaE noticed that
21:31 RealBadAngel she has kinda highend box
21:33 RealBadAngel problem can be more visible and noticeable for texture packs >16px
21:33 RealBadAngel and we are used to such ones
21:33 RealBadAngel 256x in my case, with normal maps
21:34 RealBadAngel here multiplying the textures becomes a real problem
21:34 RealBadAngel VE box is 16gb, sometimes it is not enough
21:36 kahrl what if you use the offset solution for most nodes, and the texture creation solution for things with tranparency, such as plants?
21:39 kahrl I do admit that most of the texture related code I write is optimized more for 16px, not HD (just because I don't feel the latter doesn't fit this type of game)
21:39 kahrl see e.g. the extrusion code
21:39 kahrl gah remove one of those negations :P
21:51 RealBadAngel that could work
21:51 RealBadAngel so only plants like could be slower
21:55 crazyR joined #minetest-dev
22:01 RealBadAngel but makin plants instant diggable is also a solution
22:01 RealBadAngel well, workaround rather ;)
22:01 kahrl well, you can't force that on every game and mod out there
22:01 RealBadAngel yup
22:03 RealBadAngel that could be easily done in shaders
22:15 proller joined #minetest-dev
22:24 sapier left #minetest-dev
22:28 BlockMen left #minetest-dev
22:35 Zeno` joined #minetest-dev
22:39 proller joined #minetest-dev
23:01 eeew joined #minetest-dev
23:24 kaeza joined #minetest-dev
23:38 Miner_48er joined #minetest-dev
23:44 CraigyDavi`` joined #minetest-dev

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