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
Tag: .NET Core
Posts dealing with .NET Core probably version 3.1 and above
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.5: Creating Monsters
Our game now has a player with inventory, game items, and the ability to move between locations. But, no game is complete without some antagonists for our hero to fight. We are going to introduce monsters into the game world for the player to battle. Creating the Monster Class Let's start with a new Monster … Continue reading Lesson 3.5: Creating Monsters
Lesson 3.4: Random Dice Roller
Many game systems have a way of producing randomized results. Be it selecting a random number in some range (min-max), flipping coins, or rolling dice. For RPGs, rolling dice is a seminal concept -- you've seen it in all the RPGs that you've likely played. It is burned into the genre by the popularity of … Continue reading Lesson 3.4: Random Dice Roller
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.1: Game Items and Factory
We are going to build the start of an inventory system. To encapsulate the concept of items in our game, we are going to define a GameItem model class. This class will have the base properties of all GameItems. Then, we will define a derived class for Weapon. Weapon is a specialized item that also … Continue reading Lesson 3.1: Game Items and Factory
Lesson 2.2: Initial GameSession View Model
When building client applications, there are different design patterns for separating the user interface, operations, and data models. For our game project, we will be using the Model-View-ViewModel (MVVM) pattern. Model–view–viewmodel (MVVM) is a software design pattern that helps with the separation of the development of the graphical user interface (the view) from the development … Continue reading Lesson 2.2: Initial GameSession View Model
Lesson 1.5: Using Blazorise Component Library
Components are the basic unit of development in Blazor. A component is a self-contained chunk of user interface (UI), such as a page, dialog, or form. A component includes HTML markup and the processing logic required to inject data or respond to UI events. Components are flexible and lightweight. They can be nested, reused, and … Continue reading Lesson 1.5: Using Blazorise Component Library
Lesson 1.4: Create Initial Blazor Project
Now that we have a source repository (from lesson 1.3) for our work, we're going to create the initial Blazor application project. Let's start by launching Visual Studio 2019. The first thing we will see is a dialog where we can clone code, open projects, create projects, etc. We are going to start by cloning … Continue reading Lesson 1.4: Create Initial Blazor Project
Assembly Dependency Viewer
Found a great new tool to view an assembly's runtime dependency graph for .NET full and Core. It will show you the dependent assemblies and versions for any .NET libraries (.dll) and applications (.exe). It's great for debugging assembly load failures in your app.