We are going to continue our move to data files by working on the monster data. We will follow the same design that we described in the last lesson. We will create a new JSON data file, create a couple of Data Transfer Objects to use in serialization, and update the MonsterFactory to load and … Continue reading Lesson 4.12: Read Monster Data File
Tag: Blazor
Lesson 4.10: Attack Initiative and Hit Logic
Now that we have the Battle class, we're going to make the combat more interesting. Currently combat is very static... the player attacks and monster and then the monsters respond with their own attack. Attacks always hit the opponent and cause a random amount of damage. But that's really all the variance in the combat … Continue reading Lesson 4.10: Attack Initiative and Hit Logic
Lesson 4.7: Ability to Display Quest and Recipe Data
Currently we have the quest and recipe data concisely shown in the Quests and Recipes tables that only display their names and status. Once we get past the original receiving of the quest, it can be difficult to remember that is needed to complete a quest or recipe. So we are going to enable the … Continue reading Lesson 4.7: Ability to Display Quest and Recipe Data
Lesson 4.6: Add Keyboard Shortcuts for Game Operations
Part of a good game is being able to take multiple forms of input. To this point, we have focused on touch and mouse input. In this lesson, we will add keyboard input to the game and handle keyboard keys and shortcuts to perform specific game actions, like moving or fighting or using a consumable … Continue reading Lesson 4.6: Add Keyboard Shortcuts for Game Operations
Lesson 4.5: Craft Items with Recipes
With the popularity of games like Minecraft, building and crafting items from base components has become very common in games. It has found its way into many of the latest roleplaying games as well. So let's build the concept of recipes (ingredients for making items) and crafting into our game engine. Recipe Model Changes The … Continue reading Lesson 4.5: Craft Items with Recipes
Lesson 4.4: Create the First Consumable Item
Most game players are familiar with consumable items - these are single use items that are used to provide the player an effect... like a potion of healing that lets us rejuvenate some of our hit points. This is a common concept in many roleplaying games. So we are going to introduce a Granola bar … Continue reading Lesson 4.4: Create the First Consumable Item
Lesson 4.2: Refactoring to Use Attack Command
With a working game engine, it's time for some changes to make it more flexible and able to support an ever-growing list of features and functions. One large refactoring that we will make is to replace the weapon and monster attack behavior with an Attack command instead. We will learn and use the Command design … Continue reading Lesson 4.2: Refactoring to Use Attack Command
Lesson 3.13: The Wrap
We've come to another big milestone in our game. We extended our game engine with a lot of new functionality -- all within the design patterns that we established early on. And we added more complex UI elements into our game screen -- learning about some new Blazor and Blazorize rendering features. We had a … Continue reading Lesson 3.13: The Wrap
Lesson 3.10: Building Trader Modal Screen
Now that we have the game engine updated and the new TraderViewModel defined, we can use that to build a new screen to allow the player to buy and sell items with a trader. If you are familiar with the WPF version of this sample, this additional UI is built in a modal dialog. We … Continue reading Lesson 3.10: Building Trader Modal Screen
Lesson 3.11: Adding Quests to Locations
Quests are a core concept of any roleplaying game. Various people send our player off on quests to kill some monsters, return with items for potions, retrieve the secret stone, and so much more. These provide some of the motivations for our heroes to adventure. Then when the player completes the quests, they may get … Continue reading Lesson 3.11: Adding Quests to Locations