Other Game Sample

Backstory

One of my first game dev jobs was adding multiplayer to some turn-based combat using Photon. After I started I learned they had a dedicated serer they wanted to use. It was a Linux server and while Photon has an option to self-host it only works on Windows. So I had to switch to Unity's Netcode but more relevant I had to learn about Linux commands and SQL. At that point any website I had made was with website builders or one-click install WordPress so that project left a curiosity in me. What was the cost of running a website on a dedicated server doing the backend and frontend myself? Which eventually led me here.


.NET Core

Quickly realizing I preferred backend to frontend I dove into .NET Core. I was stuck on the idea of a portfolio/dev-blog, but it seemed frontend heavy to me. Then I thought about how WordPress utilizes databases and thought I could store all my posts in a database and load the info onto one html page. For anyone not new to web dev I'm sure this is rudimentary, but to me it felt revolutionary as my first idea was to use layouts and make a new html for each post.

@for (int i = 0; i < Model.article.Length(); i++) { @if(!string.IsNullOrEmpty(Model.article.GetHeader(i))) { <h4 class="text-start my-2">@Model.article.GetHeader(i)</h4> } <p class="fs-5 text-sm-start">@Model.article.GetText(i)</p> @if (!string.IsNullOrEmpty(Model.article.GetImage(i))) { <img src="@Model.article.GetImage(i)" class="img-fluid articleimg"> } else if (!string.IsNullOrEmpty(Model.article.GetCode(i))) { <code>@Model.article.GetCode(i)</code> } <hr/> }

Database

I decided to not use a SQL database as it seemed excessive. Instead I opted to store everything in a JSON. For now I'm uploading my images to Google Drive to save space on my server, but this can easily be changed in the future. Pictured below is this post in JSON format.


Conclusion

Implementing a way to log-in to the site and have an editor to make new posts was something I considered, but thought it wasn't worth the effort. Manually editing the JSON files isn't bothersome to me. Besides I'm very eager to get back to game dev and call this project done for now. Also I can confidently say getting the site to look decent on different screen sizes was the least fun.