UPDATE – Game Picker Playtime Filter

Category: | Posted on:September 2, 2021
game picker filter

Pursuant to my co-workers’ feedback, I added a playtime filter to the Game Picker 9000. Now the Game Picker can ignore games you’ve played already. Additionally, the Game Picker now prints the total playtime of each game in the main listing.

Playtime Filter Implementation

The Game Picker 9000 uses the GetOwnedGames method within the Steam Web API. This returns game data like the title, app id, image icons, and total playtime. The API formats the data in seconds, so I did a little division to get it to print in hours. Then I added a filter to the initial GET request. Ultimately, I decided on two hours for the threshold. Anything over that counts as “played”. This allows some flexibility for games that may have started themselves after install, or games that were started but not finished.

Troubleshooting

I had a friend test the new filter with their own Steam ID, and initially thought it was broken. The filter didn’t seem to be working. It returned all of the games in the person’s library with playtimes of zero, which was not accurate to the information on their account. Turns out, the Steam Web API limits your access to a user’s data based on whether said user’s account is public or private. If it’s private, the playtimes are off-limits, and the Game Picker returns a value of zero for all of them. There isn’t really a way around this issue. It’s just the way the API works, and it appears founded in solid privacy concerns. So, I had to ameliorate it within the UX. I added a disclaimer to the filter to clarify the limitations.

Related Logs


  • UPDATE – Space Invaders

    January 28, 2025

    Quick presentational update to the Space Invaders project. Keep Shields Centered On Hit Shields will now automatically maintain a centered position when hit my an alien missile. I initially thought this was going to involve some math to determine whether the missile hit on the right or left side. I even put together a formula […]

    Continue Reading
  • NEW PROJECT – Space Invaders

    January 27, 2025

    Space Invaders is a bare-bones facsimile of the classic arcade game of the same name. Objective I wanted to take what I learned from the Asteroids Tutorial in my last project and iterate without the training wheels this time. Space Invaders has more lateral movement from the player and hostiles than in Asteroids, and has […]

    Continue Reading
  • NEW PROJECT – Asteroids

    January 9, 2025

    Asteroids is a bare-bones facsimile of the classic arcade game of the same name. Objective I want to focus on more creative projects this year in order to break up the grind of work skill development. I’ve always been passionate about game design, and there are a lot of free tools to chose from. My […]

    Continue Reading