Scott Lilly has an excellent, excellent tutorial on his website for how to build an RPG in Visual Studio.
Not just one, actually, but two.
But today we're going to just get halfway through one of the tutorials (the beginner friendly one) and lay out the groundwork done so far to customize it and add some bells and whistles. So, we'll cover some coding, object-oriented programming, and game design.
This blog needs its own dedication/thanks page, but I wouldn't be here without the following dudes:
The Coding Train (Github for Poets)
Scott Lilly (Original Tutorial)
Mark (who kindly created a wonderful all-in-one PDF mockup of the tutorial)
Bob Tabor (for his course on Object-Oriented programming)
But this project is indicative of what learning C# is like in a nutshell: it's learning C# and everything else (design patterns, repositories) in bits and pieces.
The Tutorial (Est. 6-8 Hours)
Lilly's got an OLD and a NEW tutorial on his website, but really the difference between the two is that the OLD is more newb-friendly and the NEW has more bells and whistles. I started with the OLD but decided I wanted to blend the best of both worlds.
Now, there's no point in reiterating everything Scott Lilly has already put together. If you're in the process of learning C# too, I see no reason not to pop off here now and spend a few hours on the tutorial. Have some fun with it. There's even an excellent PDF version of the tut linked on his website.
General Train of Thought:
What I loved about this tutorial was the careful pacing and layering of concepts. I'm not sure how much I was helped by previous exposure to the concept of properties and classes and libraries, but I understood 90% of everything in this tutorial the first time through, instead of barely anything the whole way through. And along the way, it pretty much illustrates the core design concepts of Object-Oriented programming.
Object-Oriented Programming (Est. 4.5 Hours)
Between this tutorial and Bob Tabor's OOP course, I'm really starting to appreciate objects and classes. Sure, there's still debate over which approach in programming is best. But frankly, I don't care. Or, I should say, I care more about have clean, functional code that I can understand. I'll be able to afford opinions later.
Bob Tabor's course is $30 on his website. You definitely don't have to shell out that money in order to learn these concepts. Like I said before, Scott Lilly's tutorial pretty much illustrates the concepts as it goes along. However, Tabor has provided a lot of excellent free material over the years (such as this C# tutorial for absolute beginners), and I wanted to support him. (I'll also say the course had been sitting collecting virtual dust and was happy I found a project that went hand-in-hand).
Ok, but get this. Need a design for your code? Find your nouns. This approach was previously touched upon in Project #1. And here's an illustration of how Scott Lilly did it for this particular project:
But we'll cover more in the next blog.
My Game Design Choices (Est. 2 Hours)
Once the tutorial hit Lesson 11 and we created the World of our game, I took a step back and thought about what kind of world I wanted to create.
Lilly creates a basic RPG landscape, one populated with rats, spiders, rusty swords, and farms. Pretty much, it's a perfect template to run with, throw away , rework, what-have-you. At the risk of adding too much and never finishing the darn thing, I wanted to do some world-building a la Dark Souls and explain the world/make it interesting via the in-game descriptions.
I went with the wintery theme after considering (and not actually participating in) a game jam whose theme was "cold."
So, the first thing I did was take the World Map that Lilly created...
...sprinkled some thought over it, found an open-source mapping tool called Trizbort, dragged and dropped, baked it all, and came up with the following. Below is the first working result. Changes may be implemented as we go along.
And then I thought about the world, going back to that theme we mentioned earlier: cold. Eternal winters and Nordic landscapes are popular in fantasy for a reason. How to invoke that chilly nostalgia in players while also spicing things up a bit? All that thought went into the types of items and monsters, the names of locations, and the lore-rich descriptions.
(Items did not previously have a property for Item Description, so I added that to the Item base class. Hey look Mom, no hands).
This also opened up different avenues of gameplay. While more is explained in-depth in the Bells and Whistles section, I decided I wanted to add the following to the game design:
Alright, based on all of that, we can define the new additional classes and objects of this extended game:
Words of Power
Martial School (to store information on Attack/Defense/Evade maneuvers)
Mystick School (to store information on Light/Dark/Water/Fire maneuvers)
Ritual (dealing with the Victory, Defeat, and Player Progression after battles) (at least, I think we'll need a class for this)
DeBuffItem (added two poisons to the game that gave adverse side effects)
Alcohol (a special item that both buffs and debuffs)
I'll also need to modify the code for specific interactions with the Rusty Sword, which was now the only weapon in the game, but which could progress along similar lines with the player's progression. The player will be able to name the sword and use it to unlock certain areas.
To keep track of the list of items in the game and their descriptions, I went Full Geek and started making a spreadsheet on Google Sheets. Here's what we've got so far:
Bells and Whistles (Est. 6-8 Hours)
At this point I went over the NEW tutorial to see what was different. Would I have to start over from scratch?
(I should be honest and say that I looked at the NEW tutorial before I was even halfway through the OLD one, wondering what I needed to plan for).
What I liked best about the NEW tutorial was that it included Character Creation and more visual UI.
But I began thinking of my own design choices and how I could already look at implementing this early in the new conception stage.
One thing I wanted to do here (and in future projects) was more to put in more thought when it came to "clearing" battles. Specifically, the aftermath. Whether you're fighting a sewer rat or the final boss, most RPGs conclude battles in the same way: little victory diddy, XP points, gold, loot. You're essentially rewarded with a bell, a whistle, and a glorified Excel spreadsheet outcome.
Well, I liked the idea of battles also having an emotional impact on the Avatar (and player, with any luck). But nothing that would go so far and speak down to the player or make them feel guilty for "killing" things in game. Really, it was more about treating the world, the creatures, and the player Avatar more seriously--and so the player could feel like they were being taken seriously.
So, fighting the battle is half the battle. Or, I should say, half the reward. If a player successfully kills all enemies in combat, they must perform a ritual. This is just a cultural touchstone in the game world, but gameplay-wise, the player makes a small offering of thanks to the memory of the deceased. I remember reading somewhere about several different native American tribes doing something similar after a hunt. It's a Judeo-Christian tradition, too: historically, prayers of thanks were said after a meal.
So, no, it's not a plug for vegetarianism or anti-violence. But to my mind it does several things:
Rinse, Repeat, Release
Of course, now the next step is to continue taking steps.
I'm trying out my ideas as I'm following the tutorial, modifying as I go along.
And playtesting and debugging, ad nauseum as they do, till I get a working prototype.
Until then, uh, pray for me!
And hey, thanks for stopping by!
In Excelsis Deo.
K.W. writes novels, short stories, the occasional ode, game scripts, and (with actual evidence!), this here blog.