Since the weekend I’ve been making rapid progress on the rat enemy and its AI behavior.
Here’s what was done yesterday:
- Implemented rat attack routines
- Set up jump and lunge forward functionality for attack
- Jump bite animation during attack
- Cowardice and aggression system – some rats will not attack, or will attack and run away
- Dealing damage reduces aggression (taking damage will increase cowardice, but that’s not in yet) so that rats do surprise attacks and skitter away
Progress is steady towards the state I’d like it in for the gameplay demonstration video, but there’s still a lot to do, including:
- Health, damage, and death for the rats
- Kick attack for the player
- Two-handed pickup animation and code setup for the player (to throw barrels)
- Creating a “flee” state for the AI, so that rats that have been attacking run away faster than the normal walk speed
- Setting up flee mode so that cowardly/non-aggressive rats will skitter away when the player nears
- Blood effects on damage for the rat attacks, and also when the rats are damaged
- Crushing/impact damage for the rats so that the player jumping onto them causes damage
- Hunger/starvation code and an eating AI for the rats.
Once that list is done, I’ll be moving on to work on expanding the level, adding more items, and some traps. The level and traps work will complete the features I want to have for the video I plan to make.
I estimate 1-3 weeks for those features, depending on setbacks or delays.
As an aside, my Razer Hydra arrived from eBay today, so I’ll be jumping into making that work in the game at some point soon.