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
Tag: Blazor
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
Lesson 3.8: Simple Monster Combat
Now that we have the pieces in place, we are going to allow our players to fight these terrible monsters that are terrorizing the village. The initial combat simulation will be simple: the player will fight one monster at a time.attacks with weapons will always succeed.damage is rolled randomly based on the selected weapon and … Continue reading Lesson 3.8: Simple Monster Combat
Lesson 3.7: Displaying Game Messages
As the player interacts with the game world (including combat), we need to display messages in the game screen: combat messages, damage done to creatures, healing, and more. We are going to do this by having the GameSession view model expose the Messages property. The Messages property is then data bound to the UI. DisplayMessage … Continue reading Lesson 3.7: Displaying Game Messages
Lesson 3.6: Adding Monsters to Locations
Being able to create monsters is great, but now we need to put them out into our game world and be able to interact with them. To do that, we are going to build some code that adds monsters and encounters to particular locations in the game world. Then, we will enable a MonsterComponent to … Continue reading Lesson 3.6: Adding Monsters to Locations
Lesson 3.3: Build Inventory System
Starting with a simple inventory item list was a good way to being thinking about this problem and building the user experience to show a player's inventory. However, exposing the list directly and allowing all callers to edit the list can lead to a lot of duplicate code editing that list, and builds more interdependencies … Continue reading Lesson 3.3: Build Inventory System
Lesson 3.2: Initial Player Inventory
Our first attempt at providing player inventory will be a simple one -- and we will expand upon it as we build out the game engine. For this initial system, we are going to use a simple list in the Player class that holds the player's items. using System.Collections.Generic; namespace SimpleRPG.Game.Engine.Models { public class Player … Continue reading Lesson 3.2: Initial Player Inventory
Lesson 2.11: The Wrap
We have created our initial game engine which supports a player, location, game world, and moving around within it. Then we created the UI elements/components to display those in our game screen. We now have a game that we can move around in and investigate the images and descriptions of each location in our limited … Continue reading Lesson 2.11: The Wrap
Lesson 2.10: Moving in the Game World
Showing the player's location is the first step, but we also need to provide the ability to move around our game world. We're going to build some controls and event handlers that move the player between adjacent locations in the world. To begin we're going to create a new view model class to assist with … Continue reading Lesson 2.10: Moving in the Game World
Lesson 2.8: Game Location
Now that we have our core design components in place (MVVM, Dependency Injection, Blazor components, and unit test coverage), we are going to focus on building out more game functionality. We will start with the game location. This lesson will add a Model class, update the view model, create a Blazor component to show the … Continue reading Lesson 2.8: Game Location