Ok loads of updates. Some of which took absolutely ages to get look reasonable.
First up I continued where I left off (which is rare for me since I tend to hop around rather a lot). So before I had it to a quest npc (a male peasant farmer) would offer you a quest to help him with a rodent problem. You can accept this quest and will be offered an item to help you complete the quest. A dagger in this case.
The quest object is added to the player object and appears in your journal a a quest name. Nothing too complicated there but it works pretty elegantly at least and lends itself to easily making so I can save the game state (ie the Player wants to quit and play something else – heaven forbid).
Ok so now I needed some rodents for said rodent problem. I already had my rats kinda walking in a straight line and following the terrain if i told them to however that’s all they did. Unless you attacked them in which case they will follow you to the ends of the earch (around 25km away in this case) and try and kill you. Since they hit for hardly anything that would take probably hours for a rat to kill you. These are, after all, the started quest monsters.
Anyway so I had to make the roam but not too far away from the farmers farm or else what kind of problem would he have exactly? “Oh these rats that are 10km away are bothering my crops?”. I’m not even sure rats eat corn.. but anyway. So the rats first had to roam within an invisible bounding box. That was simple enough, I just had to add some code to the editor to allow you to set the min/max for the box and save it for each rat.
Now onto the roaming itself. There a simplistic AI for this. The rats have 8 different actions they can perform. One of these is randomly picked after a random time (only a second ish) and they will various in turning rate, speed, animation speed. Also they will avoid each other and try not to make it too obviously they’re in an invisible box.
Here’s a video showing how that looks. I’ll tweak it some more but i’m fairly happy with it:
So there you have it. Next up i’ll be making it so you can kill the rats (which already kinda is done) and make them respawn after a while. They will leave a corpse for a few minutes first and possibly even drop some treasure. Oo Treasure!
On a side note I’m really starting to see why there’s such a long list of people in the credit at the end os PS4 game. Wow there’s a lot of work. I’m glad I didn’t go with my original idea of making an MMORPG. I mean this isn’t going to be Witcher 3, let’s be realistic it’s also not going to cost £50-60. Also remember, No Man’s Sky was only 2-3 guys at first (6 in the end) and that was a pretty huge success. I loved it anyway.
Until next time.