Inspiration

NOTE: This is also for CMPSC311 extra credit.

My little brother loved to play fortnite for long long periods of time, so my parents tasked me with controlling that somehow. I had a rudimentary working version before HACKPSU, but my new implementation is much much more efficient.

What it does

This program will schedule a script to be run every 5 minutes via the windows task scheduler. When this script detects that fortnite (or any other program specified) is running in the tasklist, it will subtract 5 minutes from a set amount of time. This time variable will be kept in memory until it detects that the app is closed. This frequency can be modified easily but checking too frequently/infrequently can result in performance/accuracy issues. 5 minutes is sort of a sweet spot.

The file will contain the day number and the time left. The above script will also check the day number every time it executes, and when the day number does not match what is in the file, the time left is reset.

How I built it

I used python's os module to make system calls as well as return values from system calls, as well as the json module since I stored the file in a json format. The script is also a .pyw format, so it does not have a console window and runs hidden in the background.

Challenges I ran into

My original naive implementation was massively inefficient since it basically had to run in the background whenever the computer was on. I have yet to measure the FPS difference in games when this script is running or not, but I will do so in the future.

A bigger challenge is having the file stored locally in the system where it can be edited easily if found. Currently, I just have it in a hidden directory, but in the future I plan to either encrypt this file or have a simple web server keep track of this info instead. (the latter is more likely)

Accomplishments that I'm proud of

I'm proud to have been able to apply my skills to a real-world problem that was very close to home. My parents were very happy that I was able to address this problem, and I'm sure that my family is not the only one suffering from "fortnite syndrome".

What I learned

I learned how to use the windows task scheduler as well as how to use the python os module to make system calls. It helped me to "look under the hood" at the underlying systems of windows and gave me more appreciation of the OS's we take for granted.

What's next for abortnite

I am planning to have a webserver hosted either on a cloud service or my own PC to more effectively and securely keep track of the time data. I also plan to send this repo to friends who also have gamer siblings.

Built With

Share this project:

Updates