About
About Royfuss Games
Hi. I’m Royfuss. I create websites and I play video games. I have a blog here where I talk about video games and creating websites, as well as other things. My top video game list fluctuates based on my mood, but the Super Mario series, the Legend of Zelda series, the God of War series, and the Dishonored series are constants.
Royfuss Games acts as a frontend presentation for my collection of video games. I have accrued a large collection of video games over the years. As video game platforms added tracking features, I have become more interested in storing my video game data in one place. I used to use third party tools to keep track of my data. Unfortunately, they shifted focus, and I lost my data. I got fed up with it. In 2015 I started tracking my video game hours manually in an Access database.
Over the years, I realized this database was insufficient; I wanted more data. I redid the database in LibreOffice Base (backend is HSQLDB based). This new database is my current database. It includes every game I own, purchase information, play status, playtime information, and achievements. I dug up old consoles, emails, save files, and store information to get the data I needed for every game in the database. I came back with a complete inventory of every game I own with very little data missing. Most of the data I am missing is pre-2005 with a few holes here and there.
Royfuss Games became the frontend for this database. It helps see the data as information. I use it to determine which games deserve to be in my backlog, and which games from my backlog to play next. I am weird, and I just like looking at random pages on the site and thinking about my time with a game. I have created several helpful ways to browse my game data in the navigation, so feel free to poke around!
How The Sausage Is Made
I am going to talk about the technical side of this site, so feel free to skip the rest if you do not care about Python, databases, and website development. It would have been a lot easier to just host the data in a database on my webserver. I chose to do this the hard way by creating an offline database. I have been burned by third party applications and websites, as well as my own web host. I also worry about someone hacking into my database. As a result, I felt more comfortable using LibreOffice Base. I can quickly and easily backup the database (both offline and online copies). It allows me to easily export the data if LibreOffice ever goes away or stops supporting Base. It is a lot easier for me to create forms in it for quickly inputting data.
When I decided to create Royfuss Games, I knew I could not manually create every page; I have hundreds of games, and even more data. Instead, I decided to do a first for me: create a static generated website. Python is my language of choice. To generate the HTML, I separated the scripts to make it easier to modify them if I need to make a change. I export the data from the database into CSV files, so Python can parse and format the data. I have five Python scripts to generate the individual game pages, recently played list, search page, data pages, top pages, and the achievement pages.
There are some things not stored in my database I need for my website. Helper scripts create this new data.
Images are a huge thing. In fact, they are the biggest files for the website. I need to manually search for box art and download it. This box art becomes part of the game "badge." I have a script that can take an image, crop it, and resize it. The script still has manual prompts to determine how the image should be cropped. It places the new image in the production folder after it is done. I have spent a lot of time making sure every game has box art. The background images in the game "badge" are my own screenshots. They are manually cropped and resized, which is why every game does not have one; especially games I haven’t played. I have a helper script that looks at all of these image files, and generates an image CSV file. This file is referenced by my main python scripts when generating the "badge" HTML for the pages.
Achievements have their own set of helper scripts. The scripts scrape for achievements using APIs, and manual methods. You can read about the scraping process here. The scripts download the achievement icons. I end up importing the scraped data into the database before I export the data for the website. An additional script resizes the achievement images, and places them in the correct file structure for uploading.
I really should have added "Blog Mentions" to my database, but it ended up as an afterthought. As a result, a helper script adds blog mentions to a CSV file. It searches all of my blog locations for a game, and I can choose to add the blog post to the CSV. Like the image CSV file, this one is read to generate the Blog Mentions on the game pages.
I have a few asset files. They are mostly PHP containers, so it is easier to modify the header, footer, and navigation. This About page is manually created, so it’s also included in the assets. I use Pico CSS as well as custom CSS for formatting the pages. I do use a little bit of JavaScript for the search. The Data graphs are part of the asset files, because they take awhile to update. The scripts do generate new CSV files for the data, which I can then use Excel to create new graphs.
The rest of my helper scripts make sure the files are structured correctly, upload the files, and a last one to generate the game card. The scripts take 15 to 20 minutes to run, with the brunt of it being upload time. The upload script removes everything, with the exception of existing badge images and achievement images, and then uploads the new files. I have to manually re-upload badge images if I replace them. I have to upload the achievement badges manually; there are just too many for the upload script to parse, and determine if they need to be uploaded. This is why I try to update things once a week, because it gets out of hand.
That’s how the sausage is made. I hope you enjoy browsing Royfuss Games!