Time Nick Message 00:17 hmmmm sapier 00:18 hmmmm you remember the thread priority patch 00:18 sapier yes does it solve it too? 00:18 hmmmm no, this is unrelated to what you were just talking about 00:18 hmmmm you do realize that you need to be running minetest as root for that to work 00:19 sapier I don't run minetest as root and it does work 00:19 hmmmm you can't set priorities for SCHED_OTHER in Linux, so you set it to SCHED_RR, only problem is that SCHED_RR is a real-time scheduling policy which would require root to use 00:19 sapier strange 00:19 hmmmm i can't come up with a good solution to it either 00:20 sapier ok I assume I didn't check the return value 00:20 sapier true? 00:20 hmmmm i don't know, let me see 00:20 hmmmm yeah you don't check that 00:21 hmmmm also those priority levels are not portable at all 00:21 hmmmm here's how i did it: https://github.com/kwolekr/minetest/blob/new_emerge/src/porting.cpp#L225 00:22 hmmmm except i don't use that at all, because of the problem with SCHED_RR 00:22 sapier I know ... prioritys are always a problem to port 00:23 hmmmm i'm having a lot of problems with that branch to be honest 00:23 sapier I don't think we can have all threads on same prio level if we keep on adding more threads 00:24 sapier I assume SCHED_RR wasn't a good idea 00:24 hmmmm probably not 00:24 hmmmm those envlocks are really killing me though 00:25 hmmmm especially the on_generate 00:25 sapier stil it'd may have solved more problems ... now I understand why effect of this changes was much less than expected ;-) 00:25 hmmmm i've had someone test that branch and they said it was extremely choppy and what not 00:26 sapier I've just implemented pathfinding in lua based loosly dijkstra ... it's a pitty 00:26 hmmmm vanessa had a bunch of mods running though, and on_generate took over 3 seconds for her 00:26 hmmmm lua is just completely unusable it's so slow 00:26 hmmmm so anyway just consider that 00:26 sapier 3 seconds? this will result ind std::bad_alloc as soon as mobf is installed 00:26 hmmmm for each block generated, it's spending over 3 seconds in an envlock 00:27 sapier wow 00:27 sapier what are those guys doing in on_generated? 00:27 hmmmm using lua 00:27 sapier no that can't be a problem 00:28 hmmmm the vmanip interface is going to take a bit of work 00:28 sapier I've 50 mobs in on_step handler consuming less than 5% of cpu load 00:28 sapier and those mob do check whole environment each step 00:28 hmmmm what i think would be a good idea is to put modular ore-generating code back in the core 00:29 hmmmm and people would need a really good reason in order to do things in on_generate 00:29 sapier maybe we could add luajit too 00:29 hmmmm that'll help but it won't be the silver bullet 00:29 hmmmm these are all things that should be done 00:29 sapier no it'd help i special cases only 00:30 sapier those cases where lots of calculation is done within lua without doing c++ calls 00:30 hmmmm so anyway because things are taking so slow, i'm going to make the default number of threads 1 00:30 sapier 1??? 00:30 hmmmm until we can get things faster at least 00:30 hmmmm yeah... 00:30 hmmmm when the emergethreads compete for the envlock they take 3 seconds in, the server step hardly gets any time to run 00:31 sapier maybe we should add those fix I postet upwards in between 00:31 hmmmm what, the thread priority? 00:31 sapier no ... collision handling limiter 00:31 hmmmm oh 00:31 hmmmm lol 00:31 hmmmm not my call.. sorry 00:32 sapier I know ... but maybe you could help me to get it in ;-) 00:32 hmmmm also i had to modify vmanip's copyFrom() in order to not screw up chunks with the mapgen boundaries 00:33 hmmmm need to make sure i don't write CONTENT_IGNORE, but in doing that, i can't use memcpy 00:33 hmmmm so now it's noticably slower by default 00:33 sapier thats wrong direction ;-) 00:33 hmmmm it's ironic, this branch was supposed to speed things up a lot, and it ends up being slower than upstream 00:34 hmmmm i have a plan though 00:34 sapier tell me maybe I can help 00:35 hmmmm so the plan is to have the fast, old version of copyFrom with memcpy be used in blitBackAll if it doesn't need to worry about overwriting already-written blocks thanks to having multiple emergethreads 00:35 hmmmm the long term solution, though, is to speed up the conditional write variant 00:36 hmmmm it's never going to be as fast as memcpy(), but it can get at least kind of close.. need to do some SSE 00:36 sapier is current architecture documentation up to date? 00:36 hmmmm no 00:36 sapier could you add you knowledge there? 00:37 hmmmm no ;/ 00:37 hmmmm busy 00:37 sapier It'd avoid otheres to have to evaluate same things you already did 00:38 hmmmm let's be honest, nobody else is going to be working on this crap aside from me 00:38 hmmmm and possibly you 00:39 sapier yes but I'm still missing lots of basic knowledge about minetests architecture ... ok at least since I added lua security patches I understand how this lua stack crap is working 00:39 sapier mostly 00:39 hmmmm i would like to write it someday 00:39 hmmmm i never got around to it though 00:40 sapier I even have some ideas how to split lua thread into multiple ones 00:40 sapier but as long as I don't get simple bugfixes like the collision limiter one upstream I'm not realy motivated to do big stuff 00:42 hmmmm alright i'll add it 00:42 hmmmm if someone (celeron) doesn't like it for some sort of reason, it can easily be removed... 00:43 sapier no don't do it without celerons permission 00:43 hmmmm too late 00:43 sapier I hope it's not removed just because it was done "wrong" way 00:44 hmmmm so what's the right way exactly? 00:44 sapier don't know ... did you read the comments? celeron did say that it wouldn't fix the problem but he way plain wrong with it .. I think my explanation is more than self speaking 00:45 sapier I was hoping he did comment it after reading the comprehensive explanation ;-) 00:46 hmmmm yeah i kind of wonder what his reasoning was for not bothering to follow up 00:46 hmmmm this was from a month ago apparently 00:47 sapier yes .. and thit patch is tested more than a bit at oldcoders servers 00:49 sapier so we're trying to fix the big env_lock thing next? 00:49 hmmmm no... that's too difficult for now 00:49 hmmmm we're just trying to make things inside the envlock fast enough 00:50 sapier hmm ... ok I'll have a look at it but I guess this is licke blk on linux kernel 00:50 hmmmm and again... i have an idea of what to do 00:51 hmmmm i'd just really like to ship this dumb emerge branch so i can get working on other things 00:51 hmmmm so i'll add what i was talking about in so at least there's no regression, and i'll have people test it, then throw it in 00:51 sapier but if it's slower than current one you won't get new friends on mergeing it 00:52 hmmmm yea i'm going to add a temporary fix for that 00:53 hmmmm hmm 00:54 hmmmm maybe that's what you could do....? try writing some SSE code to conditionally move a mapnode if it's not CONTENT_IGNORE, so that it's at least close to memcpy() speeds 00:55 sapier hmm I don't have any knowledge on SSE instructions ;-) but it'd be interesting to try 00:55 hmmmm oh 00:55 sapier is there already any sse code in minetest? 00:55 hmmmm probably shouldn't bother then, you can be more productive elsewhere 00:55 hmmmm no 00:56 sapier splitting scriptapi.cpp maybe? ;-) 00:56 hmmmm there would've been if i added in the SSE noise code but i never got around to finishing that up, and i don't have as much motivation to since it's not as needed 00:56 hmmmm sure 00:56 hmmmm also fix the warnings from scriptapi.cpp while you're at it too 00:56 sapier yes they're anoying ... subfolder or lua_ prefix for new files? 00:57 hmmmm i'd say lua prefix 00:57 sapier ok 00:57 hmmmm i was thinking about that for a while... i decided that it shouldn't be a subfolder, since that's used mostly for third-party libraries 00:58 sapier I'll do as you want I've already set up eclipse with virtual folders so it'd be no change for me ;-) 00:59 sapier but it'll take some days to get this task done I guess I need to change some function signatures as well (static/extern) ... and add aditional headers of course 01:08 sapier ok it's time to sleep now have a good day ;-) 01:50 VanessaE hmmmm: regarding that three seconds' worth of mapgen time per block... that's with only a few mods installed; only moretrees vis a vis plants_lib hooks into the mapgen. 01:51 VanessaE the others were incidental stuff like poison ivy, flowers, junglegrass (all abm-based). 04:29 hmmmm you know sapier, nevermind about the copyTo 04:29 hmmmm i was wrong, that's not the reason why it's slower 04:30 hmmmm maybe i jumped to conclusions because vanessa said so. in theory that's why it'd be a "regression", but in practice it doesn't seem so.... 04:30 hmmmm this is great because now i don't have to bother with all that stuff 04:31 VanessaE careful, hmmm 04:31 VanessaE don't tempt the evil eye :-) 04:32 hmmmm yeah, are you sure about the latest new_emerge being slower than upstream, using only a single thread? 04:32 hmmmm i need to ask more people to test it perhaps 04:33 VanessaE well with only a single thread, didn't we decide it's about the same as upstream? 04:33 hmmmm you said it was a little slower though 04:33 VanessaE well maybe it was - I don't remember now. 04:33 hmmmm even with a single thread 04:33 hmmmm in theory it shouldn't be any slower 04:33 hmmmm like 04:33 VanessaE but, you're seeing it on my server, so maybe you can tell me :-) 04:33 hmmmm 1ms slower 04:33 hmmmm well i can't really tell before/after 04:34 hmmmm plus i don't know what's generated and what's being loaded from disk 04:34 VanessaE one thing's for sure: the map loader ain't hanging up anymore 04:34 hmmmm all of what _i_ did is being blown away by the mods sucking up all that computation time 04:35 hmmmm so like if it is faster you wouldn't be able to really tell since it'd be say, 4.4 seconds instead of 4.5 seconds to generate a chunk 04:35 hmmmm oh my god 04:35 VanessaE not moretrees/plants_lib. I made damn sure it was blasting through the map as fast as theoretically possible 04:35 hmmmm it's the year 2013, we're all using modern processors 04:35 hmmmm and here we're talking about trivial calculations taking SECONDS 04:35 hmmmm there's too much inefficiency 04:35 hmmmm this goes against my core person 04:36 VanessaE I know 04:37 VanessaE but what do we DO about it? 04:37 hmmmm vanessa, i am going to put ores back in the core and have some Lua knobs to register ores to be generated at what depth, perlin noise, etc. 04:37 VanessaE cool 04:37 VanessaE that'll help for sure 04:37 hmmmm it will 04:37 hmmmm surely, it'll make some mods not need to use on_generated 04:38 hmmmm and if it's not registered for anything, not even default, it'll take 0ms to run instead of 3400ms 04:38 hmmmm this means the server step can just execute freely without any waiting for lua 04:38 hmmmm this means things will be _responsive_ 04:38 VanessaE yes 04:40 hmmmm alright so 1). ores in the core, 2). LuaJIT, 3). VoxelManipulator interface, 4). remove the need to be envlocked while running Lua 04:40 hmmmm each of these are huge steps 04:40 hmmmm when they're all done, however, things would benefit immensely 04:41 VanessaE now, I'm curious about my code, namely is there anything that could be added to the engine that'll reduce how much work I have to do in Lua? 04:41 VanessaE (namely in plants_lib) 04:41 hmmmm i don't know... can you link me to plants_lib source? 04:41 VanessaE because honestly, I can't think of much that'll be both trivial enough and generic enough. 04:41 VanessaE sure, hold 04:42 VanessaE https://github.com/VanessaE/plantlife 04:42 VanessaE see plantlife/plants_lib/init.lua 04:43 hmmmm d'aww, you implemented biomes in lua 04:43 hmmmm neato 04:43 VanessaE yes 04:43 hmmmm alright, let's see, perlin noise isn't being used inside of a loop at least 04:43 VanessaE the biggest time sink in my code, and it ain't much of one, is that first 'searchnodes' scan at line 81 04:44 hmmmm i must say that is some tight code 04:44 VanessaE secondary to that is the loop at line 113 04:44 VanessaE (well 115) 04:44 VanessaE thanks :) 04:45 celeron55 i still think the mapgen could generate lists of positions for stuff according to some preregistered rules 04:45 VanessaE celeron55: that's exactly what my code referenced above does, in fact. 04:45 celeron55 not sure about the details though 04:45 celeron55 but it could do stuff like that very fast 04:45 VanessaE yes 04:46 hmmmm this is just me, but i would put all the "if (blah and blah and blah and blah and blah and blah" ) into a separate function and call it "get_spawn_plant(biome)" or something 04:46 VanessaE I thought about that, but this was more readable at the time 04:47 VanessaE I might do that later though 04:48 hmmmm hrm 04:48 hmmmm those perlin noise objects get created every time the abm is called 04:48 hmmmm why don't you store them as globals? 04:49 VanessaE hadn't thought about it. good idea. 04:49 hmmmm but yeah, i don't know... maybe it's just Lua in general.. your code looks pretty optimal to me 04:49 VanessaE thanksa 04:49 VanessaE I really pulled out all the stops to make this as fast as Lua could go 04:58 hmmmm btw celeron 04:58 hmmmm what's the difference between add and avg with the profiler 04:58 hmmmm how do i make the profiler just write a plain number, no shenanigans 05:07 VanessaE functionally, which is faster? "if not x" or "if x == nil" ? 05:07 hmmmm the first.. that sort of stuff won't help though 05:08 VanessaE eh, just looking for places to shave off a few cycles here and there 13:34 RealBadAngel https://github.com/celeron55/minetest/pull/502 13:34 RealBadAngel can somebody review and merge this? 13:34 RealBadAngel tested in singleplayer and multiplayer 13:35 RealBadAngel thexyz, can you take a look? 13:40 PilzAdam maybe add it to the main menu too? 13:41 RealBadAngel main menu will change volume for server 13:41 RealBadAngel this is for client 13:42 RealBadAngel but this could be also done 13:42 RealBadAngel main menu also needs exit to os option 13:44 RealBadAngel this could be done together with main meny rework proposed by c55 13:44 RealBadAngel *menu 13:47 PilzAdam Esc is return to OS 13:48 RealBadAngel i mean option in menu 13:48 RealBadAngel and esc is not working btw 14:42 proller PilzAdam, https://github.com/celeron55/minetest/pull/482 now with better abm 14:44 VanessaE proller: squash your commits 14:44 proller ok 15:08 RealBadAngel https://github.com/celeron55/minetest/pull/503 15:08 RealBadAngel fixed centering of buttons and 1 commit again 15:08 RealBadAngel goin to sleep, im too tired, c ya 15:09 VanessaE night RBA 15:10 PilzAdam RealBadAngel, you can force-push to the same branch so you dont have to open a new pull-request 15:11 RealBadAngel i dont like this git shit. im cloning my current workin directory 15:11 RealBadAngel all this merge, smerge, rebase, blah blah shit doesnt simply work as expected 15:12 PilzAdam as you expect it 15:12 RealBadAngel i know what i do want to send and im sending this. with github its impossible even to browse files of the branches on hardrive 15:13 RealBadAngel because it is not storing whole trees 15:13 RealBadAngel this only feature makes all rest useless for me 15:14 PilzAdam what? 15:14 PilzAdam you want to browse your local files with github? 15:15 RealBadAngel i do want to have branches like directories with all the files 15:15 RealBadAngel not just one with only diffs stored 15:15 RealBadAngel i cannot upload whole trees then 15:15 RealBadAngel now you got my point? 15:16 PilzAdam branches are just forks of the master branch, they arent directories 15:16 RealBadAngel so it doesnt fit me 15:17 PilzAdam you can have your whole directory tree in one branch 15:17 RealBadAngel i need more trees, its so hard to understand? 15:18 PilzAdam yes 15:19 RealBadAngel stick to github then, i will keep my code as i used to for years 15:19 RealBadAngel im not forcing you to follow my ways 15:20 PilzAdam do you want branches be copies of the original project? 15:20 RealBadAngel yes, because im not working on diffs but editin real files 15:20 RealBadAngel in a testing directory 15:21 PilzAdam do you code on many branches at the same time? 15:21 RealBadAngel once stuff in such directory is ready to release i want to upload it 15:21 RealBadAngel 6 or 7 atm 15:21 RealBadAngel 6, 7th is out and case closed 15:22 PilzAdam realy? you have seven keyboards to type in seven files? 15:22 RealBadAngel lol 15:22 RealBadAngel i do seven copies of minetest where i test the code 15:23 PilzAdam why not just code on one feature, then swtich branches, code on another, switch back to first branch etc.? 15:23 RealBadAngel lol, on cloned github theres only one directory 15:24 RealBadAngel when i do overwrite it, it shits on branches and writes to master 15:24 PilzAdam you know that you have to create the branches locally? 15:25 PilzAdam git checkout -b featurename; do stufff; git push origin featurename 15:25 RealBadAngel im not using command line and never will 15:25 PilzAdam and then you can use git checout to switch branches, but you stay in the same directory 15:25 PilzAdam then use your GUI to create branches 15:26 RealBadAngel ehhh, i just HATE github. please stop tellin me how good and marvellous it is. or easy to use. 15:27 PilzAdam git and github are different things 15:27 RealBadAngel whatever 15:28 RealBadAngel not gonna use it but just only as a uploader 15:29 PilzAdam then you can only have one pull request at the same time 15:29 PilzAdam and dont bother us to merge it so you can code further 15:30 RealBadAngel so what? one will be accepted i will commit another 15:30 RealBadAngel dont like, dont merge, simple as that 15:31 RealBadAngel sit and code it on your own, i wont be beggin for it 15:32 RealBadAngel but im really goin to sleep now, c you later 15:32 RealBadAngel have a nice day 15:32 PilzAdam c u 16:05 hmmmm why is it that when i actually need people to test my branch i can't find them 16:06 VanessaE heh 16:07 Jordach hmmmm, hm? 16:07 hmmmm hmmm 16:07 hmmmm jordach, would you like to do some testing? 16:07 Jordach depends if PilzAdam will compile 16:08 PilzAdam branch > PilzAdam > minetest.exe 16:08 Jordach thats the ticket! 16:14 hmmmm yeah my branch needs a bit of testing 16:14 hmmmm need to get a consensus on if it's okay or not 16:15 PilzAdam wich branch? 16:15 hmmmm new_emerge 16:15 hmmmm https://github.com/kwolekr/minetest/commits/new_emerge 16:16 Jordach VanessaE, ^^^^^^^ 16:16 VanessaE I already run it. 16:35 PilzAdam hmmmm, win build broken: https://gist.github.com/PilzAdam/5020356 16:37 hmmmm oh shoot 16:37 hmmmm in src/jthread/jmutex.h, add a semicolon to the end of line 91 16:39 PilzAdam hmmmm, https://gist.github.com/PilzAdam/5020383 16:40 hmmmm weird. 16:40 hmmmm should be in windows.h 16:41 hmmmm are you compiling this on windows 8 by chance? 16:41 PilzAdam I use mingw 16:43 hmmmm can you check if there is a "Processthreadsapi.h" present in your include directory? 16:43 proller https://github.com/celeron55/minetest/pull/482 - squashed, fixed, tested, ready 8-) 16:44 PilzAdam hmmmm, nope 16:45 hmmmm try adding #include on line 44 of src/porting.h 16:45 hmmmm oh oh okay 16:45 hmmmm i know the correct solution 16:46 hmmmm insert between lines 42 and 43 in src/porting.h the following: 16:46 hmmmm #define _WIN32_WINNT 0x0500 16:47 PilzAdam still same error 16:48 hmmmm ahh 16:48 hmmmm in src/debug.h, insert the same thing in between lines 34 and 35 16:49 PilzAdam still there 16:49 PilzAdam and I get tons of "warning: this is the location of the previous definition" 16:50 PilzAdam need to go now; bbl 16:50 hmmmm wow this is tough 17:08 sapier https://github.com/sapier/minetest/tree/scriptapi_split what do you think of it hmmmm and all others too of course? 17:09 hmmmm woah that's more than i thought 17:09 sapier ideed 17:09 hmmmm hrmm, i'd make inventory, itemstack, and detached inventory all the same 17:09 hmmmm pseudorandom and perlin can go together 17:11 hmmmm i would put the definition of enumstring and other enum related functions in lua_common.cpp and then have each enumstring definition in the associated file 17:11 hmmmm for example es_ItemType would go in lua_item.cpp 17:12 hmmmm it's a huge improvement as it is right now though 17:12 sapier problem with enum strings is that I'd need to include all those headers within the enum function 17:13 sapier I thought having it all in one place is better 17:13 sapier and doesn't result in including all headers in all modules via enum header 17:15 * VanessaE watches the mapgen make mincemeat out of her test world (LOTS of cutoffs at mapblock boundaries today) 17:15 Jordach testworld == server world 17:15 hmmmm you shouldn't need to include all the headers 17:16 VanessaE Jordach: no. my singleplayer world I use for testing mods. 17:16 Jordach aye, backed up 17:16 Jordach ? 17:16 VanessaE nope, just a random world. Not related to the sercver. 17:16 VanessaE server* 17:17 sapier itemstack inventory and detached inventory merged will be > 1k lines again 17:18 sapier maybe inventory and detached_inventory only? 17:18 sapier and merge itemstack to item? 17:18 hmmmm yeah 17:28 PilzAdam hmmmm, back 17:30 hmmmm alright https://github.com/kwolekr/minetest/commit/79a54cc86debba3a27d5c0ed23555898f1321195 17:30 hmmmm that ought to do the trick 17:35 PilzAdam works now 17:41 sapier https://github.com/sapier/minetest/commit/f45c0e1c4c819d83a4c127e3c0950e25c0b7336c next try hmmmm, I've removed enum, pseudorandom, itemstack and detached_inv 17:41 PilzAdam hmmmm, I get many "err:ntdll:RtlpWaitForCriticalSection section 0x116a18c "?" wait timed out in thread 0029, blocked by 002b, retrying (60 sec)" when running the build in wine 17:42 hmmmm oh god 17:42 PilzAdam hmmmm, and I also got this once: https://gist.github.com/PilzAdam/5020621 (is that related?) 17:42 PilzAdam it was when typing in the chat 17:42 hmmmm yeah that sounds related 17:43 PilzAdam heres the build: http://ompldr.org/vaGtiZw/minetest-0.4.4-d1-new_emerge-df2d85f-win32.zip 17:43 PilzAdam ^ Jordach 17:43 sapier hmmmm do you think it's already time for a pull request to get comments of others? 17:43 hmmmm what the heck 17:43 hmmmm huh? 17:43 hmmmm yeah i guess 17:47 VanessaE hmmmm: when you get some time, can you do an experiment for me? 17:50 hmmmm sure 17:51 VanessaE get Splizard's latest snow mod, and pull the latest moretrees and plants_lib. Using your new_emerge branch (for consistency), install those three mods plus minetest_game, make a new map in singleplayer mode. Watch what happens to stuff on the map. Find a snow biome where small firs (look for the fir cones) are being generated. Now erase the map and start the game again to force it to re-generate. Things are being moved 17:51 VanessaE around, cut off, erased, redrawn, etc. as the terrain and content are being added. I'm 99% certain this is due to bugs we've already discussed, but I'm a little paranoid that I screwed something up in my code. 17:51 VanessaE eek, sorry for writing a novel there. 17:52 hmmmm sounds like a lot of work 17:52 hmmmm alright 18:07 * VanessaE hands hmmmm a few towels to clean up all the blood spillage (from head exploding) 18:58 hmmmm ho boy 18:58 hmmmm alright 18:59 hmmmm first things first, plizadam, did that error happen at the same time as the critical section timeout? 18:59 hmmmm and what were you doing at the time when it happened? you weren't emerging any blocks by any chance, right? 18:59 PilzAdam the critical section timeout happens all the time 19:00 hmmmm and it doesn't happen in upstream 19:00 PilzAdam and the other thing happend when I typed "/grant singleplayer all" into the console and hit enter 19:00 PilzAdam but the world was generating in background 19:00 hmmmm alright that might be unrelated then 19:01 hmmmm looking at the backtrace, it seems like an irrlicht thing exclusively 19:01 hmmmm and i hope that hasn't consistently been happening 19:02 hmmmm and as for the critical section thing... minetest doesn't crash or otherwise stop working when you get that error, correct? 19:02 PilzAdam it is slow, but that might be wine only 19:03 hmmmm well is it a constant stream of errors? 19:03 PilzAdam kinda 19:04 hmmmm it seems like it may be a wine bug 19:04 hmmmm it'd be nice if we could try this on real windows 19:04 hmmmm any windows users around..? 19:05 VanessaE no windows here except for that which exists under Virtualbox, and in my upstairs walls and doors ;) 19:05 hmmmm man it would really be nice if wine told you more about what those threads are 19:06 hmmmm it seems like all this new emerge stuff really was a nuclear disaster 19:06 hmmmm i was expecting to have at least some problems, but nothing like this 19:08 PilzAdam added it to my forum topic 19:08 PilzAdam now wait for testers... 19:08 hmmmm AHHHHHH 19:08 hmmmm WAITING 19:08 PilzAdam Jordach, poke 19:09 hmmmm vanessa, about your thing now 19:09 VanessaE oh boy. 19:09 * VanessaE braces 19:09 hmmmm did this problem happen with upstram or just mine? 19:09 hmmmm gotta know that first 19:10 VanessaE I've seen mapgen cutoffs in mainstream, but never this bad. 19:10 VanessaE and shit moving around/erasing/redrawing too 19:10 Jordach PilzAdam, wut 19:10 VanessaE seems like the more load that's added to the mapgen, the worse the effect 19:10 hmmmm so the moving around/erasing/redrawing stuff is happening in mainstream as well 19:10 VanessaE s/load/content/ 19:10 VanessaE yes 19:10 hmmmm but not as bad 19:10 VanessaE it's just not as acute, but I've never run the snow mod with mainstream 19:10 PilzAdam Jordach, test the new_emerge branch (see my win32 build topic) 19:11 Jordach later 19:11 hmmmm the cutoff thing is the lesser of three evils 19:11 hmmmm i made a conscious decision to leave that in there to save the trees from getting pwned 19:11 VanessaE they're still getting trashed.. 19:12 hmmmm and either one of those had to suffer or else the whole thing would be way too slow and crappy 19:12 hmmmm alright, i'll take a look... 19:13 VanessaE https://github.com/VanessaE/plantlife ~~ https://github.com/VanessaE/moretrees ~~ https://github.com/Splizard/minetest-mod-snow/ 19:13 VanessaE there's the links for all three 19:13 hmmmm getting 19:14 VanessaE expect ~5 mins to install, about half an hour or so to get a good idea of what I'm seeing. 19:15 VanessaE recommend you have a good book or some valium on hand, the slowness of the mapgen in this situation will make you want it. :-) 19:15 hmmmm and you said i need minetest_game as well? 19:15 VanessaE yeah 19:15 VanessaE though mostly because stuff depends on default. 19:15 VanessaE may as well have the full thing for the sake of consistency 19:15 hmmmm now i have to put in minetest_game a special way, right? 19:16 VanessaE naw, just stick it in ~/.minetest/games 19:16 VanessaE the others can just go in ~/.minetest/mods/minetest as usual 19:16 VanessaE nothing special about installing them 19:16 hmmmm well that was the exception i was talking about 19:17 hmmmm minetest_games goes in games whereas the others go in mods/minetest 19:17 VanessaE yep 19:17 hmmmm i'm not a real mod afficionado by the way 19:18 hmmmm jesus christ 19:19 hmmmm it takes about 4 seconds for me too 19:19 hmmmm and that's why only one cpu is being used, because it really takes that long inside of the envlock 19:19 hmmmm so no other threads can do any emerging 19:19 VanessaE at one point a mapgen call took 16 seconds to complete 19:19 hmmmm and that's not a mapgen call 19:19 hmmmm that's all lua 19:19 VanessaE well whatever you were calling it :) 19:19 hmmmm that's the problem, the mods being slow 19:20 VanessaE nono, take the snow mod out and leave just moretrees + plantlife. You already know those are pretty fast 19:21 VanessaE snow much just makes it so slow that the effects I was referring to are really pronounced 19:21 VanessaE s/much/mod/ 19:25 hmmmm well i can see why it gets cut off 19:25 hmmmm part of the border zone is being passed along to lua 19:35 PilzAdam hmmmm, test results: http://forum.minetest.net/viewtopic.php?pid=72268#p72268 19:38 hmmmm wow. 19:38 hmmmm this is a disaster. 19:38 hmmmm let's see here 19:38 hmmmm ERROR some exception std::bad_alloc, "seemed to do so by eating HDD instead of CPU resources" 19:39 hmmmm runaway allocation 19:39 hmmmm for the second guy it was eating his pagefile 19:39 hmmmm so i know there's a big problem but i have no idea what it can be, because of all the vaguery 19:42 hmmmm plizadam, tell them to add num_emerge_threads = 1 in their config file and try again 19:46 VanessaE whoa 19:46 VanessaE my default config lost that setting. 19:55 PilzAdam hmmmm, http://forum.minetest.net/viewtopic.php?pid=72280#p72280 19:56 VanessaE it's really weird seeing the CPU spiking to 4 cores but only for little 1/2 to 1 second intervals. 19:57 VanessaE that stupid locking thing is really killing us, isn't it? 20:01 hmmmm it is 20:01 hmmmm i know there's hardly a fix for us 20:02 hmmmm what i'm most worried about is things being cut off. now that i'm thining about it, logically there is no way that should happen 20:25 hmmmm vanessa.... the master is cutting off the snow biomes too 20:25 VanessaE I figured that would be the case 20:25 VanessaE well at least it means you didn't break anythign :D 20:26 VanessaE (Not that I thought you did of course) 20:47 RealBadAngel im testing it too 20:48 RealBadAngel the trees are being cut or moved all the time 20:49 RealBadAngel when launched game, waited like 30s on a very few blocks waitin for anything to appear 20:49 RealBadAngel now got tons of this: 20:49 RealBadAngel 21:41:12: ERROR[main]: WARNING: before createPlayingSound: invalid name 20:49 RealBadAngel 21:41:12: ERROR[main]: WARNING: createPlayingSound: invalid value 21:18 RealBadAngel hmmmm, are you here? 21:19 VanessaE I think his head exploded again 21:20 PilzAdam set num_threads = 1 in hmmmm.conf so his head doesnt overheat 21:20 VanessaE lol 21:21 VanessaE I gave him something to test and he crashed ;) 21:26 RealBadAngel i would like to make lsystems trees use block seed. but i can hardly find anything but the caves that actually use block seed fot generation 21:26 RealBadAngel somebody knows any other examples? 21:27 PilzAdam https://github.com/PilzAdam/minetest/commit/139635eacb5998fe048594a24284e89f9468c8ec 21:27 PilzAdam you can use the same system for the lsystem trees, just pass a seed to the spawning function and base everything on that 21:30 RealBadAngel from where do i get seed? 21:30 RealBadAngel http://pastebin.com/Rtui70hn 21:31 PilzAdam do you need it on mapgen or after that? 21:31 RealBadAngel both cases 21:32 RealBadAngel i just need map seen i assume 21:32 PilzAdam https://github.com/celeron55/minetest/blob/master/src/mapgen_v6.cpp#L493 21:33 RealBadAngel i know that in data->seed is a map seed 21:33 RealBadAngel but i dont have that data 21:34 RealBadAngel question is from where get map seed 21:34 PilzAdam map.getSeed() 21:35 RealBadAngel thx, lets try to apply it then 21:36 PilzAdam actually ServerMap.getSeed() 21:48 PilzAdam proller, are you OK with that: https://github.com/PilzAdam/minetest/commit/bc2e9dbaf2fe31a1aa8282c0ac7c87aee490c75c 21:49 proller PilzAdam, whats wrong? 21:49 PilzAdam if you create a server in the GUI it ignores the setting of server_announce in minetest.conf 21:50 PilzAdam it just sets it to false 21:51 proller 1 is not true or why? 21:53 PilzAdam If someone adds server_announce = 1 in minetest.conf, then starts a server in the GUI the setting is overridden because the default value for the "Public" checkbox is false 21:54 PilzAdam my patch reads the value from minetest.conf and sets the checkbox accordingly at startup 21:54 PilzAdam and now I asked you if it was intentionally that you ignore the setting in minetest.conf when starting the GUI or not 21:56 RealBadAngel heh i wondered why i seen no effects of this patch. havent seen that server stuff yet 21:57 proller PilzAdam, it was accidentally 21:57 PilzAdam k 22:15 hmmmm i went out to eat with the family 22:16 hmmmm anyway vanessa 22:16 hmmmm the flaw is either with existing code, or the mod itself 22:16 * VanessaE prepares for bad news 22:16 hmmmm let's see which... 22:16 VanessaE hmmmm: turn on debugging in plants_lib 22:17 hmmmm what how why 22:17 VanessaE init.lua, there's a variable near the top of the file. it'll show you what my mapgen code is doing 22:17 RealBadAngel hmmmm, im applyin seed stuff to the trees right now 22:17 hmmmm okay 22:18 RealBadAngel will have one question shortly (propably) 22:18 PilzAdam hmmmm, why does v6 not use the make_tree() function in treegen.cpp? 22:18 VanessaE PilzAdam: that's reserved for moretrees beech for now. 22:18 VanessaE oh wait. wrong function. 22:21 hmmmm anyway yeah, the problem must be in the snow mod 22:21 RealBadAngel shall i include mapgen to get this? http://pastebin.com/Rtui70hn 22:21 hmmmm go run it in current upstream, vanessa, you'll see the same kind of cutoffs 22:21 RealBadAngel or just copy it? 22:21 VanessaE how would the snow mod cause moretrees to get ripped up though? 22:22 PilzAdam RealBadAngel, include mapgen 22:22 hmmmm that must be a different problem 22:22 RealBadAngel now, which one? :) 22:23 hmmmm plizadam, it doesn't use that because i didn't remove that yet 22:23 PilzAdam RealBadAngel, were in the code do you generate the trees? 22:23 RealBadAngel this is in both mapgen.cpp and mapgen_v6.cpp 22:24 hmmmm use the one in mapgen.cpp 22:24 hmmmm EmergeManager::getBlockSeed() 22:24 hmmmm i know it doesn't have the z coordinate fixed yet, i have that fixed in the new_emerge branch 22:25 hmmmm leave it unchanged to prevent a merge conflict 22:28 RealBadAngel damn its not exposed in mapgen.cpp 22:29 RealBadAngel .h i mean 22:34 RealBadAngel last problem: http://pastebin.com/G28TZ7ti 22:34 RealBadAngel whats wrong with it? anybody knows? 22:34 PilzAdam what? 22:35 PilzAdam you want to get the blockseed in spawn_ltree()? 22:35 RealBadAngel nvm,figured out 22:35 RealBadAngel -> instead of . 22:36 RealBadAngel lets see what how it will work now with new emerge 22:37 PilzAdam RealBadAngel, it would be better to pass a seed as a parameter to the function 22:38 PilzAdam and use blockseed only in mapgen 22:38 PilzAdam otherwise you would get the same tree every time you spawn a tree in the same block 22:40 RealBadAngel my function is not called by mapgen 22:40 RealBadAngel and has now seed parameter 22:41 PilzAdam then add a seed parameter 22:41 PilzAdam and give Lua the ability to pass a seed to the function so mods like moretrees wich call it on mapgen can pass it to it 22:42 PilzAdam if Lua doesnt provide a seed just create one with myrand() 22:42 RealBadAngel http://pastebin.com/qJLaPh7N 22:44 RealBadAngel but whatever seeds the problem of cutting trees is not because of them 22:44 PilzAdam nobody said that 22:44 RealBadAngel adding this was unecessary, trees are being cut as they were before 22:46 PilzAdam seedbased trees are still wanted 22:46 PilzAdam just add my patch too and open a pull request for that 22:46 RealBadAngel what patch? 22:47 RealBadAngel for old trees? 22:47 PilzAdam https://github.com/PilzAdam/minetest/commit/139635eacb5998fe048594a24284e89f9468c8ec 22:48 RealBadAngel ok, i will 22:49 PilzAdam and also remove mapgen_v6::make_tree() and use treegen::make_tree() instead 22:49 RealBadAngel hmm? 22:49 RealBadAngel its his area 22:50 RealBadAngel hmmmm, what do you think about it? 22:58 RealBadAngel ps.range(1,100) is any way different from myrand_range(1,100) ? 22:59 PilzAdam nope 22:59 RealBadAngel it has to be different somehow 23:00 PilzAdam ps is based on a different seed 23:00 RealBadAngel it destroys trees 23:01 PilzAdam how? 23:01 RealBadAngel apple trees consists only of apples and no leaves lol 23:01 PilzAdam with my patch? 23:01 RealBadAngel only thing changed there is ps.range instead of myrand 23:02 RealBadAngel im talkin about trees, not sticks 23:02 PilzAdam can you paste the diff? 23:10 RealBadAngel diff is use of ps.range instead of myrand_range 23:10 RealBadAngel ps.range doesnt work too good 23:12 RealBadAngel when i use it to randomize leaves i do get no leaves at all, or all leaves replaced by fruits 23:12 RealBadAngel it produces not randoms but same values for each use 23:24 hmmmm RealBadAngel, looks okay 23:27 RealBadAngel i obverved now strange glitch 23:28 RealBadAngel for like 30s after starting new world i was standing next to palm tree 23:28 RealBadAngel on just 2 16x16 generated blocks 23:28 RealBadAngel then suddenly on the very same block this particular tree disappeared 23:28 VanessaE yes 23:28 RealBadAngel and 3 others popped up 23:28 VanessaE I see that happen too 23:28 VanessaE I am certain the mapgen is being run twice 23:29 VanessaE almost as though it's doing this: generate -> populate -> generate again -> populate again -> caves 23:30 VanessaE (where "populate" = "execute Lua on_generated hooks) 23:34 RealBadAngel ok, i solved seed problems 23:34 RealBadAngel now how to pass it from lua? 23:34 RealBadAngel maybe in treedef table? 23:34 RealBadAngel or as a parameter? what do you think? 23:43 RealBadAngel i will pass it in table 23:50 RealBadAngel hmmmm, could you merge this? https://github.com/celeron55/minetest/pull/503 23:50 RealBadAngel i would like to upload treegen changes then 23:52 hmmmm what do others think of that... 23:53 VanessaE actually, having in-game volume controls would be useful 23:53 hmmmm but, as a single button in the main menu? 23:54 VanessaE I haven't tried his patch actually. 23:55 RealBadAngel main menu wont work for multiplayer 23:55 hmmmm what would celeron say 23:55 RealBadAngel in main menu you will change volume only for singleplayer game 23:55 RealBadAngel once youre connected to server local settings doesnt matter 23:56 RealBadAngel we tried this on VanessaE server 23:56 hmmmm well okay 23:56 hmmmm what's the harm 23:56 RealBadAngel with this patch each player can adjust its own volume 23:57 hmmmm wow that is a lot of code for a single menu 23:57 RealBadAngel nothing harmless, just new option in ingame menu 23:57 hmmmm but anyway i wish it were a more general "config" menu 23:58 RealBadAngel it should be added to main too 23:58 RealBadAngel as exit to os 23:58 RealBadAngel and some other stuff 23:58 RealBadAngel toggle fullscreen, set resolution etc 23:59 VanessaE hmmmm: did you see our comments above re: stuff just dissappearing and being replaced with entirely new content? 23:59 VanessaE disappearing* 23:59 hmmmm yeah 23:59 RealBadAngel but this is not small patch, you have already seen what it takes to create simple menu lol 23:59 VanessaE ok. 23:59 hmmmm that's not on my branch you're talking about, right? 23:59 RealBadAngel on yours 23:59 hmmmm oh on mine 23:59 RealBadAngel i tested it with seeded trees 23:59 VanessaE master and extends to yours also