Auto-booting afk players

ShadowTek

New Member
Reaction score
23
I recently found out that my current method of booting inactive players was buggy. (After a little testing I found that active players were sometimes getting booted and that inactive players could still remain in the game.) So I did a forum search and found this:
http://www.thehelper.net/forums/showthread.php?t=18129&highlight=inactive+players

All the methods that were discussed in this thread were basically similar to what I have been using. They all rely heavily on idea that using the events "Unit - A unit is issued an order..." to set a variable for the owner of that unit as a means of keeping track of player activity. There are several problems that I have discovered with relying on these events.

First, the event where "a unit is issued an order..." seems to be regularly triggered by events that do not involve player input. I tested this by having special effects occur at the positions of the triggering units so that I could see exactly which units where being "given orders". Then I had the name of the owner of the triggering unit be displayed. I also had the camera to pan instantly to any triggering unit. The following setup is what I was using to test with:
Code:
Record Actions
    Events
        Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
        Unit - A unit owned by Player 2 (Blue) Is issued an order targeting an object
        Unit - A unit owned by Player 3 (Teal) Is issued an order targeting an object
        Unit - A unit owned by Player 4 (Purple) Is issued an order targeting an object
        Unit - A unit owned by Player 5 (Yellow) Is issued an order targeting an object
        Unit - A unit owned by Player 6 (Orange) Is issued an order targeting an object
        Unit - A unit owned by Player 7 (Green) Is issued an order targeting an object
        Unit - A unit owned by Player 8 (Pink) Is issued an order targeting an object
        Unit - A unit owned by Player 9 (Gray) Is issued an order targeting an object
        Unit - A unit owned by Player 10 (Light Blue) Is issued an order targeting an object
        Unit - A unit owned by Player 12 (Brown) Is issued an order targeting an object
        Unit - A unit owned by Player 1 (Red) Is issued an order targeting a point
        Unit - A unit owned by Player 2 (Blue) Is issued an order targeting a point
        Unit - A unit owned by Player 3 (Teal) Is issued an order targeting a point
        Unit - A unit owned by Player 4 (Purple) Is issued an order targeting a point
        Unit - A unit owned by Player 5 (Yellow) Is issued an order targeting a point
        Unit - A unit owned by Player 6 (Orange) Is issued an order targeting a point
        Unit - A unit owned by Player 7 (Green) Is issued an order targeting a point
        Unit - A unit owned by Player 8 (Pink) Is issued an order targeting a point
        Unit - A unit owned by Player 9 (Gray) Is issued an order targeting a point
        Unit - A unit owned by Player 10 (Light Blue) Is issued an order targeting a point
        Unit - A unit owned by Player 12 (Brown) Is issued an order targeting a point
        Unit - A unit owned by Player 1 (Red) Is issued an order with no target
        Unit - A unit owned by Player 2 (Blue) Is issued an order with no target
        Unit - A unit owned by Player 3 (Teal) Is issued an order with no target
        Unit - A unit owned by Player 4 (Purple) Is issued an order with no target
        Unit - A unit owned by Player 5 (Yellow) Is issued an order with no target
        Unit - A unit owned by Player 6 (Orange) Is issued an order with no target
        Unit - A unit owned by Player 7 (Green) Is issued an order with no target
        Unit - A unit owned by Player 8 (Pink) Is issued an order with no target
        Unit - A unit owned by Player 9 (Gray) Is issued an order with no target
        Unit - A unit owned by Player 10 (Light Blue) Is issued an order with no target
        Unit - A unit owned by Player 12 (Brown) Is issued an order with no target
    Conditions
    Actions
        Set ActivityCount[(Player number of (Triggering player))] = (ActivityCount[(Player number of (Triggering player))] + 1)
        Game - Display to (All players) for 1.00 seconds the text: (Name of (Owner of (Triggering unit)))
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Camera - Pan camera for (Picked player) to (Position of (Triggering unit)) over 0.00 seconds
        Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
I found that units owned by absent players were regularly "given orders". The units would display the special effects (and have the camera brought to them) any time I brought one of my units close enough to their units to cause those units to attack me. It also seemed that the "return to guard position" order also triggered one of these events.

This means that there are many times where units are being "given orders" when there is no player input involved. So using these events to track player input is useless, since "credit" is given even when the owning player is absent from the game! (There are no AI scripts in this map btw)


The second major problem that I ran into with these events is that players who use shared units are not recognized as being "active players". If the owner of the triggering unit is always given the credit for any orders that are given to the unit, then any players who are using another player's units to play the game will run the risk of getting booted if they don't (or can't) use units under their control.


It would seem that the only reliable way of booting inactive players is to only use player selection/deselection events to track activity. The only potential problem that I can foresee with this idea is that it would actually be possible for a player actively participate in a game for an extended period of time without actually "selecting" units. A single group of units could be repeatedly ordered to move and attack targets, such as in a hero type map.

It sure would be nice if you could use that in combination with a "unit is given order..." command, but...


So can anyone think of a better method of reliably auto-booting inactive players? I was thinking of forgetting the whole idea and just using a vote-kicking system, but what do you do about a situation where there are only 2 people left and one of them is afk? Isn't it a generally bad idea to allow a minority percentage vote to succeed in booting other players?
 
H

Hikaru7

Guest
But why auto boot in the first place? I find that its not nice. I mean, not everyone can sit on the computer all the time and just play warcraft, what if something is burning and the player has to go afk? Then they come back and its like oh, jerks, I got booted >.>

EDIT: Oh and another way you could do it is too, check if players have recently typed in any chat commands. And if players haven't done anything for 5 minutes or given an order, start a countdown timer, specific to the player, then keep checking to see if anything was done while the timer is running to see if you need to cancel the timer.
 

ShadowTek

New Member
Reaction score
23
The map in question requires intense team-work to combat the enemy. If a player (or god forbid, more than one) just sits in the base for the whole game and does nothing, then gameplay if affected. If a player dies (or gets booted) then certain measures of compensation of given to that player's team-mates in order to give them a better chance at survival. An afk player is a dead player from a gameplay perspective, and the proper compensations need to be made so that the game isn't ruined for the other players.

The impact of an afk player will, of course, depend on the type of map that you are referring to. If it is a TD, in which the absent player will simply screw himself out of an income by not playing, then it isn't a big deal since other players can pick up the slack, get that player's "share" of the gold, and continue to play the game with a realistic chance at winning.

I believe that the interval of the boot-check also plays a part in fairness. I have been using a 15 minute interval with my triggers, and I feel that this is a fair amount of time to give someone. 15 minutes is plenty of time fix yourself a snack, go answer the door, or even take a leisurely dump if the need suddenly hits.

And if you have such a recurrent problem with fires in your home that your online gaming is frequently interrupted, then I suggest you turn off your computer RIGHT NOW and figure out what the cause of that problem is. lol

Edit: yeah thanks, I'll add that too.
 

ShadowTek

New Member
Reaction score
23
Thank you for your reply, but that is exactly what I was referring to when I said:
It would seem that the only reliable way of booting inactive players is to only use player selection/deselection events to track activity. The only potential problem that I can foresee with this idea is that it would actually be possible for a player actively participate in a game for an extended period of time without actually "selecting" units. A single group of units could be repeatedly ordered to move and attack targets, such as in a hero type map.

It sure would be nice if you could use that in combination with a "unit is given order..." command, but...

I have decided to use the player selection/deselection events in addition to 'player enters <empty> chat string' to attempt to track player activity.

It is possible that a player will actively use a single group of units, without selecting any other units, while never entering a single chat string over the course of a 15 minute period. This is the event that I wish to avoid.

Any more suggestions are appreciated. :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top