Growing up I just loved games and I still do, specially RPG and fantasy games. There was something special about using magic, fighting creatures with sword and shield and going through dungeons finding hidden secrets with awesome loot.
I remember the early stages of the web, there was this game called Milta which me and some in my class used to play in high school. It was a simple text-based browser game where you created a character, fought enemies and equipped gear.
The battles were randomly generated and had text describing each turn between the player and monster fighting.
I’ve always had this urge to be better and I rarely settle with just being average, so I usually get very involved with things I enjoy.
This lead to me playing the game a lot and I wanted to be highest level. The thing is though, when you died you literally DIED, meaning no continue or extra lives. You had to start over from level 1 and create a completely new character.
The game eventually disappeared, but not my interest for RPG and fantasy games.
Now that I have been developing with the .NET stack for a year I feel comfortable enough to create a game just like that myself.
Sure, people now create all amazing games with crazy graphics. But I just want to have that good ol’ text-game feeling, like you had when you played games like Dungeon & Dragons.
I decided to go with ASP.NET Core 2.2, using Entity Framework Core and MSSQL to handle and store the data.
I wanted to spend as little time as possible with the front-end and styling so I could jump straight into the logic, which is what I love to code the most.
I decided to go with MaterializeCSS as my layout.
I divided the project into the following layers:
Application holding the application’s logic.
Persistence DbContext using Entity Framework Core with MSSQL.
Domain storing all the entities (POCO) used for the project.
Presentation is using ASP.NET MVC 2.2 and Razor pages.
Communication between presentation and application happens through CSQRS pattern using MediatR, to keep controllers clean and to make testing easier.
Before I started to code I broke down the project into smaller pieces and sketched how I would draw the relations in my database, it really helps to visualize and plan before you start diving into code.
The core functionality of the game is to create a character, fight monsters, gain experience and get stronger.
I have now worked on the project for about a week, averaging 1-2 hours a day . The result is that the overall layout is finished (using materialize defaults for now) as well as the functionality to create a character, fight monsters and gain experience and levels.
My goal is to continue with at least one post a week to share my progress with the project.