Chapter 3. It's Pretty Lonely in BludBourne…
Now that we have begun to create some map locations and started to navigate through our world using our player character, we can start to plan out how we are going to populate this world with NPCs.
We will cover the following topics in this chapter:
- The Entity Component System (ECS) design pattern
- Using JSON scripts for defining NPC properties
- Physics component with entity collision handling
- Selecting NPCs for an interaction with the input component
- Overall map design
Following the standard object oriented design (OOD) methodologies, we could just use the Entity
class that we created as the base class for all in-game characters, including NPCs and enemies. The reality with this standard approach is that we will usually end up with a massive base class that tries to do everything, including wide and deep hierarchies that become difficult to manage. One disastrous side-effect is that when one tries to change one small property in...