Minetest logo

IRC log for #minetest-hub, 2019-05-17

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

All times shown according to UTC.

Time Nick Message
01:03 ANAND joined #minetest-hub
02:11 scr267_ joined #minetest-hub
03:10 ssieb joined #minetest-hub
03:16 TommyTreasure joined #minetest-hub
06:12 pyrollo joined #minetest-hub
06:42 CWz joined #minetest-hub
09:34 ANAND https://github.com/features/package-registry :O
09:46 ANAND My exams are around the corner, so I'll be unavailable for the next 25-30 days. Cya'll later! :)
09:51 Fixer joined #minetest-hub
11:04 calcul0n joined #minetest-hub
11:47 calcul0n joined #minetest-hub
13:00 scr267 joined #minetest-hub
13:18 scr267 joined #minetest-hub
13:34 scr267 joined #minetest-hub
14:03 aerozoic joined #minetest-hub
14:11 srifqi joined #minetest-hub
14:12 IhrFussel joined #minetest-hub
14:13 srifqi left #minetest-hub
14:21 Sokomine joined #minetest-hub
14:22 Sokomine re
14:24 IhrFussel Hi guys =)
15:22 FrostRanger joined #minetest-hub
15:30 BuckarooBanzai8 joined #minetest-hub
15:41 Krock joined #minetest-hub
15:41 Krock ree
16:20 benrob0329 https://youtu.be/7YqcDmvgNrY
16:21 benrob0329 Making The Tree Farm - Ayums - Episode 4
16:52 FrostRanger joined #minetest-hub
16:53 IhrFussel Looping through all connected players and checking if their name is a key inside a certain table shouldn't lag the server right?
16:54 sfan5 no of course not
16:54 IhrFussel Also not when I run that check every step?
16:55 sfan5 <sfan5> no of course not
16:55 IhrFussel So I'm guessing it will take a few µs at best to execute
16:56 VanessaE it would be better to use on-join/on-leave and just track players' presence that way
16:58 VanessaE check if the player "is inside a certain table" and build a table of matching players at that point
17:00 IhrFussel Would it make a difference vs minetest.get_connected_players()?
17:00 VanessaE maybe not but it'd be faster
17:01 VanessaE too many "but it's fast enough *this* way" eventually becomes "it's too slow".
17:02 VanessaE basically, don't do in continuous realtime (== globalstep) that which can be coded to be event-driven
17:05 IhrFussel This is about a HP bar on the screen that needs to track the HP for a few secs before disappearing again ... so when the bar appears I store the player name and timestamp in the table and in globalstep I check if the player name exists and timestamp reached a few secs in the future and then remove the HUD from screen but if it didn't expire yet then I update the HUD for the player
17:07 IhrFussel My server step is set to 0.15 seconds so no the HUD will not be updated that much per sec
17:08 IhrFussel On average maybe 5 players will have the HUD enabled at the same time
17:10 IhrFussel And my average player count is 15-20 mostly ... so ~ 75% will just be skipped in the loop
17:15 VanessaE track HP ... a change in HP is an event you can react to, is it not?
17:15 VanessaE and can you not use minetest.after() to set the disappear delay?
17:16 IhrFussel It's not the player HP, it's mob HP
17:16 VanessaE isn't there a callback for when a mob takes damage, also?
17:18 Krock IhrFussel: well, as long your table is not a million indices long, that shouldn't be a problem. Not sure how efficient the key/value lookup is
17:19 Krock but for online players, say 30 it's never going to be a problem
17:21 IhrFussel I already use that callback but I need to track the HP also for a few secs even when you don't attack the monster anymore in case something/someone else attacked it else it looks bad
17:21 IhrFussel Here is a demo https://ihrfussels-server.de/hpdemo.mp4
17:25 Krock you could also attach an entity to the monsters and update it when it's hit. other players will then also see the condition of the monster
17:36 BuckarooBanzai joined #minetest-hub
17:58 ssieb joined #minetest-hub
18:04 _Xenon joined #minetest-hub
18:12 ircSparky joined #minetest-hub
19:40 GreenDimond joined #minetest-hub
20:13 aerozoic joined #minetest-hub
21:02 Gael-de-Sailly joined #minetest-hub
21:17 ssieb joined #minetest-hub
21:39 scr267_ joined #minetest-hub
21:51 BuckarooBanzai joined #minetest-hub

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