Minetest logo

IRC log for #minetest, 2023-06-18

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

All times shown according to UTC.

Time Nick Message
00:10 mmuller joined #minetest
00:40 Noisytoot joined #minetest
01:17 smk joined #minetest
01:21 Kilroy joined #minetest
01:29 fluxionary today, i discovered lua coroutines. i love them in python, but i'm unsure about whether i want to use coroutines in mods. i've never seen them in mod code i've contributed to (noting that a search shows they're in techage, techpack, lwcomputers, and modlib).
01:30 fluxionary they *absolutely* make an iterator i'm working on much saner though, if you understand what you're looking at.
01:36 fluxionary the application is an attempt to make `minetest.get_objects_in_area` faster
02:02 luk3yx joined #minetest
02:10 muurkha in Lua (and Squirrel) they're more flexible than Python generators; they have stacks
02:46 Lesha_Vel joined #minetest
03:05 fluxionary i agree, they're more powerful than python generators, but python also has equivalent coroutines
03:06 fluxionary (coroutines equivalent to what lua has)
03:22 whosit joined #minetest
04:00 MTDiscord joined #minetest
04:06 est31 joined #minetest
04:11 lmisu joined #minetest
04:20 muurkha well, Python has threads, which you can make equivalent to Lua coroutines by adding a single lock to your program so they can't ever preempt each other
04:21 muurkha but possibly you are incorrectly thinking async and await in Python is equivalent to Lua coroutines; they aren't and you can't simulate Lua coroutines with them
04:21 muurkha and Python threads are OS threads, so they're orders of magnitude less efficient than Lua coroutines
04:22 lissobone Hi.
04:24 lissobone I've finished the checkpoint mod, but I want to know your opinion: when I use the ret pad and teleport back, the velocity with which the player was moving prior teleportation remains.  Would it be wiser to limit the freedom of movement and set player velocity to (0, 0, 0)?
04:25 lissobone Basically, if you were falling and teleported back, you might take fall damage.
04:25 lissobone Leaving this opens up some room for tricks and hacks.
04:33 lissobone I'll just add 2 types of checkpoints: one that keeps velocity and one that doesn't.
04:38 Blockhead256[m] lissobone: it's probably for the best to set an exact point and 0 velocity (or pre-defined, if you must, though with lag that might be bad) to restore the player to.  Otherwise the player risks getting stuck in a loop.
04:44 lissobone Hmm, alright.
04:45 lissobone I limited the pad use range to 2.7 so the player would have to stand pretty close to it, thus reducing the chance of randomly falling anywhere.
05:21 Teckla joined #minetest
05:24 calcul0n joined #minetest
05:44 lissobone Players, unfortunately, do not support set_velocity, but I hacked my way to winage and remembered how I studied math at school: x - (x + x) equals -x, and adding -x to x (negative velocity plus regular velocity) yields 0 ({x = 0, y = 0, z = 0}).
05:47 lissobone Here's how to make use of it:  'local vel = player:get_velocity() player:add_velocity(vector.subtract(vel, vector.add(vel, vel)))'
06:10 definitelya joined #minetest
06:12 Cork joined #minetest
06:30 Evergreen joined #minetest
06:49 whosit lissobone: that is equivalent to: vector.add(vel, vector.multiply(vel, -1))
06:50 lissobone Well, that's also true.  I had the multiply way in mind, but instead I wanted to subtract the double of the vector from itself.
06:52 whosit just saying :)
06:53 lissobone And your way yields a null vector, I believe: vel + -vel = 0.
06:54 whosit hm?
06:54 whosit that wasn't the point? to zero out the speed?
06:56 lissobone Players don't support set_velocity, only add_velocity.
06:57 whosit you mean player:add_velocity(vector.multiply(player:get_velocity(), -1)) ?
06:58 lissobone Yes, that.  But the documentation page said something about deprecation, maybe I read it wrongly (?).
07:02 whosit I found only this: https://github.com/minetest/minetest/blob/1b95998d11fb0d51fbfeedc56de4ca2191ad3f7a/doc/lua_api.txt#L7261
07:06 whosit was just saying you can do same thing with less steps, which does not matter in this case, except may be less confusing (at least to me)
07:17 mrkubax10 joined #minetest
07:36 nore joined #minetest
08:03 jvalleroy joined #minetest
08:22 Warr1024 joined #minetest
08:46 Warr1024 joined #minetest
09:06 appguru joined #minetest
09:09 lissobone I have released the checkpoint mod, but -- oops! -- forgot to add the license notice.
09:15 MTDiscord <luatic> fluxionary: making iterators more convenient is a typical use case of coroutines, go right ahead :)
09:15 MTDiscord <luatic> in fact the usage of coroutines in modlib is due to iterator utils
09:22 lissobone Final question.
09:24 lissobone When a player punches the checkpoint, it blinks with green for approximately 1/√2 (0.717) seconds, then turns red again.  Would it be appropriate to set the checkpoint position metadata only after the green period?  This opens up room for some cool tricks.
09:24 lissobone Why am I even asking?
09:28 lissobone I only wonder how to change anything in the inventory inside a minetest.after() clause.
09:29 sfan5 @luatic the patch you provided for spiraling-down seems to incomplete, I don't see a single call to register_mapgen_dofile
09:29 sfan5 +be
09:30 MTDiscord <luatic> let me check
09:32 sfan5 even better when you have the changes just push them to a branch
09:32 MTDiscord <luatic> ah yeah, I had an uncommitted file that didn't make it into the diff
09:43 Warr1024 joined #minetest
10:01 MTDiscord <luatic> sfan5: here you go: https://github.com/spiraling-down/game/tree/mapgen-threads (got sidetracked while compiling https://xkcd.com/303/)
10:01 MTDiscord <luatic> thank you very much for your work, it makes SD almost playable now that the main thread isn't constantly blocked :)
10:06 lissobone Almost playable?
10:09 sfan5 fyi you can import files even from the mapgen env, so the sd_map:stuff hack might not be necessary
10:11 MTDiscord <luatic> lissobone: there's still quite some optimization to be done even if mapgen doesn't block the main thread anymore
10:52 YuGiOhJCJ joined #minetest
11:30 appguru joined #minetest
11:47 BuckarooBanzai joined #minetest
11:54 peterz joined #minetest
11:56 Talkless joined #minetest
12:05 sfan5 @luatic I can't reproduce the error messages you meant
12:06 sfan5 plus: I spawned inside a node, this text is overlapping: https://0x0.st/HT1p.png, the window with the story didn't disappear automatically
12:06 sfan5 and the music is quite loud
12:08 sfan5 and there's z-fighting on sd_map:deco_pebbles_basalt_1
12:09 sfan5 respawning drops me far in the sky
12:09 sfan5 also z-fighting on snow somehow
12:10 sfan5 plus it's hard to keep track of the information I get dumped on me in the beginning
12:10 sfan5 at least a "show item name when hotbar selection changes" thing would be nice
12:28 kevinsan joined #minetest
12:33 TheSilentLink joined #minetest
12:45 TheSilentLink joined #minetest
12:55 Talkless joined #minetest
13:09 peterz joined #minetest
13:15 peterz joined #minetest
13:18 TheSilentLink joined #minetest
13:22 mrkubax10 joined #minetest
14:06 olliy joined #minetest
14:09 qur joined #minetest
14:47 proller joined #minetest
15:14 Thomas-S joined #minetest
15:14 Thomas-S joined #minetest
15:20 MTDiscord <luatic> sfan5: It currently doesn't error for me either. This was a while ago, you've probably fixed the underlying cause since then.
15:20 sfan5 I don't think I have but 🤷
15:27 appguru joined #minetest
15:43 Alnotz joined #minetest
16:05 uyku joined #minetest
16:11 lissobone joined #minetest
16:13 sparky4 joined #minetest
16:15 Desour joined #minetest
16:16 fluxionary joined #minetest
17:18 qur joined #minetest
17:49 mrkubax10 joined #minetest
17:54 dabbill joined #minetest
18:32 Wuzzy joined #minetest
18:33 Wuzzy do i have access to moveresult to players, too?
18:33 Wuzzy because I want to look at touching_ground (which tells me if an entity is touching the ground)
18:33 Talkless joined #minetest
18:34 sfan5 nope
18:34 Wuzzy Someone reported a strange bug for my game. Apparently the player Y velocity isn't reliably 0 anymore when the FPS is high, like 165. https://codeberg.org/Wuzzy/Glitch/pulls/35
18:35 Wuzzy i suppose looking at the player Y velocity to check if im touching the ground isnt a great idea, right? :D
18:36 sfan5 that's an engine bug, probably
18:37 sfan5 similar to this https://github.com/minetest/minetest/issues/10962
18:40 Krock the movement is really jerky with 800 FPS according to my tests
18:41 Wuzzy any tips on how to check "this player is standing on the ground?"
18:42 Krock pos.Y - 0.1
18:43 Wuzzy not precise for me. if the player moves vertically, thats not "standing". seems like i kinda am forced to test vertical vel but it goes weird at high FPS
18:46 Krock when they're moving vertically they have no solid ground under their feet position, neither if the speed is positive
18:47 Krock it could be that the collision detection does not exactly set the player at the node's surface, resulting in slightly nonzero downwards velocities. these however should still be <0.1 in absolute value
18:49 uyku joined #minetest
18:50 Wuzzy funny you say this because 0.1 is exactly the value suggested to me by the PR author :D
18:51 Wuzzy it still feels off the vel Y value wiggles around 0 instead of staying exactly 0.
18:52 Wuzzy but yeah the issue in my game seems to be i set the current threshold to 0.001 instead of 0.1 so maybe it was just too low.
19:00 uyku joined #minetest
19:11 zuffnick joined #minetest
19:13 zuffnick wo gibts die besten mods?
19:13 Krock bei Marcel D'Avis von 1&1
19:13 zuffnick :)
19:14 zuffnick oder bei obi?
19:14 Krock #minetest-de ist übrigend wür deutschsprachige Diskussionen. hier nur auf English.
19:22 Ingar joined #minetest
19:29 uyku joined #minetest
19:30 appguru joined #minetest
19:39 sparky4 joined #minetest
19:41 Juninho joined #minetest
20:01 imi joined #minetest
20:17 dabbill joined #minetest
20:24 Desour joined #minetest
20:25 uyku Desour: sup
20:25 Desour hi
20:26 uyku Desour: send another msg, am testing something
20:26 Desour ok
20:26 uyku Yass, it works
20:27 uyku Are you playing today?
20:27 Desour maybe
20:40 Thermoriax joined #minetest
20:45 uyku joined #minetest
20:45 lhofhansl joined #minetest
20:46 proller joined #minetest
20:52 MinetestBot [git] numberZero -> minetest/minetest: Cull liquid back face on liquid-glasslike interface (#13594) f1feeb3 https://github.com/minetest/minetest/commit/f1feeb319c0a64ee18fb8b29571d5540c084e12c (2023-06-18T20:52:14Z)
20:54 Guest26 joined #minetest
20:55 Guest37 joined #minetest
22:34 panwolfram joined #minetest
22:37 natewrench joined #minetest
22:54 sparky4 joined #minetest
23:09 proller joined #minetest
23:21 Guest20 joined #minetest
23:22 Guest20 is there an sdl2 build of minetest for windows? many mouse issues in the non-sdl2 version of it
23:22 Guest20 seemed like sdl2 might fix it but i can't find builds
23:25 Desour Guest20: yes
23:25 Desour build with -DUSE_SDL2=1
23:25 Guest20 no i mean ready builds
23:25 Guest20 i tried to do it myself but idk how to use all this stuff
23:26 Desour no
23:26 Guest20 will it switch to sdl2 in the next release at least?
23:27 Desour possibly
23:27 Guest20 heres hoping then
23:27 Guest20 thanks for the helpe
23:27 Guest20 *help
23:27 Desour !next
23:27 MinetestBot Another satisfied customer. Next!

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