Minetest logo

IRC log for #minetest-dev, 2013-09-28

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

All times shown according to UTC.

Time Nick Message
00:18 OWNSyouAll joined #minetest-dev
00:18 werwerwer joined #minetest-dev
00:48 Kamski joined #minetest-dev
00:49 k_hearn Hello I would like to contribute, but I am a bit of a gamedev noob
00:50 k_hearn I am proficient in C++ and know some Lua to get started
00:51 OWNSyouAll joined #minetest-dev
00:59 NakedFury you can help with any of the issues that arent resolved yet. thats what the others might say
01:00 k_hearn Is there a specific build/version i need?
01:00 NakedFury or if you feel adventurous create any new feature or mechanic. if it works okay and doesnt introduce bugs it will get added.
01:00 NakedFury the latest I guess
01:01 k_hearn Okay so theres no dev specific version? All comes in same package?
01:03 k_hearn Irrlicht? xD I just abandoned Irrlicht for raw OpenGL because it seemed nobody used Irrlicht lol
01:03 NakedFury the latest dev version is the most used version by all I think
01:04 NakedFury some users make daily builds if something was added, fixed, removed, etc
01:04 NakedFury so we are all kept very up to date in that
01:07 k_hearn 0.4.7 is latest?
01:07 k_hearn (Havent played minetest in a while lol)
01:07 NakedFury same here
01:08 NakedFury classes have me occupied
01:09 NakedFury yeah sfan latests build is 0.4.7
01:09 k_hearn What area of programming is your specialty?
01:09 NakedFury non
01:09 NakedFury hopeful perhaps
01:09 NakedFury hopeful that one day I will learn one of them
01:10 k_hearn Newer game programmer like myself? (I learned some C++ and a GL first)
01:10 NakedFury I can do some basic lua for this game and edit it to satisfy my needs but nothing super fancy
01:13 k_hearn So LUA was your first programming language?
01:13 NakedFury yes
01:14 NakedFury but still at a lvl 1 introduction level
01:14 NakedFury I just want to learn so many of them that I end up not reading up on any of them on my free time
01:15 k_hearn Similar to myself, but I always do manage to learn quite a lot. I want to learn all of the languages and their APIs quite often
01:15 k_hearn What kind of work do you want to do with programming?
01:16 NakedFury just games. find a game I enjoy like minetest and contribute to it in coding or mods.
01:17 NakedFury studying architecture but learning a programming language can help in that job too
01:17 k_hearn Then I would highly recommend going with C++, LUA is a good start for extending your C++ code
01:18 k_hearn (Not having to recompile EVERY TIME you make an edit is really useful for when you're in the flow
01:32 kaeza joined #minetest-dev
01:34 harrison recompiling is almost instantaneous if the language is LL1
01:34 harrison which c and c++ are not
01:35 harrison i recompile code modules ctrl-s ctrl-h as i code, every line or so, so the compiler flags any errors
01:48 prestotron55 joined #minetest-dev
01:49 k_hearn Impossible in a big C++ project with 5-10 min compile times lol
01:50 k_hearn Which is why scripting languages are so helpful, you can see the results of your code just by re-running the app, or often without even re-running
01:54 k_hearn Where can I find up to date compiling instructions for windows?
01:56 ShadowNinja k_hearn: Windows installation involves cross-compiling from Linux. Although I beleive BlockMen uses MinGW.
01:58 k_hearn CodeBlocks should work?
01:59 k_hearn (Codeblocks using MinGW)
02:05 diemartin joined #minetest-dev
02:07 OWNSyouAll_DESKT joined #minetest-dev
02:18 OWNSyouAll joined #minetest-dev
02:19 kaeza joined #minetest-dev
02:41 OWNSyouAll_DESKT joined #minetest-dev
02:46 k_hearn joined #minetest-dev
02:47 k_hearn Had to uninstall a virus lol
02:47 k_hearn Bck
02:58 kaeza joined #minetest-dev
03:17 celeron55 joined #minetest-dev
03:21 diemartin joined #minetest-dev
03:57 hmmmm joined #minetest-dev
04:52 OWNSyouAll_DESKT joined #minetest-dev
05:22 deltib joined #minetest-dev
05:32 OWNSyouAll_DESKT joined #minetest-dev
06:16 n4x joined #minetest-dev
06:18 Krock joined #minetest-dev
06:21 proller joined #minetest-dev
07:34 ImQ009 joined #minetest-dev
07:38 Calinou joined #minetest-dev
08:06 kaeza joined #minetest-dev
08:10 darkrose joined #minetest-dev
08:28 Jordach joined #minetest-dev
09:14 Akien joined #minetest-dev
09:16 neko259 joined #minetest-dev
10:19 nore joined #minetest-dev
10:30 Krock joined #minetest-dev
10:51 PilzAdam joined #minetest-dev
13:08 hmmmm joined #minetest-dev
13:20 PilzAdam https://github.com/minetest/minetest/pull/940
13:20 PilzAdam I just noticed how helpful that is while trying to help someone with font-issues
13:31 kahrl PilzAdam: looks fine; maybe USE_LEVELDB too?
13:34 PilzAdam dunno, it gets oboslete when we move to libmtmap
13:35 PilzAdam but we should add LuaJIT
13:36 kahrl there's no USE variable for LuaJIT though
13:38 kahrl (it could be added easily)
13:38 PilzAdam should CMAKE_USE_LUAJIT be added too?
13:39 kahrl not yet, only when we need it
13:39 Ristovski joined #minetest-dev
13:39 kahrl (e.g. USE_GPROF is also only used in cmake and not cmake_config.h)
13:40 PilzAdam updated the pull request
13:41 PilzAdam oh, I wrote LUAJIT instead of USE_LUAJIT
13:41 kahrl was about to ask about that ;)
13:42 kahrl otherwise looks good
13:43 PilzAdam I merge it then
13:46 nore should 6d facedir be added to slabs and trees in minetest_game?
13:46 PilzAdam there is a pull request about slabs
13:46 nore and trees?
13:47 nore btw, will https://github.com/minetest/minetest_game/pull/200 be merged?
13:47 kahrl before adding it to default trees the performance impact on a newly generated world should be measured imo
13:49 nore kahrl, why? Why could it decrease performance?
13:49 PilzAdam https://github.com/minetest/minetest/pull/915 – I prefer my version, though
13:50 kahrl nore: I haven't looked a mapblock_mesh.cpp in a while but it used to have some special handling for facedir
13:50 kahrl mesh making is one of the main bottlenecks in the engine
13:52 kahrl actually, I guess there's no difference
13:52 kahrl it simply calls getFaceDir which returns 0 for non-facedir nodes
13:52 nore yes, so no difference
13:52 kahrl and then does the same thing whether a node has facedir or not
13:52 VanessaE kahrl: s/one of//; s/necks/neck/
13:52 VanessaE :)
13:53 kahrl VanessaE: I think you'd agree that the non-curl media download is another ;)
13:53 VanessaE um, definitely so :P
14:18 OWNSyouAll_DESKT joined #minetest-dev
14:19 ImQ009_ joined #minetest-dev
14:22 diemartin joined #minetest-dev
14:40 OWNSyouAll_DESKT joined #minetest-dev
15:07 OWNSyouAll_DESKT joined #minetest-dev
15:25 Zeitgeist_ joined #minetest-dev
15:32 OWNSyouAll joined #minetest-dev
15:51 Ritchie joined #minetest-dev
15:56 Weedy joined #minetest-dev
15:56 Weedy joined #minetest-dev
16:09 ImQ009 joined #minetest-dev
16:09 Ritchie joined #minetest-dev
16:35 ImQ009_ joined #minetest-dev
16:37 Calinou joined #minetest-dev
16:40 ImQ009 joined #minetest-dev
17:44 prestotron55 joined #minetest-dev
17:45 Akien joined #minetest-dev
18:49 kahrl what shall we do about all the accumulated pull requests?
18:49 kahrl especially those in the 0.4.8 milestone
18:52 VanessaE merge and pray?
18:54 kahrl well it's not that easy
18:54 kahrl for example #923, hmmmm has given valid reasons to be against it
18:56 VanessaE hrm
18:56 VanessaE if those functions are so speed-critical, why are they in Lua then?
18:56 kahrl because a Lua->C call is slower than a Lua->Lua call
18:57 VanessaE even after accounting for the actual processing time of the function?
18:57 kahrl I haven't done any actual comparisons between vector helpers in C and vector helpers in Lua
18:59 ImQ009_ joined #minetest-dev
19:00 VanessaE I guess we all agreed on #929 already
19:00 kahrl I suppose the metatable construction and string comparison in vector.new (which is called from everywhere) might be slow
19:01 kahrl there's #925 to fix one of these but it makes vectors a lot less nice to work with
19:03 kahrl has #929 been mentioned here at all?
19:03 VanessaE yes
19:03 VanessaE I guess I better not say too much though lest I end up being wrong
19:04 VanessaE last I remember was shadow updating the pull to match what everyone seemed to vaguely agree on :)
19:04 kahrl ah it moved out of my lastlog window
19:06 kahrl http://irc.minetest.ru/minetest-dev/2013-09-17#i_3324586
19:06 kahrl ^ I interpret that as c55 accepting the change to max_users = 15
19:07 VanessaE *nod*
19:07 kahrl so that means I can merge it
19:14 kahrl back to the vector stuff, instead of inserting assertions everywhere, we could fix the fundamental problem
19:14 kahrl which is that we call lua_pcall without a custom error handler
19:15 kahrl now adding that error handler has performance implications as well, because it must be pushed to the lua stack before every lua_pcall
19:19 PilzAdam kahrl, #936 is fine, but add src/cmake_config_githash.h to .gitignore
19:21 kahrl oh, right
19:21 kahrl forgot about that because I use a separate build dir
19:25 kahrl PilzAdam: fixed and rebased
19:26 kahrl do you think it can be merged?
19:28 PilzAdam the version string gets cut-off in the pause menu; but I think that its not very important
19:29 PilzAdam it can be merged
19:29 kahrl yeah the pause menu should probably be redone at some point
19:29 PilzAdam BlockMen worked on something, IIRC
19:29 VanessaE kahrl: #926 seems reasonable to me
19:30 PilzAdam VanessaE, thats why its already merged 12 days ago
19:30 VanessaE er 936.
19:30 PilzAdam :-p
19:33 PilzAdam can someone look at https://github.com/minetest/minetest/pull/915#issuecomment-24245526
19:34 kahrl PilzAdam: I will
19:34 kahrl but let me first update http://dev.minetest.net/Releasing_Minetest
19:39 kahrl http://dev.minetest.net/index.php?title=Releasing_Minetest&diff=1554&oldid=1347
19:47 kahrl PilzAdam: looks reasonable
19:47 kahrl it's better than doing it just for facedir
19:48 kahrl (say you want leaves to take param2=1 when placed; you can do that with the generic version, but not with the facedir specific one)
19:50 kahrl https://github.com/PilzAdam/minetest_game/commit/d60d68b15d012937c0ad2012af085fe30fe89122#L0R125 should this be >= 20?
19:51 PilzAdam hmmm, right, people might use screwdrivers on that
19:52 PilzAdam (that was "hmm" as thinking, not the nick)
19:52 kahrl he should be used to that :P
19:53 djdduty joined #minetest-dev
19:54 PilzAdam currently you cant use the screwdriver on slaps that are placed before that commit
19:54 PilzAdam it could be fixed by adding an ABM that converts the old nodes into the new ones with the proper param2
19:57 PilzAdam but I dunno if its worth it
19:59 kahrl I think it should be done
20:00 kahrl making behaviour of nodes depend on in which version they were placed is kind of odd
20:00 kahrl (when it can be avoided)
20:01 VanessaE I did that for moreblocks
20:01 VanessaE it turned out to be quite worth it (but then there are a lot more)
20:02 PilzAdam offtopic: something is wrong with world selection when I get back to mainmenu; it doesnt select the world I played before
20:03 jojoa1997 joined #minetest-dev
20:06 kahrl PilzAdam: works for me
20:06 PilzAdam I got quite a lot of worlds
20:07 kahrl I'm using master with a cherry-pick of pilzadam/slabs
20:08 PilzAdam hm, works now
20:08 PilzAdam maybe I forgot to restart Minetest after compiling after rebase, dunno
20:10 kahrl well there's something mean in minetest_game:pilzadam/slabs
20:11 kahrl when I try to place a slab on top of another slab, it converts the existing slab into a full block, places a slab on top of that (so far so known) and then eats the whole stack of slabs from my inventory
20:13 kahrl (the second placed slab is just a client prediction glitch)
20:15 PilzAdam itemstack needs a set_count()
20:15 PilzAdam https://github.com/PilzAdam/minetest_game/commit/d60d68b15d012937c0ad2012af085fe30fe89122#L0R142 else you need 3 lines or some string magic to set the count
20:18 PilzAdam is there any reason to not add it?
20:19 kahrl not really
20:19 kahrl but the code you linked, did the old version stop working?
20:20 PilzAdam no, it was just an example of what stupid things you had to do in Lua
20:21 ritchie joined #minetest-dev
20:22 kahrl I suppose set_name, set_count, set_wear, set_metadata don't hurt
20:23 kahrl what should they do when called on an empty stack?
20:24 PilzAdam the same as they would do on a not empty one
20:25 kahrl an itemstack with name != "" and count == 0 doesn't exist so far though (ItemStack() prevents that)
20:25 kahrl so not sure if there's any code that relies on that
20:25 PilzAdam if(item.count==0) item.clear();  in set_count()?
20:26 kahrl yeah set_name("") and set_count(0) should behave as clear
20:26 PilzAdam what about set_name("this node doesnt exist")?
20:27 kahrl I'd say an invalid item, like when you do ItemStack("\"this node doesnt exist\"")
20:27 kahrl er, unknown item
20:28 kahrl set_wear(x) with x > 65535 should be a clear too I guess
20:33 kahrl anyway, there's no ideal way to implement these functions
20:33 PilzAdam what about set_wear(-1)?
20:33 kahrl convert to 65535?
20:34 PilzAdam or 0?
20:34 kahrl whatever ItemStack({...wear=-1...}) does is probably best
20:35 kahrl the implementation I proposed keeps class invariants (name=="" <=> count==0) but has weak postconditions
20:35 kahrl if you simply set the field in the itemstack you have strong postconditions but you lose the class invariants
20:38 kahrl itemstack = ItemStack(); itemstack:set_name("default:stone"); itemstack:set_count(42); itemstack is still empty with my proposal
20:41 PilzAdam set_wear() gets converted to 65535
20:41 Exio4 unsigned short?
20:41 PilzAdam eh, set_wear(-1); thats the same what ItemStack({... count=-1}) does
20:42 kahrl if stack:set_foo(x) does the same as t = stack:to_table(); t.foo = x; stack = ItemStack(t); it's at least sort of predictable
20:43 kahrl well without changing stack to a new itemstack reference
20:48 PilzAdam https://github.com/PilzAdam/minetest/commit/1cebd117242c3893e86649e2ed2751d5193c6593
20:48 PilzAdam its possible to get a stack with name="" and count!=0, though
20:53 PilzAdam this doesnt behave like the to_table() way
20:53 kahrl how?
20:56 kahrl metadata should use luaL_checklstring so that NUL doesn't cut off the string
20:56 kahrl (I hope all the other places that handle metadata do that as well, not sure)
21:00 PilzAdam luaL_checklstring is used nowhere else in Minetests source
21:00 PilzAdam where would I get the length?
21:02 kahrl oh
21:02 kahrl ItemStack(table) calls getstringfield_default which calls getstringfield which first calls lua_isstring and then lua_tolstring
21:03 kahrl lua_tolstring is basically the unchecked version of luaL_checklstring
21:05 kahrl so: size_t len = 0; const char *ptr = luaL_checklstring(L, 2, &len); if (ptr) item.metadata.assign(ptr, len); else item.metadata = "";
21:10 PilzAdam https://github.com/PilzAdam/minetest/commit/dd6980fa092e346d579a537bf1d4c07c680fb7b0
21:11 PilzAdam this has the same results as the to_table() method; so  stack = ItemStack(""); stack:set_name("something"); stack:set_count(2);  doesnt work anymore
21:12 PilzAdam (fixed the comment that said set_name() returns a string)
21:13 kahrl tbh I'm not sure if I like that that doesn't work
21:13 PilzAdam me neither, but there is no other way to prevent an empty stack not being "empty"
21:13 kahrl yeah
21:14 PilzAdam here is the version that has the ABM and uses set_stack(): https://github.com/PilzAdam/minetest_game/commits/slabs
21:14 PilzAdam it shouldn eat items anymore
21:15 kahrl I think the set_* functions can be merged now
21:15 PilzAdam I have them in the slabs branch, it would be easier to merge it all together
21:15 kahrl oh, right
21:16 jin_xi joined #minetest-dev
21:18 PilzAdam with the dummy definition of the uspide_down nodes you see "unknown node" for a second, but IMO its better than the extra time to create the inventory images
21:19 PilzAdam also you get visual feedback if all slabs and stairs are converted
21:21 kahrl so far this seems good
21:21 kahrl maybe a builder could try it out and give some feedback?
21:21 PilzAdam VanessaE?
21:21 VanessaE hm?
21:21 VanessaE oh sorry, wasn't watching
21:22 PilzAdam oh, I just noticed that "Longer range and insta-dig in creative" isnt pushed to upstream yet; I could swear I did that already...
21:23 kahrl if you have a slab placed in the top half, point to the node below it and try to place the same kind of slab, it doesn't fill in the hole
21:24 kahrl not sure if that's intended
21:28 PilzAdam added handling for that
21:29 jojoa1997 joined #minetest-dev
21:31 kahrl works
21:31 kahrl hmm, the same could be done in the other direction ;)
21:34 Akien joined #minetest-dev
21:36 PilzAdam ok, I got all cases where pt.above is a slab now
21:38 kahrl it's working fine now
21:39 kahrl if you want you can merge it or let others test it first
21:40 kahrl (I didn't test it with old slabs, for example)
21:40 proller fix weather after hmmmm cleanup: https://github.com/proller/minetest/commit/dda672d03988b8c8581ed80b0d1b8eca1fec2014
21:41 hmmmm that just undoes what I did... doesn't actually fix the problem
21:42 proller wat
21:42 hmmmm my intent was to have it in activateBlock so that it'd calculate it if it wasn't already there on load, no matter if it was generated with weather on or off
21:42 Zeitgeist_ joined #minetest-dev
21:42 hmmmm for me it doesn't show up as 0 at all, it works as expected
21:43 proller 0c/0% everywhere expected?
21:43 hmmmm no, it's not supposed to be like that, but i don't see the bug you're having
21:44 proller try it on loaded world
21:44 VanessaE I see 0/0 sometimes.
21:44 proller its ok for new generated area, and 0/0 for loaded
21:44 hmmmm hmm weird
21:44 hmmmm i'll have to look better
21:45 proller fix for that - return calc on emerge
21:45 proller other part - calc once when weahter disabled without season-daily amplitude
21:45 hax404 joined #minetest-dev
21:46 PilzAdam kahrl, I tested the old slabs -> 6d facedir transition; I merge it now
21:50 PilzAdam so, what about insta-dig and a range of 10 nodes in creative mode?
21:50 PilzAdam https://github.com/PilzAdam/minetest_game/commit/bb10cb35bd10b2078ec49eee52c21f042c9a875d
21:51 kahrl I thought that was merged as well
21:51 kahrl shows I don't use creative mode often enough
21:52 PilzAdam IIRC I everyone agreed on it, it seems I just forgot to actually push i
21:52 PilzAdam *it
21:52 kahrl yeah it can be merged, I'd say
21:53 Exio4 j20
21:53 PilzAdam dig_immediate cant be overwriten, though
21:53 Exio4 oops
21:53 PilzAdam should I fix that in the engine?
21:55 kahrl hmm
21:56 kahrl it's documented in lua_api.txt:652 to work like that
21:56 kahrl some people might rely on it
22:03 PilzAdam this fixes the hand being faster than wooden and stone axe: https://github.com/PilzAdam/minetest_game/commit/d8f63f4554c054b5185738be06d01b00a4cdcba3
22:04 PilzAdam it makes oddly_breakable_by_hand the speed that is documented in lua-api.txt; it was faster previously
22:09 ShadowNinja Does Minetest have a recursion depth limit for modpacks?
22:09 Exio4 1
22:09 Exio4 as far as i know
22:10 ShadowNinja Nope, I have 2 or three levels, but I just added one and I think it is failing.
22:11 kahrl PilzAdam: seems better balanced on a quick test run
22:11 kahrl (it always bothered me that the low level axes were useless)
22:11 PilzAdam ShadowNinja, the mainmenu cant handle a modpack inside a modpack
22:12 ShadowNinja PilzAdam: I know, that is why I use "vim worlds/x/world.mt" for my GUI.
22:13 kahrl ShadowNinja: I hope it'll get fixed by 0.4.8
22:13 ShadowNinja Actually the mainmenu crashed last time I tried it.
22:13 PilzAdam I think we should disallow modpacks inside modpacks
22:13 kahrl why?
22:13 ShadowNinja PilzAdam: No, I need them for organization.
22:13 VanessaE bbl
22:14 ShadowNinja I think I might have forgotten something...
22:14 PilzAdam kahrl, because then we have an easy to understand limit
22:15 ShadowNinja Right, "touch modpack.txt" IMO folders without a init.lua should be assumed to be modpacks.
22:15 PilzAdam and GUIs get easier
22:15 kahrl PilzAdam: no limit at all is better
22:16 jojoa1997 why would GUI's be easier if you make a modpack limit
22:17 PilzAdam has someone tried a symlink in a modpack that links to the modpack?
22:17 PilzAdam jojoa1997, 1 indentation step vs. infinte indendatin steps
22:18 PilzAdam *indentation
22:18 kahrl I assume symlink handling in minetest is pretty broken overall
22:18 kahrl e.g. put a symlink in a world directory, try to delete the world
22:18 ShadowNinja PilzAdam: We should have a limit to prevent that, but it should be something like 10.
22:19 ShadowNinja symlinking to mods/modpacks works.
22:19 ShadowNinja I used that to limit the mods on my server before they were added to world.mt
22:19 PilzAdam kahrl, a symlink to /root/ would make the world undeletable for users, I guess?
22:20 kahrl I think so
22:21 kahrl actually it calls rm -r which has proper symlink handling
22:21 kahrl so it should just delete the symlink and not try to recurse into it
22:22 kahrl now what it does with symlinks on windows is anyone's guess
22:22 PilzAdam "symlinks on windows"
22:23 kahrl http://msdn.microsoft.com/en-us/library/windows/desktop/aa365680%28v=vs.85%29.aspx
22:24 PilzAdam wowowowowow, Microsoft caring about UNIX standards? oO
22:24 PilzAdam VanessaE, Id like to hear your oppinion on that before merging: https://github.com/PilzAdam/minetest_game/commit/d8f63f4554c054b5185738be06d01b00a4cdcba3
22:26 kahrl of course they broke it in fun ways
22:26 kahrl if you delete a symlink to a directory it deletes the directory
22:26 kahrl using del in cmd
22:31 PilzAdam oh, actually I messed something up with the times
22:31 PilzAdam here is the fixed version: https://github.com/PilzAdam/minetest_game/commit/d5c1105d8fa8ef362707bfd538d29673db215da8
22:31 PilzAdam VanessaE, kahrl ^
22:38 ShadowNinja PilzAdam: Sounds good to me.
22:43 OWNSyouAll_DESKT joined #minetest-dev
22:50 kaeza joined #minetest-dev
23:11 NakedFury joined #minetest-dev
23:40 werwerwer_ joined #minetest-dev

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