Build a C#/WPF RPG

This is a new WPF/XAML game, based on the game from my Windows Form tutorial: Learn C# by Building a Simple RPG

 

For the latest version of the complete solution, visit:

https://github.com/ScottLilly/SOSCSRPG

 

Overview

Lesson 00.1: Overview

 

Preparation

Lesson 01.1: Installing Visual Studio Community 2015 – Update 3

Lesson 01.2: Installing TortoiseSVN and VisualSVN

 

Planning

Lesson 02.1: Planning the Game

 

Programming

Lesson 03.1: Creating the Solution and Game Screen

Lesson 03.2: Creating and Using a Subversion Repository

Lesson 03.3: Creating the Player Class

Lesson 03.4: Creating the GameSession (ViewModel) Class

Lesson 03.5: Displaying the Player Object

Lesson 03.6: Update Player data with the PropertyChanged event

Lesson 04.1: Creating the Location class

Lesson 04.2: Creating the World

Lesson 04.3: Moving in the game world

Lesson 04.4: Improving the World – Inheritance and INotifyPropertyChanged

Lesson 04.5: Improving the World – Factory and Guard Clauses

Lesson 05.1: Creating the Game Item Factory

Lesson 05.2: Creating the Player Inventory

Lesson 06.1: Creating the Quest Factory

Lesson 06.2: Using Quests in the Game

Lesson 07.1: Creating Monsters

Lesson 07.2: Adding Monsters to Locations

Lesson 07.3: Sending Messages from the ViewModel to the View

Lesson 07.4: Monster Combat

Lesson 07.5: Monster and Combat Refactoring

Lesson 08.1: Completing Quests

Lesson 09.1: Creating Traders

Lesson 09.2: Adding the Trade Screen

 

Cleanup/refactoring, before adding more features

Lesson 10.1: Refactoring Base Class for Player, Monster, and Trader

Lesson 10.2: Grouping GameItems in Inventories

Lesson 10.3: Refactoring – Encapsulating LivingEntity Properties (Hit Points and Gold)

Lesson 10.4: Bug Fix – Removing multiple items from GroupedInventory

Lesson 10.5: Encapsulating Level and ExperiencePoints Properties

Lesson 10.6: Clean up property setters and PropertyChanged notifications

 

Create a base for automated tests

Lesson 11.1: Creating the Unit Test Project

 

New game features

Lesson 12.1: Making the GameItem class more flexible

Lesson 12.2: Creating the AttackWithWeapon command

Lesson 12.3: Making the Action class more flexible with an interface

Lesson 12.4: Letting the Monster use AttackWithWeapon

Lesson 12.5: Creating the first consumable GameItem

Lesson 12.6: Refactoring after adding Actions

Lesson 12.7: Creating recipes

Lesson 12.8: Crafting items with recipes

Lesson 13.1: Add keyboard input for actions, using delegates

Lesson 13.2: More keyboard actions (and fixes)

 

Load game world objects from XML files

Lesson 14.1: Moving game data to external files

Lesson 14.2: Creating extension methods

Lesson 14.3: Read World (Location) data from an XML file

Lesson 14.4: Read Monster data from an XML file

Lesson 14.5: Move Remaining Game Data to XML Files

 

Cleanup

Lesson 15.1: Bug Fixes, Unit Tests, and Tooltips

Lesson 15.2: Catch and log exceptions

Lesson 15.3: Building a “functional” inventory class

149 thoughts on “Build a C#/WPF RPG

    1. Thanks Daniel. I’ve been looking at getting back to creating more lessons, but I think we might need to switch from .NET Framework to .NET Core (since that’s the direction Microsoft is going).

  1. Hello Scott. I was wondering, will I learn C# from scratch if I’ve never programmed before through this course? I found this on Reddit as I was looking for something more practical to learn from

  2. I just wanted to say thank you for providing this WPF lesson. I learned way more by following along in this type of project than hundreds of hours of youtube tutorials. There’s something great about being able to see a whole project come together with a real application and see you refactor and not having everything perfect like in most tutorials. I learned the most by seeing the whole thought process and you do a wonderful job explaining the basics and then slowing introducing advanced concepts.

    THANK YOU!

Leave a Reply

Your email address will not be published. Required fields are marked *