Saturday, March 2, 2013

NavTac - Log #8

To begin with a side note... I don't know if I should post when I can or try and make it at the end of the day. More than likely I'll be updating this post later today with what new stuff I've accomplished. But anyway...

Last night and this morning I've worked on navigation and AI... mostly learning rather than doing. I have gotten around to know how to work creating navigation grids and using them in Dynamic Navigation... which was such a breeze! Didn't think it would have been that easy, honestly. That was last night. This morning I've been looking at state machines, hoping to learn how to actually code them since I've only ever made them with visual editors in both Unity and CryEngine. Well, I'm going to be making a very simplistic version of a state machine for this game because quite frankly, this game's AI doesn't need much. I'm pretty sure the only states I'll have will be idle, pursue, patrol, and retreat.

As far as AI goes, I've only as of yet implemented a target-scanning method. Right now, it runs through all targets with a given tag, checks if each one is closer than the last (and if it has line-of-sight to it), and then the closest one that is sees is the current target for it. I'll end up tweaking this with some "threat level" variables maybe, so the AI is a little smarter than just engaging whatever is closest, and then it can weigh its options, so to speak.

Lastly, had my first go at making a custom gizmo :)  Made one to visualize the standard "sight" and "firing" ranges of the ships, custom icon and all:



No comments:

Post a Comment