Can I enforce a time limit window on Steam games, notably Team Fortress 2?

My 10 year old loves Team Fortress 2 but spend too much time playing it.

I looked for whether Steam has a parental control system allowing me to say "max X hours over the last 14 days", but could not find any. The OS is Windows 7 Pro.

How can I approach this?


Steam has, at this point in time, no parental controls available natively. You do, however, have a few options.

Windows 7 has a set of limited parental controls. The two relevant ones are time limit, and game ratings limiting. You can get to these by clicking Start > Control Panel > Parental Controls. These are per user, so if they are using your account to login, this won't work.

Time Limiting

Windows 7 Parental Controls - Time Limit controls

This control lets you choose what hours in the day your child's account can use the computer. Any time outside these times, your child will not be able to use their account on that machine.

For you, this could be used to limit the hours in a day that your son/daughter could play, but it wouldn't allow for the 'X hours per week' type of control. It would also mean for things like homework or other related activities, they wouldn't be able to use the computer. You could of course bypass this with using a separate account and the second technique they support.

Game Rating Limiting

Windows 7 Parental Controls - Game Ratings

This allows you to control what type of games you want your child to be able to play. It supports multiple different Ratings Boards rating system (mine is ESRB, as I live in the US, though they support many more) and it allows you to control even down to what type of content should not be allowed (Blood, Nudity, Violence, etc). With this you can limit what types of games can be played.

Coupled with the previous method, this could be used if your son/daughter were to have two accounts. The first would be one where the could play video games, but could only do so for certain times of the day. The second cannot play video games (via this blocking method) and can be used to surf the internet, do homework, etc. It isn't the cleanest solution, but it is built right into the system you already have.

Alternatives

The alternative to the above is to get third party software. I have no experience with any of these pieces of software, but two that came up in a Microsoft help discussion on this topic are:

  • NetNanny supports enforcing allowing only certain windows of time for software to run, and on an allowance system where they get so much time per X (day is all that is listed, but likely week and month are available as well)
  • Cyber Patrol has the same support as above, where it allows time windows or an allowance per chunk of time.

It is possible to use a router to block ports within certain time ranges. The open source router software DDWRT allows you to create a policy that blocks Team Fortress 2.

enter image description here

As you can see you can select a weekday and a specific time range in which the "service" cannot be used. This way you can still use the internet, but your son cannot play TF2.

The benefit of this approach is that routers usually are quite secure once you setup a good password.


This is hardly an easy answer for most parents, but I looked at your profile and noticed you're a software developer, so here goes:

General idea: Use AutoHotkey to make a script to accomplish this. Use the window finding functionality to know whether TF2 is running.

More details: I'd define a "play session" as a (start time, play duration) pair. Every minute (infinite loop with a wait), check if a window containing "Team Fortress" is alive. If so, start a new play session, or increment the play duration on your existing one. If not, end any existing play session, push it on an array of them. Check the tail of the array, see if current time minus start time is greater than your watch period (e.g. 14 days). If so, drop it from the array. Add up all the durations of play sessions in the array, including a currently running session if it exists. If it's greater than your limit (e.g. 20 hours), use WinClose on TF2, and optionally put up a dialog box that says "I'm watching you, son," or whatever.

Put the script in the startup folder, and use the "no tray icon" option. If he's really clever enough to find the script and kill it in running processes, you may need to adjust permissions to disallow that.

It should be a 30-minute job to write and test the script, or an hour and a half if you haven't used AutoHotkey before.