Time Nick Message 16:33 thexyz any idea on why doesn't this work? https://gist.github.com/3994872 16:40 darkrose explain "doesn't work" 16:42 thexyz well, i've tested it using PilzAdam's carts mod, and when player's flying near cart it can reach the finish line, otherwise it just stops after reaching some distance from player 16:44 OldCoder celeron55, hi 16:51 hmmmm unrelated, but you should be using MAP_BLOCKSIZE instead of 16 16:51 thexyz oh, yes 16:52 hmmmm and shouldn't you be using an envlock there? 16:53 hmmmm perhaps it's fine 16:53 hmmmm what is this code supposed to do? 16:53 hmmmm err why are you adding it* 16:53 hmmmm i can see what it does 16:54 thexyz make the game not unload blocks near entities, could be useful in "carts" mod 16:55 hmmmm well how do the carts in the mod move? 16:55 hmmmm does the position increment on a step time? 16:55 PilzAdam no 16:55 PilzAdam setvelocity() 16:55 hmmmm and is the step time calculated using the usage timer 16:55 hmmmm i see 16:56 PilzAdam but the engine unloads entities that are far away, right? 16:56 thexyz i thought it unloads blocks, not entities 16:56 hmmmm by "far away", you mean an amount that's determined by the configuration 16:56 hmmmm hrmm 16:56 hmmmm i don't know 16:57 celeron55 it would make no sense at all to unload entities, because there can be an infinite number of them 16:57 PilzAdam if the player moves away from an entity it gets unloaded, even if the chunk is loaded 16:57 celeron55 but some kind of special entities should be possible like carts that do stay around 16:57 celeron55 with a "stay around" flag they won't be activated everywhere when a map loads though 16:57 celeron55 unless blocks that contain them are specially marked somewhere else... 16:58 celeron55 eh 16:58 celeron55 s/it would make no sense at all to unload entities/it would make no sense at all to not unload entities/ 16:58 thexyz i was thinking of entity's flag, something like "don't unload nearest blocks" 16:59 hmmmm so there's currently no "don't unload entities" flag? 16:59 hmmmm :| 17:00 hmmmm then in reality what you should be coding is that 17:00 hmmmm line 1486, map.cpp? 17:01 hmmmm i'm sure there are more places where blocks are unloaded though. 17:01 thexyz call to resetUsageTimer should be enough 17:02 thexyz still, celeron55, where's entities unloading handled? 17:02 hmmmm yeah but that's messy, i think it would be way better if you iterate through all of the entities in a block and if none of them have the nounload flag set then it'll delete the block 17:02 hmmmm nevermind that, there's a problem with your code that ought to work in theory 17:03 thexyz ? 17:03 hmmmm oh, no, it's because the entities are being unloaded 17:03 hmmmm sorry, it's early 17:10 hmmmm from what i'm reading there already is a flag for objects so they don't unload automatically 17:10 hmmmm what on earth was celeron talking about? 17:11 thexyz where? 17:11 hmmmm ServerActiveObject::isStaticAllowed 17:11 hmmmm () 17:11 hmmmm look in ServerEnvironment::deactivateFarObjects() 17:12 hmmmm see how it goes through all the SAOs and skips it if it's static and not forcibly being deleted? 17:12 celeron55 thexyz: entities are currently loaded and unloaded based on active blocks (the same as ABM activity) 17:13 celeron55 it's decoupled a fair bit from it though 17:13 celeron55 you should add a check for a flag in the method that unloads entities that are not in the active block area 17:14 celeron55 ServerEnvironment::deactivateFarObjects 17:14 celeron55 there is already the check for isStaticAllowed (used for player entities) 17:14 celeron55 it's just an another one 17:15 hmmmm yeah but he's talking about lua entities, not player entities. 17:15 celeron55 i know and nothing that i say meant i though differently 17:15 celeron55 said 17:15 celeron55 * 17:16 celeron55 thought* 17:16 celeron55 the official typoing day 17:16 hmmmm what 17:16 hmmmm yeah i got what you ment 17:16 OldCoder Are there Typo Tunes? Carols? 17:16 hmmmm i'm just misreading too 17:16 hmmmm so isStaticAllowed was intended to be used with player entities 17:17 hmmmm and PlizAdam's mod should really be setting the static flag on his carts 17:17 hmmmm can you do that in the lua api? 17:18 thexyz or should i just add blocks which belong to those ("do not unload") entities to m_active_blocks? 17:20 hmmmm i guess not 17:21 thexyz why? 17:21 celeron55 oh god, let me just say once more: add ServerActiveObject::usUnloadAllowed() 17:21 hmmmm you haven't said that at all 17:21 celeron55 that was what i expected people to figure from what i said 8) 17:21 hmmmm and there is no isUnloadAllowed 17:21 hmmmm er 17:22 hmmmm you said add that 17:22 thexyz the game unloads objects right after it updates m_active_blocks 17:22 hmmmm okay fine 17:22 celeron55 which part of "add" did you not understand? 8) 17:23 celeron55 there indeed is the problem of keeping the nearby blocks loaded too for the entities 17:24 celeron55 (also there is the sepearate problem of being able to load needed blocks from mods for plain node access) 17:24 hmmmm alright, so how about adding scriptapi_luaentity_set_attributes 17:24 hmmmm and then the "don't unload" flag will be one attribute 17:25 hmmmm you calling it a 'problem' makes it sound like it's difficult 17:27 celeron55 s/problem/unimplemented thing/ 17:31 PilzAdam what do you think about this: https://github.com/celeron55/minetest/pull/270 17:32 thexyz is it backwards-compatible with old way to register falling nodes? 17:33 thexyz doesn't seem so.. 17:33 PilzAdam this is still in default mod: https://github.com/PilzAdam/minetest_game/blob/e5502c941567e94d0f25f7d31cdf33178c2fceed/mods/default/init.lua#L1614 17:33 darkrose would be better to somehow work out if an object should be unloaded, check it's not moving and such... rather than putting in a flag that every modder will set beause they think their entities are important 17:34 celeron55 hmmmm: actually, the difficulty highly depends on who will attempt to do it; i don't really know how i should talk about such things 8) many won't be able to even start trying, and to a couple of people it's almost trivial 17:34 hmmmm darkrose, yeah but what about mobs 17:35 thexyz PilzAdam: but not in minimal, right? 17:35 hmmmm well i will say that any modification bigger than 4 lines of code is difficult, not because the coding is difficult, but because you need to decide where to put things so they're consistent and backward compatible 17:35 PilzAdam celeron55, you have to do trivial things if you whant a good game 17:35 PilzAdam thexyz, it werent in minmal before 17:36 thexyz really? how did you remove it then? https://github.com/celeron55/minetest/pull/270/files#L3L1590 17:36 hmmmm like for example how you want no global variables 17:36 hmmmm that complicates things 17:36 PilzAdam thexyz, oooops 17:37 PilzAdam thexyz, but there are no mods for minmal so there is no need to support it, i guess 17:37 PilzAdam i also switched minimal to the group falling_node 17:37 thexyz wut? mods for minimal? i thought mods don't depend on "game" 17:38 darkrose hmmmm: mobs should be a subclass of the usual entities, where that check doesn't happen 17:38 hmmmm whenever you say "a subclass" that means adding an option that could be "exploited" in the same manner 17:39 PilzAdam thexyz, i mean no one uses the minimal game with mods; the problem is that both minetest_game and minmal have default mods but they are different 17:39 PilzAdam so if you depend on default you cant be sure what game you have 17:39 PilzAdam and so most mods that depend on default mean minetest_game.default 17:39 hmmmm if someone wants to be self-important they could just if (stepcounter & 1) SetVelocity(v3s16(-1,0,0)); else SetVelocity(v3s16(1,0,0)); every step() 17:40 hmmmm er however you do that in the Lua api 17:41 PilzAdam thexyz, should i copy the code from the default mod from minetest_game to minimal to support it? 17:42 thexyz i think that yes, you should 17:44 PilzAdam thexyz, also default.spawn_falling_node? it is in the minetest_game default mod but it wasnt in default of minimal? 17:49 PilzAdam thexyz, https://github.com/PilzAdam/minetest/commit/7fcf153adab121bfd50b246f32e074adab3a3b6d 17:50 thexyz well, i guess, you should make it to work as minimal's default worked 17:51 PilzAdam it doesnt make sense when it was moved to builtin 17:51 PilzAdam games shouldnt define there own falling node anymore 17:51 PilzAdam s/when/because 17:52 thexyz anyway, my point is that none of working mods should be broken 17:52 PilzAdam with this commit it should work for every mod 17:53 thexyz have you tested it? 17:53 thexyz with at least one mod 17:54 PilzAdam yep 17:54 PilzAdam it works 17:55 thexyz then just merge it 17:56 PilzAdam this should also be merged: https://github.com/celeron55/minetest_game/pull/17 17:56 thexyz that one too 17:57 PilzAdam let me double check the code first... 18:02 PilzAdam merged 18:04 darkrose on the subject of small _game changes, this has been around for a while: https://github.com/celeron55/minetest_game/pull/18 18:04 PilzAdam yep 18:05 PilzAdam i can confirm that this works 18:07 PilzAdam darkrose, merge it 18:07 darkrose done 18:08 PilzAdam it was already done in minimal 18:09 darkrose yeah, just forgot about it in _game 19:58 thexyz well, that doesn't work either https://gist.github.com/3996063 20:45 sfan5 celeron55: did anybody get push right to celeron55|minetest or celeron55|minetest_game yet? 20:46 celeron55 why are you asking that from me? 20:49 thexyz sfan5: yes 20:56 sfan5 i just saw that xyzz,darkrose and PilzAdam got push rights.. 20:58 toabi oh by the way, I figured out how to properly build minetest with cmake on a mac… well, nearly. two things still need manual work to have a nice app bundle. https://github.com/toabi/minetest/commits/cmake-osx 21:01 sfan5 minetest for mac os x \o/ 21:02 celeron55 (just poke me when there is a new version available so i can update minetest.net) 21:03 toabi well, when I stich the last parts together by hand it works fine. like it launches and the silly Irrlicht receives the keyboard input etc, BUT there are major graphics glitches :( 21:04 OldCoder toabi, Nice; t y 21:09 hmmmm i didn't get push rights :\ 21:09 hmmmm well, that's fine, i can still maintain my fork. 21:10 thexyz hmmmm: where can i obtain your fork's code? 21:11 hmmmm i haven't pushed anything important to it 21:11 hmmmm i'd rather keep it private now 21:12 thexyz well 21:13 thexyz that's fine, except that violates lgpl 21:13 hmmmm except it doesn't because it's private 21:18 thexyz really? 21:18 hmmmm yeap 21:18 hmmmm you only need to redistribute the source when you distribute it publically 21:18 celeron55 (L)GPL says "whoever you transfer binaries to, you also give the source code" 21:18 celeron55 nothing else 21:19 thexyz well, then that violates not its letter but its spirit (at least, in my mind) 21:20 hmmmm it would be unenforceable if it said otherwise. i'd just have the option of not telling you that i made modifications to the source code and compiled it on my own 21:20 hmmmm and unreasonable in my mind too.