===== Seznam linků které by se mohly časem hodit ===== * [[https://github.com/Bremaweb?tab=repositories|Bremaweb github]] * [[https://github.com/minetest/minetest/blob/master/doc/lua_api.txt|Lua api doc]] * [[https://github.com/Pitriss/classic_technic_game|pitrissův fork starší verze technic]] kvůli nezmršeným receptům a elektrickým výkonům * v latest verzi - cca 5.10.2013 - byly udělány změny, které mají za následek přílišné zjednodušení hry * MV wind milly s výkonem 3k2 EU * HV solar panely s výkonem 4k2 EU * switching station potřebuje na výrobu jen LV transformátor * elektrické stroje v nečinnosti nemají standby odběr (50 EU na mašinu) * workshopy jsou změněny z LV na MV * [[http://wiki.minetest.com/wiki/Setting_up_a_server/Ubuntu|Jednoduchý návod na zprovoznění minetest serveru]], inspirace konfigurace složek ve skriptu. * [[https://forum.minetest.net/viewtopic.php?id=2840|Nodebox Generator]] - program na tvorbu bloků různých tvarů * [[http://forum.root.cz/index.php?topic=7533.msg73935;topicseen#new|VPN a iptables]] ohledně default GW pro OpenVPN - jen pro záznam ==== jak zvětšit počet nodů ==== [01:29:18] I want to ask, is planned to allow more than circa 4k nodes? [01:34:47] yes [01:34:58] if the appropriate people will just fucking commit to it already :) [01:35:43] edit mapnode.h line 46 [01:35:47] I set mine to 0x7fff but I personally think a value of 0xc000 or so is appropriate. [01:55:05] VanessaE: oh thanks:) [01:56:44] VanessaE: btw it is server only setting, right? So it will be possible to connect with standard client too.. [01:57:32] yes [01:57:43] all modern clients can already handle it [01:58:01] anything pre-July 22 will not work though if you define more than 4k nodes. [01:58:27] (that includes 0.4.7-stable) [02:01:37] ok.. i don't really care about stable clients. so it is ok for me:) [02:01:59] ok :) ==== Detekce vzdálenosti ==== [16:29:10] please did someone invented some quick way how to get distance of player from some spot on map? I don't want to re-invent a wheel:) [16:30:34] pitriss: vector.distance [16:30:49] pitriss, pythagoras' theorem, or use vector.distance(p1, p2) [16:32:31] so vector.distance(coords1, coords2).. I guess coords are tables:) Thank you guys:) [16:32:54] and sorry for my noobish questions..:) [16:33:00] tables like {x=1, y=0, z=7} ==== Definice max_lag ==== [21:43] Wouldn't max_lag be a better value to announce as lag than the step time? [21:44] Can someone explain to me what max lag is supposed to be? [21:45] sapier, AFAIK its the time spend in Lua code [21:47] sapier: http://pastebin.ubuntu.com/6845876/ [21:48] Basically dtime that decreases only slowly. [21:49] hmm ok guess we need to think about this way of determine lag later as it doesn't honor network lag [[http://pastebin.ubuntu.com/6845876/]] float max_lag = m_env->getMaxLagEstimate(); max_lag *= 0.9998; // Decrease slowly (about half per 5 minutes) if(dtime > max_lag){ if(dtime > 0.1 && dtime > max_lag * 2.0) infostream<<"Server: Maximum lag peaked to "<reportMaxLagEstimate(max_lag); Další pěkné vysvětlení max_lag, by Zeno: https://forum.minetest.net/viewtopic.php?t=10884&p=167238#p167292 >max_lag is kind of diffucult to explain. If you're interested in your **own** lag, RTT is the value you want to be looking at (not max_lag). > >What max_lag (very basically) is how long the server takes to process a single "server step" (i.e. update the environment, make new map blocks, reply to all clients... stuff like that). Let's call that server_step_time. Every time server_step_time is greater than twice the current max_lag then max_lag becomes that new server_step_time. > >Once the CPU processing spike goes away the max_lag decreases by .02% every server_step (unless it goes up again) until it again reaches the "normal" server_step time. This can take a while (maybe 5-10 minutes). So even if max_lag is showing, say, 5.6s the current server lag may be (and probably is) a lot less. > >Anyway, from a client perspective RTT is the value you should be looking at, and that's for your client only. The minimum value for RTT is at least server_step_time, so it *is* kind of associated with max_lag for a particular instant but because of the way max_lag is calculated and decreased slowly it's not very well correlated at all (unless max_lag is constant). > >Err, it's kind of complicated isn't it :/ max_lag is not really useful from a client's perspective at all because there is nothing the client can do about it. It's really more useful for people running a server and tuning server-side values. Even then, because max_lag is a weighted average (in effect) using a fixed value for the weight it's uses are (currently) limited (IMO) ==== Zálohování DB bez restartu MT serveru ==== http://irc.minetest.ru/minetest/2015-01-19#i_4121156 vitaminx: >btw. i just found a method to safely backup map.sqlite *without* stopping the server >create a file called "backup.sql" and put this inside: begin immediate; .shell cp $HOME/.minetest/worlds/world/map.sqlite $HOME/map.sqlite_backup rollback; >then tell your backup script to execute this line: echo ".read backup.sql" | sqlite3 -echo .minetest/worlds/world/map.sqlite >DB stays consistent and user stay logged in - they probably notice a short lag while the DB file is copied, thats all twoelk: >vitaminx: doesn't rollback freeze youre server? vitaminx: >it gets a lock on the DB, so minetest has to wait with it's writes - thats what I mean with short lag >i will test it today, lets see if its really noticeable >having a short lag is probably still better then to disconnect all players