Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
feat: Add AFK state for players in multiplayer #3571
Conversation
|
Hooray Jenkins reported success with all tests good! |
|
Hooray Jenkins reported success with all tests good! |
|
Hooray Jenkins reported success with all tests good! |
1 similar comment
|
Hooray Jenkins reported success with all tests good! |
|
Substantially better this time round. I've a few minor comments but they're trivial and the GCI task can be approved without them. |
|
I tested this out locally. First very minor note is that the message in the console uses a curly brace where a square bracket is expected: More importantly, it seems that this only works as intended for the host going afk. Here are some scenarios I tested by hosting with (no saves) launch configuration, then launching 2nd and 3rd client from the configuration dropdown and connecting to localhost server. Scenario 1 (works as intended)
Scenario 2 (not working as intended)
Scenario 3 (not working as intended)
|
|
Can confirm as well - AFK shows for the player running the command, but that's it :-) Also, I get the impression the player is meant to see the "Welcome back, you are no longer AFK!" message in the little chat message bar at the bottom of the screen? It pops up when a player starts moving, but appears blank to me, while the message gets logged in the regular console OK. Unsure if that's bug here or if any input to the console will trigger a blank chat notification as well. A few times it seemed like I went un-afk without really doing anything. Maybe it is overly sensitive? Perhaps instead of using the move event use the one where the player has sent an actual message? Then they're certainly no longer afk. But if a cat poked their mouse - no more afk! :-) Can also validate that the afk command doesn't work in single player, where it would be kinda silly. But on the other hand having extra logic for that may not be needed. I suspect you need one more layer to make this work. See how You may well want to have a Client only system that registers and handles the command, but sends a note to the server "Hey I'm going AFK" (you send an event that's being listened to in an Authority system) and then the server can send a So in other words:
You should be able to look at the players online overlay itself to see how it transfers state around to the different clients connected with their ping so it all shows up correctly everywhere :-) |
|
Hooray Jenkins reported success with all tests good! |
|
Hooray Jenkins reported success with all tests good! |
|
I will test this out when I get a bit free time ;-) |
|
Thanks for your help @skaldarnar. I implemented new features in the list below:
You can test them and give us the result of your test. That's will be helpful from you |
|
Hooray Jenkins reported success with all tests good! |
|
I probably should have been clearer with my explanation. What I meant was that the To get more technical and specific, you should delete all the methods you copied except for If you can't get it to work then you could either just do the auto afk because it's not strictly needed for the task, or try and move it to the Authority method you have. |
|
Hooray Jenkins reported success with all tests good! |
1 similar comment
|
Hooray Jenkins reported success with all tests good! |
|
Hooray Jenkins reported success with all tests good! |
|
Tests out fine with two clients in a local setup after updating this PR according to NUI extraction. I'm not sure whether this should live directly in the engine, or whether it should be extracted to a module, but that can be done in a follow-up. So, better late than never - LGTM! |
| @In | ||
| private NetworkSystem networkSystem; | ||
|
|
||
| private int count; |
skaldarnar
Nov 1, 2020
Member
I'm not sure whether this is actually required. I'm wondering whether it would also work to just rely on the entity information we get on ConnectedEvent and DisconnectedEvent events.
It feels a bit too bulky to keep track of the count and look through all connected players additionally.
I'm not sure whether this is actually required. I'm wondering whether it would also work to just rely on the entity information we get on ConnectedEvent and DisconnectedEvent events.
It feels a bit too bulky to keep track of the count and look through all connected players additionally.
skaldarnar
Nov 11, 2020
Member
I've created #4242 to keep track of this. @iHDeveloper might this be your next contribution? 😉
I've created #4242 to keep track of this. @iHDeveloper might this be your next contribution?
iHDeveloper
Nov 11, 2020
•
Author
Contributor
@skaldarnar Sure! I'm currently busy with exams. But, I will work on it during the weekend 😁
@skaldarnar Sure! I'm currently busy with exams. But, I will work on it during the weekend
d453bd3
into
MovingBlocks:develop

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Contains
As a gamer sometimes I have to go away from the keyboard for some reason and I want to tell my friends who I'm playing with that I'm away so they won't get mad at me or something. So, I made an
afkcommand to do that goal.How to test
afk-commandafkIssues
AFKSystem