- After getting the NPC pathing issues worked out last week, I started trying to plan schedules for the NPCs. My goal is that at specific times on specific days, they will move from place to place. The problem I’m running into is trying to calculate that movement for NPCs who are not in the same game room as the Player – it doesn’t really matter if they are in the right spot until the Player and NPC do need to be in the right room, but it too me QUITE a while to figure out how to do this – it took basically the entire week.
- The very first step was just making the NPC walk in the same room on schedule
- I quickly discovered bugs with that, like this fun one where the NPC just walked right through the counter 😂
I got those first few bugs worked out easily:
Then I started working on the logic to get the NPC to leave the room, while the player is in the same room:
- I ended up testing and fixing a bunch of different versions of this, to ensure the NPC would always render at the right spot when the player entered a room, and it seems to all be working 🤞🏻
- I also did a bunch of work on the Shop this NPC runs, to show the shop inventory, and then created pagination for the shop items.
The last thing I got done this week was working on the Player’s House upgrade: